-
Video memory
I want to print the text directly to the video memory. So what I need is es:di where di points to the offset of the video memory where I want to print the character. How's is it organized? Is it some sort of linear address? How would I calculate the address if I know the column and the row number I want to print on?
-
I do not know if it's exacly what you want but here is one part of a code for video that I found in a old asm project for school that I have made.
Code:
PTAMPON PROC
PUSH AX
PUSH CX
PUSH DI
MOV SI, 0
MOV AX, 0B800h
MOV ES, AX
MOV AL, BYTE PTR TAMPON[SI] ; string to show here!!!!
MOV AH, 0f3h ; color here!!!!
MOV DI, 1940d ; x_yposition here!!!!!
Encore: INC SI
MOV WORD PTR[ES]: DI, AX ; copie dans l'‚cran vid‚o
INC DI ; next char
INC DI ;Next char
MOV AL, BYTE PTR TAMPON[SI]
CMP AL, '$' ; end?
JNE Encore ; not = redo
FINTAMPON:
POP DI
POP CX
POP AX
RET
ENDP
-
look at simple OS's like linux 0.1 and check out the forums at www.mega-tokyo.com/forum/
-