; vga_text_specials.inc - specials for colouring VGA text ; author Neil Franklin, last modification 2008.12.03 ; full maximal possible 5 character specials ; pre-ASCII char codes 0x0B to 0x0F ; start with least important, easiest to sacrifice as first .equ ALT3 = 0x09 ; use alternate colour 3 .equ ALT2 = 0x0A ; use alternate colour 2 .equ ALT1 = 0x0B ; use alternate colour 1 .equ ULON = 0x0C ; underline on .equ ULOFF = 0x0D ; underline off, needs this else space still underlined .equ INON = 0x0E ; invert/reverse on .equ INOFF = 0x0F ; invert/reverse off, needs this else space still inverted ; CHAR special alternate3 0x09 out PORTC,LUTBACK ; {1} like any space set to all background ; alternative colour 3: swap fore and alt3 colours eor LUTFORE,LUTALT3 ; {1} FORE.eor.ALT3 "mixed" eor LUTALT3,LUTFORE ; {1} ALT3.eor.(FORE.eor.ALT3) = FORE "unmix" eor LUTFORE,LUTALT3 ; {1} (FORE.eor.ALT3).eor.FORE = ALT3 "unmix" ld ZL,X+ ; {8} standard: next char, without out as in space mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x00 ijmp .db "012345678901" ; fill/overjump unused space, 16-10 = 6words|12bytes out PORTC,LUTBACK eor LUTFORE,LUTALT3 eor LUTALT3,LUTFORE eor LUTFORE,LUTALT3 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x10 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT3 eor LUTALT3,LUTFORE eor LUTFORE,LUTALT3 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x20 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT3 eor LUTALT3,LUTFORE eor LUTFORE,LUTALT3 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x30 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT3 eor LUTALT3,LUTFORE eor LUTFORE,LUTALT3 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x40 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT3 eor LUTALT3,LUTFORE eor LUTFORE,LUTALT3 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x50 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT3 eor LUTALT3,LUTFORE eor LUTFORE,LUTALT3 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x60 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT3 eor LUTALT3,LUTFORE eor LUTFORE,LUTALT3 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x70 ijmp .db "012345678901" ; CHAR special alternate2 0x0A out PORTC,LUTBACK ; {1} like any space set to all background ; alternative colour 2: swap fore and alt2 colours eor LUTFORE,LUTALT2 ; {1} FORE.eor.ALT2 "mixed" eor LUTALT2,LUTFORE ; {1} ALT2.eor.(FORE.eor.ALT2) = FORE "unmix" eor LUTFORE,LUTALT2 ; {1} (FORE.eor.ALT2).eor.FORE = ALT2 "unmix" ld ZL,X+ ; {8} standard: next char, without out as in space mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x00 ijmp .db "012345678901" ; fill/overjump unused space, 16-10 = 6words|12bytes out PORTC,LUTBACK eor LUTFORE,LUTALT2 eor LUTALT2,LUTFORE eor LUTFORE,LUTALT2 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x10 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT2 eor LUTALT2,LUTFORE eor LUTFORE,LUTALT2 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x20 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT2 eor LUTALT2,LUTFORE eor LUTFORE,LUTALT2 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x30 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT2 eor LUTALT2,LUTFORE eor LUTFORE,LUTALT2 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x40 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT2 eor LUTALT2,LUTFORE eor LUTFORE,LUTALT2 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x50 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT2 eor LUTALT2,LUTFORE eor LUTFORE,LUTALT2 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x60 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT2 eor LUTALT2,LUTFORE eor LUTFORE,LUTALT2 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x70 ijmp .db "012345678901" ; CHAR special alternate1 0x0B out PORTC,LUTBACK ; {1} like any space set to all background ; alternative colour 1: swap fore and alt1 colours eor LUTFORE,LUTALT1 ; {1} FORE.eor.ALT1 "mixed" eor LUTALT1,LUTFORE ; {1} ALT1.eor.(FORE.eor.ALT1) = FORE "unmix" eor LUTFORE,LUTALT1 ; {1} (FORE.eor.ALT1).eor.FORE = ALT1 "unmix" ld ZL,X+ ; {8} standard: next char, without out as in space mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x00 ijmp .db "012345678901" ; fill/overjump unused space, 16-10 = 6words|12bytes out PORTC,LUTBACK eor LUTFORE,LUTALT1 eor LUTALT1,LUTFORE eor LUTFORE,LUTALT1 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x10 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT1 eor LUTALT1,LUTFORE eor LUTFORE,LUTALT1 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x20 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT1 eor LUTALT1,LUTFORE eor LUTFORE,LUTALT1 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x30 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT1 eor LUTALT1,LUTFORE eor LUTFORE,LUTALT1 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x40 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT1 eor LUTALT1,LUTFORE eor LUTFORE,LUTALT1 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x50 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT1 eor LUTALT1,LUTFORE eor LUTFORE,LUTALT1 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x60 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTALT1 eor LUTALT1,LUTFORE eor LUTFORE,LUTALT1 ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x70 ijmp .db "012345678901" ; CHAR special underline on 0x0C out PORTC,LUTBACK ; {1} like any space set to all background ; underlined: lines 0..6 do nothing, line 7 below nop ; {1} nop ; {1} nop ; {1} ld ZL,X+ ; {8} standard: next char, without out as in space mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x00 ijmp .db "012345678901" ; fill/overjump unused space, 16-10 = 6words|12bytes out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x10 ijmp .db "012345678901" out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x20 ijmp .db "012345678901" out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x30 ijmp .db "012345678901" out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x40 ijmp .db "012345678901" out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x50 ijmp .db "012345678901" out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x60 ijmp .db "012345678901" out PORTC,LUTBACK ; underlined: line 7 fore/back invert eor LUTFORE,LUTBACK ; {1} FORE.eor.BACK "mixed" eor LUTBACK,LUTFORE ; {1} BACK.eor.(FORE.eor.BACK) = FORE "unmix" eor LUTFORE,LUTBACK ; {1} (FORE.eor.BACK).eor.FORE = BACK "unmix" ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x70 ijmp .db "012345678901" ; CHAR special underline off 0x0D out PORTC,LUTBACK ; {1} like any space set to all background ; underlined: lines 0..6 do nothing, line 7 below nop ; {1} nop ; {1} nop ; {1} ld ZL,X+ ; {8} standard: next char, without out as in space mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x00 ijmp .db "012345678901" ; fill/overjump unused space, 16-10 = 6words|12bytes out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x10 ijmp .db "012345678901" out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x20 ijmp .db "012345678901" out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x30 ijmp .db "012345678901" out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x40 ijmp .db "012345678901" out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x50 ijmp .db "012345678901" out PORTC,LUTBACK nop nop nop ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x60 ijmp .db "012345678901" out PORTC,LUTFORE ; underlined: line 7 fore/back invert eor LUTFORE,LUTBACK ; {1} FORE.eor.BACK "mixed" eor LUTBACK,LUTFORE ; {1} BACK.eor.(FORE.eor.BACK) = FORE "unmix" eor LUTFORE,LUTBACK ; {1} (FORE.eor.BACK).eor.FORE = BACK "unmix" ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x70 ijmp .db "012345678901" ; CHAR special invert on 0x0E out PORTC,LUTBACK ; {1} like any space set to all background ; inverted display: swap fore and back colours eor LUTFORE,LUTBACK ; {1} FORE.eor.BACK "mixed" eor LUTBACK,LUTFORE ; {1} BACK.eor.(FORE.eor.BACK) = FORE "unmix" eor LUTFORE,LUTBACK ; {1} (FORE.eor.BACK).eor.FORE = BACK "unmix" ld ZL,X+ ; {8} standard: next char, without out as in space mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x00 ijmp .db "012345678901" ; fill/overjump unused space, 16-10 = 6words|12bytes out PORTC,LUTBACK eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x10 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x20 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x30 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x40 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x50 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x60 ijmp .db "012345678901" out PORTC,LUTBACK eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x70 ijmp .db "012345678901" ; CHAR special invert off 0x0F out PORTC,LUTFORE ; {1} like any space set to all background ; inverted display: swap fore and back colours eor LUTFORE,LUTBACK ; {1} FORE.eor.BACK "mixed" eor LUTBACK,LUTFORE ; {1} BACK.eor.(FORE.eor.BACK) = FORE "unmix" eor LUTFORE,LUTBACK ; {1} (FORE.eor.BACK).eor.FORE = BACK "unmix" ld ZL,X+ ; {8} standard: next char, without out as in space mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x00 ijmp .db "012345678901" ; fill/overjump unused space, 16-10 = 6words|12bytes out PORTC,LUTFORE eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x10 ijmp .db "012345678901" out PORTC,LUTFORE eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x20 ijmp .db "012345678901" out PORTC,LUTFORE eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x30 ijmp .db "012345678901" out PORTC,LUTFORE eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x40 ijmp .db "012345678901" out PORTC,LUTFORE eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x50 ijmp .db "012345678901" out PORTC,LUTFORE eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x60 ijmp .db "012345678901" out PORTC,LUTFORE eor LUTFORE,LUTBACK eor LUTBACK,LUTFORE eor LUTFORE,LUTBACK ld ZL,X+ mov ZH,ZL andi ZH,0x3F andi ZL,0x80 ori ZL,0x70 ijmp .db "012345678901"