Phil
5 years ago
1 changed files with
32 additions and
0 deletions
-
32
0
spaghetti.asm
|
|
@@ -0,0 +1,32 @@
|
|
|
+section .data
|
|
|
+ n dw 0;
|
|
|
+
|
|
|
+section .text
|
|
|
+
|
|
|
+ global _start
|
|
|
+
|
|
|
+_start:
|
|
|
+ inc dword [n]
|
|
|
+ inc dword [n]
|
|
|
+ inc dword [n]
|
|
|
+ inc dword [n]
|
|
|
+ inc dword [n]
|
|
|
+ inc dword [n]
|
|
|
+ inc dword [n]
|
|
|
+ inc dword [n]
|
|
|
+
|
|
|
+
|
|
|
+ mov ecx, [n]
|
|
|
+ add ecx, '0'
|
|
|
+ mov [n], ecx
|
|
|
+
|
|
|
+ mov eax, 4
|
|
|
+ mov ebx, 1
|
|
|
+ mov ecx, n
|
|
|
+ mov edx, 1
|
|
|
+ int 0x80
|
|
|
+
|
|
|
+
|
|
|
+ mov eax, 1
|
|
|
+ mov ebx, 0
|
|
|
+ int 0x80
|