From 21f616b5593d87d6381c1f3d67a3df0c442dba44 Mon Sep 17 00:00:00 2001 From: scratko Date: Wed, 27 Mar 2024 22:38:51 +0300 Subject: Initial commit --- macro.inc | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 macro.inc (limited to 'macro.inc') diff --git a/macro.inc b/macro.inc new file mode 100644 index 0000000..4253947 --- /dev/null +++ b/macro.inc @@ -0,0 +1,72 @@ +%macro get_arg 0 + add esi, 4 + mov edi, [esi] +%endmacro +%macro write_value 0 + mov edx, eax ; count + mov eax, 4 ; syscall write + mov ebx, [f_discr] + mov ecx, buffer + int 80h +%endmacro +%macro new_line 0 + mov eax, 4 + mov ebx, [f_discr] + mov ecx, nlstr + mov edx, 1 + int 80h +%endmacro +%macro vertical 0 + mov eax, 4 + mov ebx, [f_discr] + mov ecx, vert_sep + mov edx, 3 + int 80h +%endmacro +%macro border 0 + mov eax, 4 + mov ebx, [f_discr] + mov ecx, some_spaces + mov edx, 2 + int 80h + mov eax, 4 + mov ebx, [f_discr] + mov ecx, border_sep + mov edx, 53 + int 80h + mov eax, 4 + mov ebx, [f_discr] + mov ecx, some_spaces + mov edx, 2 + int 80h +%endmacro +%macro horizontal 0 + mov eax, 4 + mov ebx, [f_discr] + mov ecx, beg_sep + mov edx, 2 + int 80h + mov eax, 4 + mov ebx, [f_discr] + mov ecx, hor_sep + mov edx, hor_length + int 80h + mov eax, 4 + mov ebx, [f_discr] + mov ecx, end_sep + mov edx, 2 + int 80h +%endmacro +%macro placeholder 0 + mov eax, 4 + mov ebx, [f_discr] + mov ecx, some_spaces + int 80h +%endmacro +%macro undefined 0 + mov eax, 4 + mov ebx, [f_discr] + mov ecx, undef_value + mov edx, 1 + int 80h +%endmacro -- cgit v1.2.3