8086 assembly on specified page, specified row, specified column, specified color, output specified character
1. Final conclusion:
Assume
Screen is 80*25 mode
Specify page: Ph (16, starting from 0)
Specify line: Rh (16-in, starting from 0)
Specified column: Ch (16, starting from 0)
Specify color: Cob (binary)
Specified character: Char
Initialize the cache address for the specified location on the screen
Segment Address DS initialized to b800h+fah*ph; Control page
Offset address (BX,SI,DI,BP) initialized to a0h*rh+ch*2; control rows and columns
Output (assuming that the offset address is BX)
mov [BX], ' Char '; output character
mov [Bx+1],cob; set character color
2.80*25 Color character mode displays the buffer structure:
A) memory address space: B8000H~BFFFFH
b) A character occupies two bytes, the status byte stores the ASCII code of the character, and the high-bit byte stores the character's color attribute. That is, the bytes that correspond to all the even addresses in the buffer memory space are the characters that will be displayed, and the bytes corresponding to all the odd addresses are the color attributes of the characters stored in the previous byte.
c) Capacity per page: 80*25=2000 characters; fa0h=4000 B's Cache space. Capacity per line: 80 characters, a0h=160b cache space.
d) color attribute byte: