flat assembler
Message board for the users of flat assembler.
  
|  Index
      > DOS > The Clear Screen function | 
| Author | 
 | 
| neville 26 Jul 2014, 03:11 Homework?
 Video mode 3 assumed? 00h isn't "no character", it's the null character. Probably better to use 20h, the space character. Note: Mode 3 VRAM segment = B800h, linear RAM = B8000h BIOS Int 10h - what function? AH=0Eh TTY output? This function automatically advances the cursor, which might explain your symptoms. Cursor can be controlled with Int 10h, function AH=02 Use Int 10h, function AH=09 if you want to control the cursor yourself. _________________ FAMOS - the first memory operating system | |||
|  26 Jul 2014, 03:11 | 
 | 
| StrenoJr 26 Jul 2014, 15:29 It is not a homework.
 I know that with the space and null, but null did work too. It is just easier to xor the al register. I forgot that I used ah=09. With the function above I just mvoed the cursor to the upper left corner to [0,0]. The problem is that it ended at [1,0]. *Sorry, sometimes I just don't know express myself correctly. *The link for your OS doesn't work. | |||
|  26 Jul 2014, 15:29 | 
 | 
| Fixit 26 Jul 2014, 20:23 Here a two ways of clearing the screen.
 start: push ax push es mov ax,0b800h ; Start at memory 0b800 mov es,ax xor di,di mov cx,2000 ; mov ax,0720h ; Black bg, white fg, 20h = space char rep stosw pop ax pop es -------------------------------- mov ax,@data mov ds,ax mov ah,0fh int 10h mov ah,0 int 10h mov ax,1112 mov bx,0 int 10h | |||
|  26 Jul 2014, 20:23 | 
 | 
| StrenoJr 27 Jul 2014, 16:31 That's a core component!
 Thanks, solved. | |||
|  27 Jul 2014, 16:31 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.