-
Notifications
You must be signed in to change notification settings - Fork 1
/
sys.inc
80 lines (66 loc) · 1018 Bytes
/
sys.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
beginProc consolePutChar,c
mov eax,0x0
mov ebx,[c]
int 0x31
endProc 1
beginProc consoleWrite,t
mov eax,0x1
mov ebx,[t]
int 0x31
endProc 1
beginProc consoleWriteLine,t
mov eax,0x2
mov ebx,[t]
int 0x31
endProc 1
beginProc consoleWriteNumber,c,b
mov eax,0x3
mov ebx,[c]
mov ecx,[b]
int 0x31
endProc 2
beginProc consoleNewLine
mov eax,0x4
int 0x31
endProc
beginProc consolePrintOK
mov eax, 0x5
int 0x31
endProc
beginProc consoleBackSpace
mov eax,0x6
int 0x31
endProc
beginProc consoleSetForeground,c
mov eax,0x7
mov ebx,[c]
int 0x31
endProc 1
beginProc consoleSetBackground,c
mov eax,0x8
mov ebx,[c]
int 0x31
endProc 1
beginProc consoleClear
mov eax,0xf
int 0x31
endProc
beginProc consoleCreate
mov eax,0xff
int 0x31
endProc
beginProc exitProg
mov eax,0x5
int 0x30
endProc
macro ConsoleWriteFormat [s,v]{
forward
if s eq 's'
xcall consoleWrite ,v
else if s eq 'd'
xcall consoleWriteNumber, v,10
else if s eq 'x'
xcall consoleWriteNumber, v,16
end if
common
}