• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

640x480x256 mode

How do you clear the screen QUICKLY in mode 101h?
  • 4
1 Solution
VIBESPROAuthor Commented:
I konow how to clear the screen fairly quick in 101h mode but it is not quick enough.  I use the 'fillcar' procedure in turbo pascal to clear the screen. It works, granted, but it does not fill in three lines and you can actually see it drawing over to the new colour.
you can use this (this is part of my VESA256 unit :)
try http://www.multimania.com/tothpaul/

Procedure ClearScreen; assembler;
  mov ax,GetMaxX { 640 }
  mul GetMaxY { 480 }

  mov  cx,ax   { si:cx = Total Pixels Count }
  mov  ax,dx
  mul  BankSize { 64K }
  mov  si,ax

  mov es,VesaSeg { from INT 10h AX=4F01h)

  cmp si,LastBank { local var }
  je  @NoChange
   mov LastBank,si
   mov  dx,si
   mov  bx,VesaWin { 0 or 1 }
   call VesaBnk { from INT 10h AX=4F01h : Bank switch func }
  xor ax,ax
  xor di,di

  shr cx,1
  jnc @Pair
   rep stosw

  dec cx { = $FFFF }
  sub  si,BankSize
 jns @NextBank

VIBESPROAuthor Commented:

I see he know how to help me but I still don't understand ASM as yet.  I tried to use it but it still does not work.  Could you send me a small sample program, which uses your clear screen procedure, in PASCAL instead.  If you are not able to then send me it, documented, to my E-Mail address:

VIBESPROAuthor Commented:
Still waiting for your response, TOTHPAUL.
VIBESPROAuthor Commented:
Hey, TOTHPAUL I found your VESA unit.
Thank You.


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now