Clr the screen 
Author Message
 Clr the screen

Does anyone know how to simply wipe the screen clear in ASM.
Im programing a simple text based game in Pascal and the ClrScr function
when used in quick succession creates a gross flicker effect.
I'm sure ASM can clear the screen very quicky to eliminate the problem.
I know nothing of ASM, so could some one write me a simple routine or
point me somewhere where i could find one.

Byron Bussey



Sun, 14 Jul 2002 03:00:00 GMT  
 Clr the screen
I think the following would work(I am not sure though)

I think the TASM built into TP5-7 only recognizes hex numbers in form:
       0ADh

procedure Wipeit; assembler;
asm
  mov ax,0B800h;
  mov es,ax;
  mov di,0;
  mov cx,07D0h;
  mov ax,0;
  rep stosw;
end;

Quote:
> Thanks for the help. However I have incured another problem.
> Pascal says that B800h is undefined. Do I have to declare it as
> a data type? This is what I have now

> procedure Wipeit; assembler;
> asm
>  mov ax,B800h;
>  mov es,ax;
>  mov di,0;
>  mov cx,7D0h;
>  mov ax,0;
>  rep stosw;
> end;

> Anyone??


> > This will clear the screen (blacking it out):

> > mov ax,B800h
> > mov es,ax
> > mov di,0
> > mov cx,7D0h
> > mov ax,0
> > rep stosw

> > Tom


> > >Does anyone know how to simply wipe the screen clear in ASM.
> > >Im programing a simple text based game in Pascal and the ClrScr
function
> > >when used in quick succession creates a gross flicker effect.
> > >I'm sure ASM can clear the screen very quicky to eliminate the problem.
> > >I know nothing of ASM, so could some one write me a simple routine or
> > >point me somewhere where i could find one.

> > >Byron Bussey



Sun, 14 Jul 2002 03:00:00 GMT  
 Clr the screen
This will clear the screen (blacking it out):

mov ax,B800h
mov es,ax
mov di,0
mov cx,7D0h
mov ax,0
rep stosw

Tom

Quote:

>Does anyone know how to simply wipe the screen clear in ASM.
>Im programing a simple text based game in Pascal and the ClrScr function
>when used in quick succession creates a gross flicker effect.
>I'm sure ASM can clear the screen very quicky to eliminate the problem.
>I know nothing of ASM, so could some one write me a simple routine or
>point me somewhere where i could find one.

>Byron Bussey



Mon, 15 Jul 2002 03:00:00 GMT  
 Clr the screen
Thanks for the help. However I have incured another problem.
Pascal says that B800h is undefined. Do I have to declare it as
a data type? This is what I have now

procedure Wipeit; assembler;
asm
 mov ax,B800h;
 mov es,ax;
 mov di,0;
 mov cx,7D0h;
 mov ax,0;
 rep stosw;
end;

Anyone??

Quote:

> This will clear the screen (blacking it out):

> mov ax,B800h
> mov es,ax
> mov di,0
> mov cx,7D0h
> mov ax,0
> rep stosw

> Tom


> >Does anyone know how to simply wipe the screen clear in ASM.
> >Im programing a simple text based game in Pascal and the ClrScr function
> >when used in quick succession creates a gross flicker effect.
> >I'm sure ASM can clear the screen very quicky to eliminate the problem.
> >I know nothing of ASM, so could some one write me a simple routine or
> >point me somewhere where i could find one.

> >Byron Bussey



Mon, 15 Jul 2002 03:00:00 GMT  
 Clr the screen
Quote:
----- Original Message -----

Newsgroups: alt.lang.asm
Sent: Thursday, January 27, 2000 4:01 AM
Subject: Re: Clr the screen

> Thanks for the help. However I have incured another problem.
> Pascal says that B800h is undefined. Do I have to declare it as
> a data type? This is what I have now

> procedure Wipeit; assembler;
> asm
>  mov ax,B800h;
>  mov es,ax;
>  mov di,0;
>  mov cx,7D0h;
>  mov ax,0;
>  rep stosw;
> end;

> Anyone??

Pascal wants a $ in front of all hex constants
so it would be:
procedure wipeit; assembler;
    mov ax, $B800
    mov es, ax
    mov di, 0
    mov cx, $7D0
    mov ax, 0
    rep stosw
end;

Good luck with the program, if you have anymore problems, reply to this or


> > This will clear the screen (blacking it out):

> > mov ax,B800h
> > mov es,ax
> > mov di,0
> > mov cx,7D0h
> > mov ax,0
> > rep stosw

> > Tom


> > >Does anyone know how to simply wipe the screen clear in ASM.
> > >Im programing a simple text based game in Pascal and the ClrScr
function
> > >when used in quick succession creates a gross flicker effect.
> > >I'm sure ASM can clear the screen very quicky to eliminate the problem.
> > >I know nothing of ASM, so could some one write me a simple routine or
> > >point me somewhere where i could find one.

> > >Byron Bussey



Mon, 15 Jul 2002 03:00:00 GMT  
 Clr the screen

Quote:

>Thanks for the help. However I have incured another problem.
>Pascal says that B800h is undefined.

Because it thinks of it as an identifier, not an hexadecimal number.
For it to be understood as a number, you need to put it this way:
0B800h. When an hexadecimal number begins with a letter, you need to
prefix it with a 0.

Manuel Algora



Tue, 16 Jul 2002 03:00:00 GMT  
 Clr the screen
There is another way: you simply reset the screen mode you are
in. For example, if you are in the default 80x25 DOS text mode,
use this:

mov ax,03h
int 10h

Simple, hey?!? To work out other screen modes, look at Ralf
Brown's interrupt list, or go to
http://www.eccentrica.org/Mammon/asmintro.html and look at the
bottom under int 10h.

Let us know how you get on. SliceR (Matt)

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



Sat, 20 Jul 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. DotNet CLR

2. Oberon.NET and CLR

3. Microsoft CLR Scheme

4. Byte.com article on JVM and .NET CLR

5. CLR - Fixed-Length Strings, Type

6. CLR - Object

7. Fortran and Windows .NET Common Language Runtime (CLR)

8. MPF -"Inside the CLR" video

9. ?Folling bios (dos) for screen saver (screen related)??

10. Finding Screen Size to centre top-level window on Screen

11. Putting a pixel on the screen in screen 12 mode using ASM.

12. can one use a text screen and a graphics screen at the same time?

 

 
Powered by phpBB® Forum Software