/
gt.asm
76 lines (64 loc) · 1.41 KB
/
gt.asm
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
extern GetStdHandle, WriteFile, ReadFile, CreateFileA, CloseHandle,
ExitProcess
%macro covar 0.nolist
[section .data]
times 100 dd 0
mvpad: db '.\',__FILE__
mvnapad: db 0
%endmacro
%macro openin 0.nolist
extern openisr
push dword mvpad
push dword mvnapad
call openisr
%endmacro
%macro openuit 0.nolist
extern openusr
push dword mvpad
push dword mvnapad
call openusr
%endmacro
%macro schrijf 0.nolist
extern schrsr
push dword outarea
push dword 72
call schrsr
%endmacro
%macro uit 1.nolist
extern uitsr
push esi
lea esi, %1
push esi
call uitsr
pop esi
%endmacro
%macro inv 1.nolist
;deze macro leest een getal in van het scherm;
;het getal staat daarna in binaire vorm in %1
extern invsr
push esi
lea esi,%1
push esi
call invsr
pop esi
%endmacro
%macro lees 0.nolist
extern leessr
push dword inarea
call leessr
%endmacro
%macro inleiding 0.nolist
[section .code]
start:
%endmacro
%macro slot 0.nolist
extern sluitsr
call sluitsr
%endmacro
%macro tekstbin 0.nolist
;De externe inhoud vanaf adres in ESI wordt omgerekend naar binair.
;Het aantal bytes moet in ECX staan.
;Het resultaat komt in EAX.
extern tkstbsr
call tkstbsr
%endmacro