Phil
5 năm trước cách đây
mục cha
commit
0b19f1e41a
1 tập tin đã thay đổi với
32 bổ sung và
0 xóa
-
32
0
compare.asm
|
|
@@ -0,0 +1,32 @@
|
|
|
+section .data
|
|
|
+ z dw 20
|
|
|
+ g db 'big',0xa ;
|
|
|
+ s db 'small' ;
|
|
|
+
|
|
|
+section .text
|
|
|
+
|
|
|
+ global _start
|
|
|
+
|
|
|
+_start:
|
|
|
+ mov ecx, [z]
|
|
|
+ cmp ecx, 50
|
|
|
+ jge big
|
|
|
+
|
|
|
+ mov eax, 4
|
|
|
+ mov ebx, 0
|
|
|
+ mov ecx, s
|
|
|
+ mov edx, 4
|
|
|
+ int 0x80
|
|
|
+
|
|
|
+ mov eax, 1
|
|
|
+ mov ebx, 0
|
|
|
+ int 0x80
|
|
|
+
|
|
|
+big:
|
|
|
+ mov eax, 4
|
|
|
+ mov ebx, 0
|
|
|
+ mov ecx, g
|
|
|
+ mov edx, 4
|
|
|
+ int 0x80
|
|
|
+
|
|
|
+
|