logoalt Hacker News

nathelltoday at 8:01 AM0 repliesview on HN

array[1..25, 1..80] of Word absolute $B800:0000.

Arrays in TP were laid out in row-major order, and each character was represented by two bytes, one denoting the character itself and the other the attributes (foreground/background color and blinking). So, even better, array[1..25, 1..80] of packed record ch: char; attr: byte end absolute $B800:0000.

Replace $B800 with $B000 for monochrome text display (mode 7), e.g., on the Hercules.