8086 window size is 40x25 char but can contains 1024 char?

Viewed 142

I set the video mode to AL=00h , it's a text mode with 40x25 char , 16 colors , and 8 pages.

40x25 should mean printing 1000 character will make the screen full of the character, but to my surprise it doesn't , i need to print 1024 character to make the screen full of the character .

But why ? can someone explain this to me ? why does 40x25 char screen contains 1024 character ?

Edit : After posting this question , i do some testing and found something interesting , to fill first line with character , i need to print 40 times , to fill 2nd line , i need to print 81 times , to fill 3rd line , i need to print 122 time , to fill 4th line , i need to print 163 time , why do i need to print extra 1 time for every new line ?

Edit 2 : i counted the character on screen manually like a mad man , there is exactly 1000 character , but i printed 1024 times , where did the other 24 character go ?!?1

here are my code

ORG 100h  
mov ah,00h   ; ah=00 mode
mov al,00   ; text mode. 40x25. 16 colors.8 pages
int 10h    
mov ah,09h   ; ah=09 mode
mov bh,00   ; page 0
mov al,'A'  ; character to display
mov cx,1024 ; print the character 1024 times
mov bl,1fh  ; high-intensity white on blue
int 10h
RET

1000 character

1024 character

0 Answers
Related