-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestLib.ASM
63 lines (53 loc) · 1.23 KB
/
TestLib.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
org 100h
Start:
mov ah, 0Fh
int 10h
mov [bOldMode], al
mov [bOldMode], bh
mov ax, 0013h ;00h, 03h
int 10h
push $A000
pop es
;xor di, di
;mov al, 60h
;mov cx, 320 * 200
;rep stosb
; ==============
;xor di, di
;mov cx, 200
;.RowLoop:
;push cx
;mov cx, 256
;xor al, al
;.ColLoop:
;stosb
;inc al
;loop .ColLoop
;add di, 320 - 256
;pop cx
;loop .RowLoop
mov cx, 320 * 200
xor di, di
mov si, 320
.DrawLoop:
xor dx, dx
mov ax, di
div si
xor ax, dx
stosb
loop .DrawLoop
mov ax, 0C08h
int 21h
test al, al
jnz @F
mov ah, 08h
int 21h
@@:
movzx ax, [bOldMode]
int 10h
mov ah, 05h
mov al, [bOldPage]
int 10h
ret
bOldMode db ?
bOldPage db ?