Skip to content

Commit 487fccc

Browse files
Added test for VDU 23, 16
1 parent 9686d9a commit 487fccc

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

tests/vdu_23_16.bas

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
10 REM MODE 1 on the BBC: 40x32 characters (X=40, Y=32)
2+
20 REM MODE 2 on the Agon: 40x25 characters (X=40, Y=25)
3+
30 REM Set appropriate mode below and X,Y values
4+
40 :
5+
50 MODE 2
6+
60 X=40
7+
70 Y=25
8+
80 :
9+
90 REM Disable screen scrolling:
10+
100 REM BBC Master only!
11+
110 VDU 23,16,1,255,0,0,0,0,0,0
12+
130 PROCdrawscreen
13+
140 :
14+
150 A=GET
15+
170 END
16+
180 :
17+
200 DEF PROCdrawscreen
18+
220 REM Define border characters
19+
240 REM Horizontal Bar
20+
250 VDU 23,224,0,0,255,255,255,255,0,0
21+
260 REM Vertical Bar
22+
270 VDU 23,225,60,60,60,60,60,60,60,60
23+
280 REM Top Left Corner
24+
290 VDU 23,226,0,0,63,63,63,63,60,60
25+
300 REM Top Right Corner
26+
310 VDU 23,227,0,0,252,252,252,252,60,60
27+
320 REM Bottom Right Corner
28+
330 VDU 23,228,60,60,252,252,252,252,0,0
29+
340 REM Bottom Left Corner
30+
350 VDU 23,229,60,60,63,63,63,63,0,0
31+
370 REM Draw the frame
32+
390 REM *** Draw Line 0 ***
33+
410 PRINT TAB(0,0) CHR$(226);
34+
430 FOR J%=1 TO X-2
35+
440 PRINT TAB(J%,0) CHR$(224);
36+
450 NEXT J%
37+
470 PRINT TAB(X-1,0) CHR$(227);
38+
490 REM *** Draw middle lines ***
39+
510 FOR J%=1 TO Y-2
40+
520 PRINT TAB(0,J%) CHR$(225);
41+
530 PRINT TAB(X-1,J%) CHR$(225);
42+
540 NEXT J%
43+
560 REM *** Draw bottom line ***
44+
580 PRINT TAB(0,Y-1) CHR$(229);
45+
600 FOR J%=1 TO X-2
46+
610 PRINT TAB(J%,Y-1) CHR$(224);
47+
620 NEXT J%
48+
640 PRINT TAB(X-1,Y-1) CHR$(228);
49+
660 ENDPROC

0 commit comments

Comments
 (0)