implemented flag for comparison result
This commit is contained in:
@@ -5,9 +5,9 @@ Example of behavior change depending on some condition
|
||||
.main:
|
||||
movc ax 1
|
||||
movc bx 2
|
||||
gt cx ax bx
|
||||
jnz @true cx
|
||||
jz @false cx
|
||||
gt ax bx
|
||||
jnz @true
|
||||
jz @false
|
||||
|
||||
.true:
|
||||
const8 true.msg "true\n"
|
||||
|
||||
@@ -3,6 +3,7 @@ Example of self-repeating code section
|
||||
*/
|
||||
|
||||
.main:
|
||||
movc dx 0; // loop counter
|
||||
|
||||
.loop
|
||||
const8 datum "ITERATION!!! "
|
||||
@@ -11,4 +12,11 @@ movc ah 1
|
||||
movc rbx @datum
|
||||
movc ecx #datum
|
||||
sys
|
||||
jmp @loop
|
||||
|
||||
movc cx 1
|
||||
add dx cx
|
||||
movc cx 8
|
||||
lt dx cx
|
||||
jnz @loop
|
||||
movc rax 0
|
||||
exit
|
||||
|
||||
Reference in New Issue
Block a user