- movzx eax, byte [done] ; Pad value of done to one byte and put in eax
- cmp eax,1 ; Compare eax with 1
- jg myFirstASMLabel ; Jump if greater than to myFirstASMLabel
-
- mov byte [done], 1
-
- mov eax,4 ; Put magic # for system call sys_write into eax
- mov ebx,1 ; Prepare arg 1 of sys_write, 1 - file descriptor of stdo
- mov ecx,hello ; Prepare arg 2, reference to string hello
- mov edx,helloLen ; Prepare arg 3, string length, no deref. b/c constant
- int 80h ; Call the kernel
-;
+ cmp byte [done],1 ; Compare byte padded value of done with 1
+ jg exit ; Jump if greater than to exit