8086 assembly on specified page, specified row, specified column, specified color, output specified character (80*25)

Source: Internet
Author: User

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:




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.