Skip to content

Commit c1fba8e

Browse files
committed
Added delayed Window test
1 parent f165bb2 commit c1fba8e

File tree

2 files changed

+111
-0
lines changed

2 files changed

+111
-0
lines changed

AmigaOS/test-window-2

764 Bytes
Binary file not shown.

AmigaOS/test-window-2.asm

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
;==========================================================
2+
; ASM Testcase
3+
; flype, 2015-10-11
4+
;==========================================================
5+
6+
;==========================================================
7+
; CONSTANTS
8+
;==========================================================
9+
10+
ExecBase EQU 4
11+
OpenLibrary EQU -552
12+
CloseLibrary EQU -414
13+
OpenWindow EQU -204
14+
CloseWindow EQU -72
15+
Delay EQU -198
16+
17+
WFLG_SIZEGADGET EQU $0001
18+
WFLG_DRAGBAR EQU $0002
19+
WFLG_DEPTHGADGET EQU $0004
20+
WFLG_CLOSEGADGET EQU $0008
21+
WFLG_SIZEBRIGHT EQU $0010
22+
WFLG_SIZEBBOTTOM EQU $0020
23+
WFLG_SMART_REFRESH EQU $0000
24+
WFLG_SIMPLE_REFRESH EQU $0040
25+
WFLG_REPORTMOUSE EQU $0200
26+
WFLG_ACTIVATE EQU $1000
27+
WFLG_BORDERLESS EQU $8000
28+
WFLG_HASZOOM EQU $20000000
29+
30+
;==========================================================
31+
; MAIN
32+
;==========================================================
33+
34+
start:
35+
;
36+
lea DosName,a1 ; a1 = library name
37+
move.l #37,d0 ; d0 = library version
38+
move.l ExecBase,a6 ; a6 = exec base
39+
jsr OpenLibrary(a6) ; call OpenLibrary()
40+
tst.l d0 ; test d0
41+
beq exit1 ; if library base is null
42+
move.l d0,DosBase ; store dos base
43+
;
44+
lea IntuiName,a1 ; a1 = library name
45+
move.l #0,d0 ; d0 = library version
46+
move.l ExecBase,a6 ; a6 = exec base
47+
jsr OpenLibrary(a6) ; call OpenLibrary()
48+
tst.l d0 ; test d0
49+
beq exit2 ; if library base is null
50+
move.l d0,IntuiBase ; store intuition base
51+
;
52+
loop:
53+
;
54+
lea WndProps,a0 ; window properties
55+
add.w #2,0(a0) ; x + 2
56+
add.w #1,2(a0) ; y + 1
57+
add.w #2,4(a0) ; w + 2
58+
add.w #1,6(a0) ; h + 1
59+
move.l IntuiBase,a6 ; a6 = intuition base
60+
jsr OpenWindow(a6) ; call OpenWindow()
61+
tst.l d0 ; test d0
62+
beq exit3 ; if window pointer is null
63+
move.l d0,WndPtr ; store window pointer
64+
;
65+
move.l #5,d1 ; wait time
66+
move.l DosBase,a6 ; a6 = dos base
67+
jsr Delay(a6) ; call Delay()
68+
;
69+
move.l WndPtr,a0 ; a0 = Window pointer
70+
move.l IntuiBase,a6 ; a6 = intuition base
71+
jsr CloseWindow(a6) ; call OpenWindow()
72+
;
73+
bra loop ; continue
74+
;
75+
exit3:
76+
move.l IntuiBase,a1 ; a1 = intuition base
77+
move.l ExecBase,a6 ; a6 = exec base
78+
jsr CloseLibrary(a6) ; call CloseLibrary()
79+
exit2:
80+
move.l DosBase,a1 ; a1 = dos base
81+
move.l ExecBase,a6 ; a6 = exec base
82+
jsr CloseLibrary(a6) ; call CloseLibrary()
83+
exit1:
84+
rts
85+
86+
;==========================================================
87+
; Data Section
88+
;==========================================================
89+
90+
WndPtr dc.l 0
91+
DosBase dc.l 0
92+
IntuiBase dc.l 0
93+
94+
DosName dc.b 'dos.library',0
95+
even
96+
97+
IntuiName dc.b 'intuition.library',0
98+
even
99+
100+
WndProps:
101+
dc.w 0,0,40,20 ; x,y,w,h
102+
dc.b 0,1
103+
dc.l 0,$2000126F,0,0,0,0,0
104+
dc.w 0,0,0,0,1
105+
even
106+
107+
;==========================================================
108+
; End of program
109+
;==========================================================
110+
111+
end

0 commit comments

Comments
 (0)