I scroll up the screen in nasm using into 10,6 to clear it I then want to print
ZeonOS
ReadyFI
How would I get the desired result?
ZeonOS
ReadyFI
Code:
^^at the top left of the cleared section of the screen, what happens in reality is the screen clears but the text appears half way down the cleared section of the screen e.g
--------cleared area start--------------
Zeon
ReadyFI
-------cleared area end------------------
;----------------------------------------------------------------------
; Hello World Operating System
;
; Joel Gompert 2001
;
; Disclaimer: I am not responsible for any results of the use of the contents
; of this file
;----------------------------------------------------------------------
; --------------------------------------------
; Here is the operating system entry point
; --------------------------------------------
begin:
mov ax, cs ; Get the current segment
mov ds, ax ; The data is in this segment
cli ; disable interrupts while changing stack
mov ss, ax ; We'll use this segment for the stack too
mov sp, 0xfffe ; Start the stack at the top of the segment
sti ; Reenable interrupts
mov si, msg ; load address of our message
call zap
call putstr ; print the message
hang:
jmp hang ; just loop forever.
; --------------------------------------------
; data for our program
msg db 'Zeon', 0
stx db 'ReadyFI', 0
; ---------------------------------------------
; Print a null-terminated string on the screen
; ---------------------------------------------
zap:
;Gives you an on-screen button to click on with the mouse, and
;proceeds only when you do!
mov ah,06h ;this calls SCROLL SCREEN UP
mov al,00h ;AL specifies how many lines... 0 just clears the screen
mov ch,00h
mov cl,00h
mov dh,255
mov dl,255
int 10h
retn
putstr:
lodsb ; AL = [DS:SI]
or al, al ; Set zero flag if al=0
jz putstrd ; jump to putstrd if zero flag is set
mov ah, 0x0e ; video function 0Eh (print char)
mov bx, 0x0007 ; color
int 0x10
jmp putstr
putstrd:
retn
How would I get the desired result?