-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.arm.asm
More file actions
executable file
·129 lines (118 loc) · 2.09 KB
/
test.arm.asm
File metadata and controls
executable file
·129 lines (118 loc) · 2.09 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
; ==============================
; Assembly Code Generated By CuteASM
; Time: 2025-07-22 12:59:48
; Architecture: arm
; OS: linux
; ==============================
section .data;
section .text;
; ==============================
; Function:test.hiMyLang2
test.hiMyLang2:
PUSH {fp, lr}
ADD fp, sp, #4
MOV R1,
ADD R1, 3
MOV R0, R1
CMP R0, 6666
if_1:
ADD sp, 16
POP bp
RET
end_if_1:
MOV 4[ebp-8], 123
CMP 123, R0
if_2:
MOV 4[ebp-8], 9
else_if_2:
MOV 4[ebp-8], 10
end_if_2:
ADD sp, 16
POP bp
RET
; Function End:test.hiMyLang2
; ==============================
; ==============================
; Function:test.hiFn2
test.hiFn2:
PUSH {fp, lr}
ADD fp, sp, #4
PUSH bp
MOV bp, sp
SUB sp, 16
MOV , 9
MOV , 78
CALL test.hiMyLang2
MOV , 5
MOV , 6
MOV else_if_3, 1
if_3:
MOV , 0
else_if_3:
MOV , 10
end_if_3:
CMP R0, 0
if_4:
MOV , 9
else_if_4:
ADD sp, 16
POP bp
RET
end_if_4:
CMP R0, 0
if_5:
MOV , 9
end_if_5:
ADD sp, 16
POP bp
RET
; Function End:test.hiFn2
; ==============================
; ==============================
; Function:test.print0
test.print0:
PUSH {fp, lr}
ADD fp, sp, #4
PUSH bp
MOV bp, sp
SUB sp, 4
PUSH
CALL GetStdHandle@1
PUSH 0
PUSH 0
PUSH messageLen
PUSH message
PUSH R0
CALL WriteFile
XOR R0, R0
ADD sp, 4
POP bp
RET
; Function End:test.print0
; ==============================
; ==============================
; Function:test.main0
test.main0:
PUSH {fp, lr}
ADD fp, sp, #4
PUSH bp
MOV bp, sp
SUB sp, 12
MOV , 1
MOV , 100
CALL test.hiFn2
CALL test.print0
ADD sp, 12
POP bp
RET
; Function End:test.main0
; ==============================
; ==============================
; Function:main
main:
PUSH {fp, lr}
ADD fp, sp, #4
CALL test.main0()
RET
; Function End:main
; ==============================