First post, by Peter Swinkels
According to HelpPC interrupt vector 1Fh points at the extended ASCII characters' fonts. The code below is meant to invert the character bitmaps:
DEFINT A-Z
CONST CHARACTERBITMAPS = &H1F
DECLARE FUNCTION GetOffset& (InterruptNr)
DECLARE FUNCTION GetSegment& (InterruptNr)
DECLARE SUB DisplayExtendedCharacters ()
DECLARE SUB InvertExtendedCharacters ()
SCREEN 1
CLS
InvertExtendedCharacters
DisplayExtendedCharacters
SUB DisplayExtendedCharacters
FOR Character = 128 TO 255
PRINT CHR$(Character);
NEXT Character
END SUB
FUNCTION GetOffset& (InterruptNr)
DEF SEG = &H0
VectorOffset = InterruptNr * &H4
Offset& = PEEK(VectorOffset + &H1) * &H100&
GetOffset& = Offset& OR PEEK(VectorOffset)
END FUNCTION
FUNCTION GetSegment& (InterruptNr)
DEF SEG = &H0
VectorOffset = InterruptNr * &H4
Segment& = PEEK(VectorOffset + &H3) * &H100&
GetSegment& = Segment& OR PEEK(VectorOffset + &H2)
END FUNCTION
SUB InvertExtendedCharacters
Segment& = GetSegment&(CHARACTERBITMAPS)
Offset& = GetOffset&(CHARACTERBITMAPS)
DEF SEG = Segment&
FOR Index& = 0 TO 16384
POKE Offset& + Index&, PEEK(Offset& + Index&) XOR &HFF
NEXT Index&
END SUB
It doesn't appear to be doing anything except possibly crashing... Anyone know where I went wrong?
Do not read if you don't like attention seeking self-advertisements!
Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels