blob: bf69e45a7714458cab9a7be1c78ae20d827abb7a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
global _start
section .text
; while edx <= ecx
loop:
cmp ecx, edx
jle exit
; ebx++
add edx, 1
; loop()
jmp loop
exit:
; exit value is edx, let's put it in ebx
mov ebx, edx
; clear registers
mov edx, 0
mov ecx, 0
; initate exit syscall
; exit(ebx)
mov eax, 1
int 80h
ret
_start:
mov eax, 0
mov edx, 0
mov ecx, 255
jmp loop
; exit is ebx
;mov ebx, 0
|