Monday, October 13, 2003

Update on the Mystery Characters

Remember when I said I didn't have time to dork around with BASIC programs to demonstrate the IBM PC screen display codes?

Well, I lied. If you are lucky enough to be running a version of DOS or Windows that still comes with Qbasic (and if you aren't I can't help you), you can run this program to generate a complete chart. I have a screenshot, which because of Geocities' linking policies must be placed on a separate page.

Homer Simpson voice: "Heh heh, far out man. I haven't seen a POKE in years." (qv)

' INIT THE SCREEN
SCREEN 0
DEF SEG = &HB800
CLS
cols = 80

' DRAW THE VERTICAL INDEX
FOR i = 0 TO 15
POKE ((i + 1) * cols * 2), ASC(HEX$(i))
NEXT i

' HORIZONTAL INDEX
FOR j = 0 TO 15
POKE j * 4 + 4, ASC(HEX$(j))
NEXT j

' DRAW ACTUAL CHARACTERS
CHAR = 0
FOR i = 0 TO 15
FOR j = 0 TO 15
POKE ((i + 1) * cols * 2 + 2) + (j * 4 + 2), CHAR
CHAR = CHAR + 1
NEXT j
NEXT i


Comments: