aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--prog1.asm12
1 files changed, 5 insertions, 7 deletions
diff --git a/prog1.asm b/prog1.asm
index bf69e45..ea9f9d0 100644
--- a/prog1.asm
+++ b/prog1.asm
@@ -1,5 +1,8 @@
global _start
+section .data
+ MAXLOOP db 10
+
section .text
; while edx <= ecx
@@ -14,7 +17,7 @@ loop:
jmp loop
exit:
- ; exit value is edx, let's put it in ebx
+ ; exit value is in edx, move it to ebx
mov ebx, edx
; clear registers
@@ -28,11 +31,6 @@ exit:
ret
_start:
- mov eax, 0
- mov edx, 0
- mov ecx, 255
+ mov ecx, [MAXLOOP]
jmp loop
- ; exit is ebx
- ;mov ebx, 0
-