-
Notifications
You must be signed in to change notification settings - Fork 12
/
main.asm
67 lines (55 loc) · 1.33 KB
/
main.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
;===================================================================================================
; Assembly Library
;
; Written By: Oded Cnaan (oded.8bit@gmail.com)
; Site: http://odedc.net
; Licence: GPLv3 (see LICENSE file)
; Package: AsmLib
;
; Description:
; Testing program for the package
;===================================================================================================
LOCALS @@
.486
IDEAL
MODEL small
STACK 256
DATASEG
_isGraphicsProgram db FALSE
CODESEG
; Include library (order is important!)
include "UtilLib.inc"
include "GrLib.inc"
; Include tests
include "Tests/tests.asm"
start:
mov ax, @data
mov ds,ax
mov ax, FALSE
ut_init_lib ax
; if (_isGraphicsProgram) {
cmp [_isGraphicsProgram], FALSE
je notGraphics
; -- DOUBLE BUFFERING
; Free redundant memory take by program
; to allow using malloc
; call AllocateDblBuffer
gr_set_video_mode_vga
gr_set_color GR_COLOR_GREEN
;} else
notGraphics:
;------ Tests
call TestMe
exit:
call WaitForKeypress
; if (_isGraphicsProgram) {
cmp [_isGraphicsProgram], FALSE
je go_out
; -- DOUBLE BUFFERING
; call ReleaseDblBuffer
gr_set_video_mode_txt
;} else
go_out:
return 0
END start
CODSEG ends