diff --git a/worksheet1/src/.gitkeep b/worksheet1/src/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/worksheet1/src/asm_io.asm b/worksheet1/src/asm_io.asm deleted file mode 100644 index 2e6e666792b5fb894ac64e0c3128bb930694d77d..0000000000000000000000000000000000000000 --- a/worksheet1/src/asm_io.asm +++ /dev/null @@ -1,26 +0,0 @@ -; -; file: asm_io.asm -; Assembly I/O routines -; To assemble for DJGPP -; nasm -f coff -d COFF_TYPE asm_io.asm -; To assemble for Borland C++ 5.x -; nasm -f obj -d OBJ_TYPE asm_io.asm -; To assemble for Microsoft Visual Studio -; nasm -f win32 -d COFF_TYPE asm_io.asm -; To assemble for Linux -; nasm -f elf -d ELF_TYPE asm_io.asm -; To assemble for Watcom -; nasm -f obj -d OBJ_TYPE -d WATCOM asm_io.asm -; IMPORTANT NOTES FOR WATCOM -; The Watcom compiler's C library does not use the -; standard C calling convention. For example, the -; putchar() function gets its argument from the -; the value of EAX, not the stack. - - -%define NL 10 -%define CF_MASK 00000001h -%define PF_MASK 00000004h -%define AF_MASK 00000010h -%define ZF_MASK 00000040h -%define SF_MASK 00000080h \ No newline at end of file diff --git a/worksheet1/src/asm_io.inc b/worksheet1/src/asm_io.inc deleted file mode 100644 index 9163be3955bb418e8b5d74d9004b38cc45f7cfa4..0000000000000000000000000000000000000000 --- a/worksheet1/src/asm_io.inc +++ /dev/null @@ -1,30 +0,0 @@ - extern read_int, print_int, print_string - extern read_char, print_char, print_nl - extern sub_dump_regs, sub_dump_mem, sub_dump_math, sub_dump_stack - -%macro dump_regs 1 - push dword %1 - call sub_dump_regs -%endmacro - - -; -; usage: dump_mem label, start-address, # paragraphs -%macro dump_mem 3 - push dword %1 - push dword %2 - push dword %3 - call sub_dump_mem -%endmacro - -%macro dump_math 1 - push dword %1 - call sub_dump_math -%endmacro - -%macro dump_stack 3 - push dword %3 - push dword %2 - push dword %1 - call sub_dump_stack -%endmacro \ No newline at end of file diff --git a/worksheet1/src/asm_io.o b/worksheet1/src/asm_io.o deleted file mode 100644 index d75ea1f27158915097669a9fe1672cfa3c2e56e7..0000000000000000000000000000000000000000 Binary files a/worksheet1/src/asm_io.o and /dev/null differ diff --git a/worksheet1/src/driver.c b/worksheet1/src/driver.c deleted file mode 100644 index d386c74936eba2544246ad72a6344e7d61d3e60b..0000000000000000000000000000000000000000 --- a/worksheet1/src/driver.c +++ /dev/null @@ -1,7 +0,0 @@ -int __attribute__((cdecl)) asm_main(void); - -int main() { - int ret_status; - ret_status = asm_main(); - return ret_status; -} diff --git a/worksheet1/src/driver.o b/worksheet1/src/driver.o deleted file mode 100644 index 964d1066906062baddae6f1a5a2c83c8b9222b7e..0000000000000000000000000000000000000000 Binary files a/worksheet1/src/driver.o and /dev/null differ diff --git a/worksheet1/src/task1.asm b/worksheet1/src/task1.asm deleted file mode 100644 index 0442b2c42e236974799f1b00f33c02689b4661c2..0000000000000000000000000000000000000000 --- a/worksheet1/src/task1.asm +++ /dev/null @@ -1,17 +0,0 @@ -section .data - num1 dd 10 - num2 dd 20 - result dd 0 - -section .text - global asm_main - extern print_int - -asm_main: - mov eax, [num1] - add eax, [num2] - mov [result], eax - push eax - call print_int - add esp, 4 - ret