aboutsummaryrefslogtreecommitdiff
path: root/prog1.asm
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-09-22 14:54:57 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-09-22 14:54:57 -0400
commit9d03e10557ec184ec575ca6f73378eb2fd2eaa3b (patch)
tree6ff6c360791d20830620b77179d645c20e8eb756 /prog1.asm
parentfbbc73540b6a9f987132ea019712a087ca257264 (diff)
downloadasmfun-9d03e10557ec184ec575ca6f73378eb2fd2eaa3b.tar.gz
Cleanup data label
Diffstat (limited to 'prog1.asm')
-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
-