From 4d2753b796ce2705efdc485a6bb54086fb99f644 Mon Sep 17 00:00:00 2001
From: k26-chow <kin3.chow@live.uwe.ac.uk>
Date: Thu, 10 Oct 2024 11:18:19 +0000
Subject: [PATCH] Upload New File

---
 asm_io.inc | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 asm_io.inc

diff --git a/asm_io.inc b/asm_io.inc
new file mode 100644
index 0000000..9163be3
--- /dev/null
+++ b/asm_io.inc
@@ -0,0 +1,30 @@
+	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
-- 
GitLab