In other words, for
> Write ‘blank space’ on red background color. Solution: mov ax, 0x4720
For the 4720
the 47 is color, the 20 is the ascii code (hex)
the 4 is the red background
the 7 is the light grey, not a requirement, but for a <space> there are no foreground pixels
You should be able to modify that line of code to substitute using table in prior comment
Main Topics
Browse All Topics





by: mzvikaPosted on 2007-04-15 at 00:32:19ID: 18913080
when working in TEXT mode (like DOS), each character is represented by 2 bytes:
1 byte for ASCII code (the character itself)
2 byte for attribute( color, background, flashing...)
Bitfields for character's display attribute:
bit 7 foreground blink or (alternate) background bright
bits 6-4 background color
bit 3 foreground bright or (alternate) alternate character set
bits 2-0 foreground color
Values for character color:.
Normal Bright
000b black dark gray
001b blue light blue
010b green light green
011b cyan light cyan
100b red light red
101b magenta light magenta
110b brown yellow
111b light gray white
how are you writing the characters? where is this AX register used?