BASIC character editor
written by Michael W. Hey,
0703
/( A.K.A. ZEBEDEE THE ABSOLUTELY TREMENDOUS.
2 5th January, 1989.
,< Any comments should be sent to me at -
:F 18, Woodside Road, Sandiacre, Nottingham. NG10 5GP
P*NAME UDCE
ZINTRO
dINIT
nDISPLAY
x: EDIT:
INTRO
a1: "4+RJC USER-DEFINED CHARACTER EDITOR FOR BASIC "
1: "4-RJC"
X "This programme allows you to design and modify user-defined characters. Use the"
X "cursor keys to move about the 6 x 8 grid. The ENTER key turns a square ON, and"
X "full stop or DELETE key turns it OFF. The program calculates the corresponding"
X "codes for use in VDU statements of the form VDU1,138,61,n,1,2,3,4,5,6,7,8"
R "where 1 - 8 are the eight rows, and n is the character's reference number."
/1,"F": (30);"PRESS SPACE TO CONTINUE";
="" dp@ 1,"F"::
INIT
J@%=&00000002: I%=0: J%=0: X%=0: Y%=0: F$(5,7): G$(5,7): total%(7)
1 I%=05: J%=07: G$(I%,J%)=".": J%: I%
#1,"7","#","1",32,32,64,40,0
#"1,"7","#","2",65,32,44,40,0
#,1,"7","#","3",80,32,72,40,3
6
@ DISPLAY
@J (1),"2I1": : (1);"3+TUCHARACTER EDITOR": (1);"3-TU"
UT (1),"2I2": I%=07: J%=05: J%,I%);G$(J%,I%);: J%:" ", total%(I%): I%
w^1,138,61,64,total%(0),total%(1),total%(2),total%(3),total%(4),total%(5),total%(6),total%(7): 11,3);: 1,50,63,64
]h (1),"2I3": : (1)"5+RLTU INFORMATION ";: (1)"5-RLTU";
L| '" VDU1,138,61,n,";: I% = 0 6: total%(I%);",";: I%: total%(7)
s '" C - CLEAR H - HELP I - INVERT",'" M - MIRROR R - REVERSE S - SHIFT",'" Q - QUIT "
k QUIT : (1),"2I1":: (1)"3+TUCHARACTER EDITOR",(1),"3-TU"'',(1),"B QUIT PROGRAM"',(1),"B"
Q (1),"3+TR ARE YOU SURE? (Y/N)",(1),"3-TR",''"All values will be lost!"
M ="Y" 1,"8","#","1",32,32,32+94,40,0: (1)"2I1",(1)"3+CS" ::
EDIT
(1),"2I2"
1,67: X%,Y%);"";
K$=
1,67
+ K$=(255) Y%=Y%-1: Y%<0 Y%=7:
+ K$=(254) Y%=Y%+1: Y%>7 Y%=0:
+ K$=(253) X%=X%+1: X%>5 X%=0:
+ K$=(252) X%=X%-1: X%<0 X%=5:
4 K$=(13) G$(X%,Y%)="." G$(X%,Y%) = (200)
$& K$=(13) CALC: DISPLAY:
00 K$="." G$(X%,Y%)<>"." G$(X%,Y%)= "."
": K$="." CALC: DISPLAY:
2D K$=(127) G$(X%,Y%)<>"." G$(X%,Y%)= "."
%N K$=(127) CALC: DISPLAY:
"X K$="C" CLEAR: DISPLAY:
b K$="H" HELP:
#l K$="I" INVERT: DISPLAY:
#v K$="M" MIRROR: DISPLAY:
$ K$="R" REVERSE: DISPLAY:
" K$="S" SHIFT: DISPLAY:
! K$="Q" QUIT: DISPLAY:
CALC
J% = 0 7
total%(J%) = 0
I% = 0 5
? G$(I%,J%) = (200) total%(J%) = total%(J%) + (2^(5-I%))
I%
J%
MIRROR
I% = 0 5: J% = 0 7
F$(I%,J%) = G$(5-I%,J%)
J%: I%
I% = 0 5: J% = 0 7
*G$(I%,J%) = F$(I%,J%)
4 J%: I%
>CALC:
H INVERT
R I% = 0 5: J% = 0 7
\F$(I%,J%) = G$(I%,7-J%)
f J%: I%
p I% = 0 5: J% = 0 7
zG$(I%,J%) = F$(I%,J%)
J%: I%
CALC:
SHIFT
+ J% = 0 7: F$(0,J%) = G$(5,J%): J%
# I% = 5 1 -1: J% = 0 7
G$(I%,J%) = G$(I%-1,J%)
J%: I%
+ J% = 0 7: G$(0,J%) = F$(0,J%): J%
CALC:
REVERSE
I% = 0 5: J% = 0 7
8 G$(I%,J%)="." G$(I%,J%)=(200) G$(I%,J%) = "."
J%: I%
CALC:
f CLEAR: (1),"2I1": : (1),"3+TUCHARACTER EDITOR",(1),"3-TU",''"CLEAR GRID AND NUMBERS"'
Q (1),"3+TR ARE YOU SURE? (Y/N)",(1),"3-TR",''"All values will be lost!"
$L$=
. L$<>"Y"
8 I%= 0 5: J% = 0 7
BG$(I%,J%)= "."
L J%: I%
VCALC:
` HELP
j (1),"2I1"
[t: "C clears grid and all values",'"I inverts the character",'"M reflects left/right"
~ "R reverses each pixel",'" black to white & vice versa",'"S shifts each column to the left"," with wrap around"',(1),"BENSURE `CAPS LOCK' IS SELECTED",(1),"B"