Micro­power

  

Volume 1, Number 1 – August 1981








Page 8 of 33











10000010ORG£1000; Nascom 2 pixel set
10002100000020LDHL 0; Put your P.C.G. address here
10031100020030LDDE £200; Offset to character £A0
1006190040ADDHL DE
1007E50050PUSHHL; Save HL
100806100060LDB 16; Sixteen bytes to be cleared
100A36000070CLRAOLD(HL) 0; Set all bytes to zero
100C230080INCHL
100D10FB0090DJNZCLRA0
100FE10100POPHL; Recover HL
1010190110ADDHL DE; Now go to character £C0
10110EC00120LDC £C0; Character is kept in C
1013C50130SBCPUSHBC; Save BC
1014D70B0140RCALPIX5; Set 5 top bytes as necessa
1016D7090150RCALPIX5; Set next 5 bytes
101806060160LDB 6; Set bottom 6 bytes
101AD7070170RCALPIXEL
101CC10180POPBC; Recover BC
101D0C0190INCC; Next character
101E20F30200JRNZ SBC; Continue until zero
1020C90210RET
102106050220PIX5LDB 5; Routine to set 5 bytes
1023AF0230PIXELXORA; Clear A
1024CB090240RRCC; Test bits 0,1 or 2
1026C50250PUSHBC
102730020260JRNC RRC3; Jump if bit = 0
10293EF00270LDA £F0; Draw pixel if bit = 1
102BCB090280RRC3RRCC; Now test bits 3,4 or 5
102DCB090290RRCC
102FCB090300RRCC
103130020310JRNC LDHLA; Jump if bit = 0
1033C60F0320ADDA 15; Draw pixel if bit = 1
1035770330LDHLALD(HL) A; Set number of lines
1036230340INCHL; Stored in B
103710FC0350DJNZLDHLA
1039C10360POPBC; Recover BC
103AC90370RET
10000380ORG£1000; TRS80 pixel set
10000EC00390LDC £C0
10022100000400LDHL 0; Put your P.C.G. address here
1005C50410TPUSHPUSHBC
1006D70B0420RCALTRSP5; Two sets of 5 lines
1008D7090430RCALTRSP5
100A06060440LDB 6
100CD7070450RCALTRSPIX; One set of six lines
100EC10460POPBC
100F0C0470INCC
101020F30480JRNZ TPUSH
1012C90490RET
101306050500TRSP5LDB 5
1015AF0510TRSPIXXORA
1016CB090520RRCC; Test bits 0, 2, or 4
101830020530JRNC TRRC
101A3EF00540LDA £F0; Draw pixel if bit = 1
101CCB090550TRRCRRCC; Test bits 1, 3, or 5
101EC50560PUSHBC
101F30020570JRNC TRR2
1021C60F0580ADDA 15; Draw pixel if bit = 1
1023770590TRR2LD(HL) A; Set number of lines
1024230600INCHL; Stored in B
102510FC0610DJNZTRR2
1027C10620POPBC
1028C90630RET








Page 8 of 33