-
Notifications
You must be signed in to change notification settings - Fork 0
/
WINIMG.ASM
90 lines (68 loc) · 1.02 KB
/
WINIMG.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
include \inc\win.inc
include \inc\mem.inc
image
windata dw $200 ;flags
dw 0 ;extent
dw 0
dw 240
dw 60
dw 0 ;mouse hdl
db 0 ;bckgnd
db 0 ;filler
winbitstruct
bitid dw 0 ;bitmap
dw 0 ;pos
dw 0
dw 0 ;rect
dw 0
dw 240
dw 60
dw 4 ;mode
dw 0 ;time
dw 0
bitstruct
ppnt dw 240
dw 60
sname db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
bitseg dw 0
drawpt dw 0
wid dw 0
fill dw $1
wservpt dw 0
code
start
call init
loop call display
jmp loop
display mov di,[drawpt]
mov cx,1800
mov ax,[fill]
dlp stosw
loop dlp
segcopyto [bitseg],3600,[drawpt],0,0
winvalidatewin [wid]
wflush
ror word ptr [fill],1
ret
err xor bx,bx
idiv bx
ret
init
heapallocatecell 3600
jc err
mov [drawpt],ax
heapallocatecell 1024
jc err
mov [wservpt],ax
wconnect [wservpt],0,$40
gcreatebit 6,offset bitstruct,offset bitstruct
jc err
mov [bitid],ax
wcreatewindow 0,$5200,offset windata,1
jc err
mov [wid],ax
wsetwinbitmap [wid],1,offset winbitstruct
winitialisewindowtree [wid]
segopen offset sname
mov [bitseg],ax
ret