File: demolbl.bas

package info (click to toggle)
zmakebas 1.2b-0.1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 128 kB
  • sloc: ansic: 787; makefile: 29; sh: 23
file content (72 lines) | stat: -rw-r--r-- 1,756 bytes parent folder | download | duplicates (4)
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
# (for Emacs) -*- indented-text -*-

# this is a label-using version of `demo.bas', which shows how much
# nicer it is not to have to deal with line numbers. :-)


rem zmakebas demo

gosub @init
gosub @header
gosub @udgdem
gosub @blockdem
stop


@init:
for f=usr "a"+7 to usr "u"+7 step 8
poke f,255
next f
let is48=1

# init all attrs just in case
border 7:paper 7:ink 7:bright 0:flash 0:cls

# check for 48k speccy or 48k mode. This is a pretty nasty way to do
# it, but seems to be the most sane way (from Basic at least).
print "\t"
if screen$(0,0)="S" then let is48=0
ink 0:print at 0,0;
return


@header:
print ink 5;"\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..";\
            "\..\..\..\..\..\..\..\..\..\..\..\..\..\..\.."
print paper 5;"  Non-ASCII chars in zmakebas  "
print ink 5;"\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''";\
	    "\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''"
print
return


@udgdem:
print "Here are the UDGs:"''
print ink 1;"\a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s";
if is48 then print ink 1;"\t\u";
print ''"(They should be underlined.)"
return


@blockdem:
#              01234567890123456789012345678901
print at 11,0;"The block graphics, first as"'\
	      "listed by a for..next loop, then"'\
	      "via zmakebas's escape sequences:"
ink 7
print at 15,0;
for f=128 to 143:print chr$(f);" ";:next f:print ''
print at 17,0;"\   \ ' \'  \'' \ . \ : \'. \': ";\
	      "\.  \.' \:  \:' \.. \.: \:. \::"
# draw boxes around them to make it look less confusing
ink 1
for y=0 to 1
for x=0 to 15
plot x*16,55-y*16:draw 7,0:draw 0,-7:draw -7,0:draw 0,7
next x
next y
ink 0
print at 20,0;"And finally here's the copyright"'\
	      "symbol (";ink 1;"\*";ink 0;\
	      ") and pound sign (";ink 1;"`";ink 0;")."
return