Assembly Language Flashcards

1
Q

Name 4 registers and this uses

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the syntax for a line of assembly language

A

Label: mnemonic variable, memory address; comment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Name 4 status registers

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Jumps

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

While loop

A

Begin: mov eax, num1
Add 1
Cmp eax, 10
JL begin
Nop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

For loop

A

mov ecx, 10
Floop: add sum, ecx
Loop floop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly