forked from OS2World/APP-EMULATOR-zmakebas
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathzx81-basic-demo-lbl.bas
82 lines (66 loc) · 1.9 KB
/
zx81-basic-demo-lbl.bas
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
# (for Emacs) -*- indented-text -*-
# this file `demo.bas' demonstrates the features of zmakebas
# (basically just the escape sequences), and gives you an example of
# what the input can look like if you use all the bells and whistles. :-)
#
# See `demolbl.bas' for a label-using version.
# Machine code test. The codes 1 and 201 should not get translated by the ASCII
# to ZX81 character mapping, but if it is mis-applied, then the two bytes in-
# between may get changed.
rem MACHINE CODE:\{1}\{40}\{65}\{201}
rem zmakebas demo
# tabs (as below) are fine (they're removed)
# let HEADER= 2000
# let BLOCKDEM=4000
# let OTHER =4500
# let MCTEST =5000
gosub @header
gosub @blockdem
gosub @other
gosub @mctest
stop
# init
# [ deleted ]
@header:
print "\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..";\
"\..\..\..\..\..\..\..\..\..\..\..\..\..\..\.."
print " NON-ASCII CHARS IN ZMAKEBAS "
print "\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''";\
"\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''"
return
@blockdem:
# 01234567890123456789012345678901
print "THE BLOCK GRAPHICS, FIRST AS ";\
"LISTED BY A FOR..NEXT LOOP, THEN ";\
"VIA ZMAKEBAS\"S ESCAPE SEQUENCES:"
print
for F=0 to 10
print chr$(F);" ";
next F
print
print
for F=128 to 138
print chr$(F);" ";
next F
print
print
print "\ \' \ ' \'' \. \: \.' \:' \!: \!. \!'",,, \
TAB 0; "\:: \.: \:. \.. \': \ : \'. \ . \|: \|. \|'"
return
# Other escapes or characers
@other:
print
print "DOUBLE-BACKSLASH FOR POUND : \\"
print "BACKSLASH-AT FOR INV. POUND: \@"
print "BACKTICK FOR QUOTE IMAGE : `"
print
return
@mctest:
let REF=65*256+40
print "MC RESULT SHOULD BE "; REF;"."
let MC= usr 16527
print "THE MC RESULT IS ";MC;"."
print "ESCAPE CODE TEST ";
if MC<>REF then print "FAIL."
if MC=REF then print "PASS."
return