diff --git a/task1.asm b/task1.asm deleted file mode 100644 index 4db2602fcacef8df48d8369d171266279a6afa82..0000000000000000000000000000000000000000 --- a/task1.asm +++ /dev/null @@ -1,31 +0,0 @@ -int __attribute__((cdecl)) asm_main(void); - -int main() { - int ret_status; - ret_status = asm_main(); - return ret_status; -} - - - -nasm -f elf task1.asm -o task1.o -nasm -f elf asm_io.asm -o asm_io.o -gcc -m32 -c driver.c -o driver.o -gcc -m32 driver.o task1.o asm_io.o -o task1 - -%include “asm_io.inc” -segment .data -integer1 dd 15 ; first int - integer2 dd 6 ; second int -segment .bss -result resd 1 ; result -segment .text -global asm_main -asm_main: -pusha -mov eax, [integer1] ; eax = int1 -add eax, [integer2] ; eax = int1 + int2 -mov [result], eax ; result = int1 + int2 -call print_int ; print result - popa -mov eax, 0 \ No newline at end of file