I'm trying to send some characters to page 1 of text mode by its memory address, but I find no suitable result, I calculated the page 1 address like this "0B800h + 1000h = 0C800h".
This is my code:
IDEAL
MODEL small
STACK 256
DATASEG
exCode DB 0
x_var db 219
CODESEG
Start:
mov ax, @data ; Initialize DS to address
mov ds, ax ; of data segment
; Page 1
mov ax, 0501h
int 10h
;Page 1 buffer -> es
mov ax, 0C800h
mov es, ax
mov si, offset x_var
mov di, (10*80*2)+(10*2)
cld
lodsb
stosb
; wait for any key press:
mov ah, 0
int 16h
;Page 0 again
mov ax, 0500h
int 10h
Exit:
mov ah, 04Ch ; DOS function: Exit program
mov al, [exCode] ; Return exit code value
int 21h ; Call DOS. Terminate program
END Start ; End of program / entry point