final clean up
[sped.git] / macros.S
1
2 %ifndef __UTILS_S__
3 %define __UTILS_S__
4
5 %macro write_str 2
6     mov eax, 4
7     mov ebx, 1
8     mov ecx, %1
9     mov edx, %2
10     int 0x80
11 %endmacro
12
13 ; gets the nth string ptr in a str array
14 ; of the form: str_offset buffer, n
15 ; result is in eax
16 %macro str_offset 2
17     mov eax, %2
18     mov ecx, 4
19     mul ecx
20     add eax, DWORD %1
21 %endmacro
22
23 %endif