These are performed by using VDU25 and PLOT becomes:
VDU 25,p,x,y
where p is the PLOT number and x,y are the co-ordinates.
EQUB p:EQUW x:EQUW y
This needs the number of PLOTs loaded in A register and the address of the data loaded in X and Y registers, as explained for previous routines, before the routine is called.
.plot STXaddr:STYaddr+1:STAlen:LDY#0
.ploop LDA#25:JSR&FFEE \VDU25
LDX#5
.ploop2 LDA(addr),Y:JSR&FFEE \enter data byte
INY:BNEnotover:INC addr+1
.notover DEX:BNEploop2
DEClen:BNE ploop
RTS
Note that there are two variables in this listing which should be allocated before the assembly loop so add:
15 addr=&70:len=80
You may also add the address of OSWRCH as a variable since it's easier to write and saves remembering the address. Add:- oswrch=&FFEE to line 15. This could even be shortened further (e.g. os) provided it does not clash with other variables.
These are defined by VDU23,char,a,b,c,d,e,f,g,h as in BASIC and this routine will set up any number of characters (from 224 in sequence).
It will read a series of data lines in the same way as the above routine. The data can be entered, following the label '/.chardata', as:
EQUB a:EQUB b:EQUB c:...........EQUB h
This can be simplified by using EQUD:EQUD but the numbers must be in hex and each four digits must be entered in reverse order as EQUD enters them in reverse order. This then becomes:
EQUD &dcba:EQUD &hgfe
This routine needs the variables, temp=&81 and oswrch=&FFEE. Enter them in line 15 as mentioned above.
.chars LDY#0:LDX#224
.chloop1 STXtemp
LDA#23:JSRoswrch \VDU23
TXA:JSRoswrch \character no.
LDX#8
.chloop2 LDAchdata,Y \read data byte
JSRoswrch
INY
DEX
BNEchloop2
LDXtemp \reload char no.
INX \increment char no.
CPX#242 \last char no. +1
BNEchloop1
RTS
X register is loaded with 224, the first character value and this is stored in 'temp' within loop 'chloop1' since X register is used in the second loop to count the 8 data bytes. A register is first loaded with 23 then the value in X to give the first two parts of the command. The loop 'chloop2' then loads the 8 data bytes. Register X is then loaded from 'temp' and incremented before repeating the process for the next character. When the final character definition is completed, the routine does not branch back as the comparison is met. The value of this must be entered according to the number of characters to be defined.
Richard Dimond, EUG #20