Sie sind auf Seite 1von 5

" 5 1 "

'
TEXT
ASCII , 80 ( ) \ . . . " .(BH " ( .( 16KB \ KB ? ) ) ) ASCII : ) Attributes . .

1
(Video memory)

:'
. , 2 ,

TEXT

,(B800:0000) B8000H .B8000H ( 256 ) (Bytes . , 320X200 video buffer

25 X

,ASCII .( ) . . .2 .1

. ___________________ ? TEXT ( :
Attribute+Character Character and Attribute for row 1, col 1 Character and Attribute for row 1, col 2 Character and Attribute for row 2, col 1 Character and Attribute for row 25, col 80 _________________________________________________________________ ?(

. _________ ? Video Buffer (effective address) offset

) .3

X=col. Y=row

Segment: Offset Char. Attr. B800:0000 B800:0001

) Hi!

.4

_______________________________________________________________________

"

2:41 04/03/10

F:\BI\Micro_Asm\B2010\lab1_Part_b_2010b.doc

" 5 2 "

Attribute Byte
byte ASCII 2 bytes video buffer bytebits .( bit setting
MSB

."attribute byte" ,(foreground) )

attribute byte

,(background) bit 5 4 3 2 1

LSB

7
(normal foreground) (blinking/Bold) background foreground Bold /

0 X X X X X X X 1 X X X X X X X X b b b X X X X X X X X X f f f

X X X X B X X X

DEBUG
(... ) : / ( ) DEBUG Window ( ) RUN DEBUG DEBUG . (START HEX MS-DOS

:'

DEBUG 8086 .

R D E trace T G A U ? )

"

2:41 04/03/10

F:\BI\Micro_Asm\B2010\lab1_Part_b_2010b.doc

" 5 3 "

'
.

1
:
DX

.1
R
IP DS

-r
AX BX CX

.B800h r ds DS 0AF8 :b800 . . DEBUGGER

DS

R E :

.2

-e 400 B800:0400 20.41


.

07.70 07.25 20.42 07.52 20.43 07.C2

e 640 B800:0640 20.41

. . _______________________________________________________________________ _______________________________________________________________________ .DEBUG .( PC ."DOS" a 100 ) ABCEF INT 20 .Little endian .g ,(100Hex) IP " .

"

2:41 04/03/10

F:\BI\Micro_Asm\B2010\lab1_Part_b_2010b.doc

" 5 4 http://my.execpc.com/~geezer/osd/cons/index.htm "

Text output without the BIOS


Text displayed on the screen is stored in a framebuffer. The location of the framebuffer in memory depends on whether the VGA board is set for monochrome or color emulation: emulation color framebuffer linear address B8000h framebuffer real-mode address B800h:0000 B000h:0000 I/O address of CRTC 3D4h 3B4h

monochrome B0000h

Usually, the board is set for color emulation. The CRTC is a functional unit of the VGA, and is discussed below. Each character in the framebuffer takes 2 bytes: an ASCII value at address N, and an attribute byte at address N+1: bit in attribute byte b7 blink b6:b4 b3:b0 usage

background color (0-7) foreground color (0-15)

color value color color value color 0 black 8 dark gray 1 2 3 4 5 6 7 blue green cyan red brown white 9 10 11 12 14 15 bright blue bright green bright cyan pink bright magenta yellow bright white

magenta 13

"

2:41 04/03/10

F:\BI\Micro_Asm\B2010\lab1_Part_b_2010b.doc

" 5 5
http://en.wikipedia.org/wiki/Little-endian

"

Big-endian

With 8-bit atomic element size and 1-byte (octet) address increment: increasing addresses

... 0x0A 0x0B 0x0C 0x0D ...

The most significant byte (MSB) value, which is 0x0A in our example, is stored at the memory location with the lowest address, the next byte value in significance, 0x0B, is stored at the following memory location and so on. This is akin to Left-to-Right reading order in hexadecimal.

With 16-bit atomic element size: increasing addresses

... 0x0A0B 0x0C0D ...

The most significant atomic element stores now the value 0x0A0B, followed by 0x0C0D. ] Little-endianedit[

With 8-bit atomic element size and 1-byte (octet) address increment: increasing addresses

... 0x0D 0x0C 0x0B 0x0A ...

The least significant byte (LSB) value, 0x0D, is at the lowest address. The other bytes follow in increasing order of significance.

With 16-bit atomic element size: increasing addresses

... 0x0C0D 0x0A0B ...

The least significant 16-bit unit stores the value 0x0C0D, immediately followed by 0x0A0B

"

2:41 04/03/10

F:\BI\Micro_Asm\B2010\lab1_Part_b_2010b.doc

Das könnte Ihnen auch gefallen