-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest4.txt
More file actions
44 lines (40 loc) · 676 Bytes
/
Copy pathtest4.txt
File metadata and controls
44 lines (40 loc) · 676 Bytes
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
39
40
41
42
$startmacro read $arg1,$arg2 mov eax, $arg1+$arg2 $endmacro
$startmacro write $arg4
mov eax, 4
mov ebx, 1
mov ecx, eax
mov edx, $arg4
int 80h
$endmacro
$startmacro largest $arg1=5,$arg2,$arg3
mov ecx, $arg1
cmp $arg2
jg thirdnum
&if $arg1>0
mov eax, $arg1
&if $arg3>0
mov ebx, $arg3
&endif
&else
mov ecx, $arg3
&endelse
&endif
&else
mov eax, $arg2
&endelse
$endmacro
$startmacro trywhile $arg5
mov eax, $arg5
&while $arg5<2
mov ebx, $arg5
add ebx,1
&endwhile
$endmacro
section .text
global _start
_start:
largest 5,4,5
write msg
trywhile 0
mov eax,1
int 80h