page chr$move macro xx,yy,zz lxi h,xx*16+DS$char$def lxi d,yy*16+DS$char$def lxi b,zz*16-8 call block$move$80 endm chr$fill macro xx,yy,zz lxi h,xx*16+DS$char$def ; start adr lxi b,yy*16 ; count mvi d,zz ; character to fill with call block$fill$80 endm newoffset equ 179*11*2 ; ; 1st move pet-asc characters to ASCII positions ; install$ASCII: lxi h,100h*16+DS$char$def+4 ; point to center of @ char call rd$mem ; ..read it to B inr b ; ..if it is a zero then dcr b ; ..install$ascii has been done rz ; ..so just exit Chr$fill 180h,64,0 ; fill 180-1bf with 0 Chr$move 17ah,18ah,1 Chr$move 169h,189h,1 Chr$move 15eh,18eh,2 ; move 2 character definitions Chr$move 101h,161h,26 ; move 16 character definitions Chr$fill 100h,32,0 Chr$move 000h,140h,1 Chr$move 01bh,15bh,3 ; move 3 character definitions Chr$move 01ch,180h,1 Chr$move 01eh,181h,2 Chr$move 040h,1c0h,64 ; move 16 character definitions ; now install characters that are NOT already defined lxi d,extra$char$table lxi h,15ch*16+DS$char$def call char$install lxi h,15eh*16+DS$char$def mvi b,3 ; install 5e, 5f and 60 call char$install$group lxi h,17bh*16+DS$char$def mvi b,5 jr char$install$group ; call/ret page ; ; user function, HL supplied on the stack under the stack ; char$install$gp: pop h ; get return address xthl ; get HL from stack (ret adr to stack) ; ; this routine will install a group of characters form ; system memory into the video (character def) memory. ; ; INPUT: ; DE=system memory character definition ; HL=character code adr to install ; B=number of characters to install (should be > 2) ; OUTPUT: ; DE=eight more then on entry ; HL=character code adr to install + B*16 ; B=0 ; char$install$group: push b push h call char$install pop h lxi b,16 dad b ; advance to the next character pop b djnz char$install$group ret page ; ; this routine will install the character pointed to by DE ; into the 8563 ASCII char set, character number pointed ; to by HL. ; INPUT: ; DE=system memory character definition ; HL=character code adr to install ; OUTPUT: ; DE=eight more then on entry ; H=0 ; char$install: call set$update$adr ; mvi h,8 ; set the loop count install$char$loop: ldax d ; get the input data outp a ; save to video memory dcr c ; point to status register inx d ; advance the input pointer write$wait: inp a ; wait for the chip to write ral ; the data to memory (with auto jrnc write$wait ; incrment) inr c ; point to the data register dcr h ; dec the loop count jrnz install$char$loop ret page