Assembly Language Flashcards
Name 4 registers and this uses
EAX - Accumulator stores current data for calculations
EBX - Base
ECX - Counter stores number for iterations
EDX - data stores data
Note: each register can store anything
What is the syntax for a line of assembly language
Label: mnemonic variable, memory address; comment
Name 4 status registers
CF carry flag - 1 if previous line had a carry
ZF zero flag - 1 if number is zero
SF sign flag - 1 if number is negative
OF overflow flag - 1 if overflow occurred
Jumps
JC - jump carry flag
JZ - jump zero flag
JS - jump sign flag
JO - jump overflow flag
JE - jump equal to
JL - jump less than
JG - jump greater than
While loop
Begin: mov eax, num1
Add 1
Cmp eax, 10
JL begin
Nop
For loop
mov ecx, 10
Floop: add sum, ecx
Loop floop