How to clear screen in Gforth Dos 
Author Message
 How to clear screen in Gforth Dos

I am using the dos executable of Gforth-0.4.0 in a Ms-DOS window in
windows 95, but the supplied word for 'page' which is supposed to
clear the screen only mangaes to put garbage on the screen. I think it
an other screen commands use the 'ESC[' word which emits a esc
sequence, but it only puts garbatge on the screen.

Can anyone suggest an alternate definition for page and at-xy ?



Sat, 07 Aug 2004 13:24:39 GMT  
 How to clear screen in Gforth Dos


Quote:
>I am using the dos executable of Gforth-0.4.0 in a Ms-DOS window in
>windows 95, but the supplied word for 'page' which is supposed to
>clear the screen only mangaes to put garbage on the screen. I think it
>an other screen commands use the 'ESC[' word which emits a esc
>sequence, but it only puts garbatge on the screen.

AFAIK you need to put ANSI.SYS in your CONFIG.SYS for the escape
sequences to work.

- anton
--
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html



Sat, 07 Aug 2004 16:30:28 GMT  
 How to clear screen in Gforth Dos

Quote:



>>I am using the dos executable of Gforth-0.4.0 in a Ms-DOS window in
>>windows 95, but the supplied word for 'page' which is supposed to
>>clear the screen only mangaes to put garbage on the screen. I think it
>>an other screen commands use the 'ESC[' word which emits a esc
>>sequence, but it only puts garbatge on the screen.

>AFAIK you need to put ANSI.SYS in your CONFIG.SYS for the escape
>sequences to work.

Of course, the trouble is that few people in 2002 have ANSI.SYS
installed.

Try

MOV     AH,0FH
INT     10h
XOR     AH,AH
INT     10h

The first int 10h gets the current video mode in AL; the second one
sets the current video mode to the one in AL.

If you know in advance that the video mode is 3 (80x25 color), you can
just:

mov ax,3
int 10h



Sun, 08 Aug 2004 03:13:40 GMT  
 How to clear screen in Gforth Dos

[ clear screen without using ANSI.SYS ]

Quote:
> MOV     AH,0FH
> INT     10h

Learning something new everyday. You mean, Gforth 0.5.0 runs in 16-bit mode
on DOS? Even if it comes with a DOS extender (GO32?) I'd have expected this
to cause trouble.

-marcel



Sun, 08 Aug 2004 05:33:01 GMT  
 How to clear screen in Gforth Dos
Thank you very much. I'll try it tomorrow.

Leland



Sun, 08 Aug 2004 06:58:27 GMT  
 How to clear screen in Gforth Dos
To tell the truth, I haven't tried using it on my Dos Box. I
downloaded the 0.4.0 dos executable-only package, since it fit on a
floppy, and have been using it in a MS-Dos window in Windoze. It does
have a 32-bit cell size, but I don't know if it is running in 16-bit
mode or not since, again, I haven't tried it in pure DOS.
Quote:


> [ clear screen without using ANSI.SYS ]

> > MOV     AH,0FH
> > INT     10h

> Learning something new everyday. You mean, Gforth 0.5.0 runs in 16-bit mode
> on DOS? Even if it comes with a DOS extender (GO32?) I'd have expected this
> to cause trouble.

> -marcel



Sun, 08 Aug 2004 13:23:33 GMT  
 How to clear screen in Gforth Dos
In case I'm feeling lazy or rushed, how can I incorporate that into a
colon definition? I have never gotten around to using CODE yet and am
not sure if I am supposed to enter mnemonics or Hex Codes.

Thanks again for your attention.

Leland Williams

Quote:





> >>I am using the dos executable of Gforth-0.4.0 in a Ms-DOS window in
> >>windows 95, but the supplied word for 'page' which is supposed to
> >>clear the screen only mangaes to put garbage on the screen. I think it
> >>an other screen commands use the 'ESC[' word which emits a esc
> >>sequence, but it only puts garbatge on the screen.

> >AFAIK you need to put ANSI.SYS in your CONFIG.SYS for the escape
> >sequences to work.

> Of course, the trouble is that few people in 2002 have ANSI.SYS
> installed.

> Try

> MOV     AH,0FH
> INT     10h
> XOR     AH,AH
> INT     10h

> The first int 10h gets the current video mode in AL; the second one
> sets the current video mode to the one in AL.

> If you know in advance that the video mode is 3 (80x25 color), you can
> just:

> mov ax,3
> int 10h



Sun, 08 Aug 2004 13:30:47 GMT  
 How to clear screen in Gforth Dos


Quote:
> I am using the dos executable of Gforth-0.4.0 in a Ms-DOS window in
> windows 95, but the supplied word for 'page' which is supposed to
> clear the screen only mangaes to put garbage on the screen. I think it
> an other screen commands use the 'ESC[' word which emits a esc
> sequence, but it only puts garbatge on the screen.

> Can anyone suggest an alternate definition for page and at-xy ?

    Assuming that GForth is a simple Win32 console program, all you need to
do is load an ANSI console drive (either in the DOS box before launching
GForth or in AUTOEXEC.BAT or CONFIG.SYS).

--

-GJC

-War is the last resort of the incompetent.



Sun, 08 Aug 2004 14:52:45 GMT  
 How to clear screen in Gforth Dos


Quote:


> [ clear screen without using ANSI.SYS ]

> > MOV     AH,0FH
> > INT     10h

> Learning something new everyday. You mean, Gforth 0.5.0 runs in 16-bit
mode
> on DOS? Even if it comes with a DOS extender (GO32?) I'd have expected
this
> to cause trouble.

    This code is the same in either 16 bit or 32 bit segments.  If it is in
a 32 bit segment, the assembler has to add override opcodes to force 16 bit
processing.  Regardless, the DOS function still takes the same parameters
and the source code looks the same.

--

-GJC

-War is the last resort of the incompetent.



Sun, 08 Aug 2004 15:09:15 GMT  
 How to clear screen in Gforth Dos

Quote:



[..]
> > Can anyone suggest an alternate definition for page and at-xy ?

>     Assuming that GForth is a simple Win32 console program, all you need to
> do is load an ANSI console drive (either in the DOS box before launching
> GForth or in AUTOEXEC.BAT or CONFIG.SYS).

Won't work on NT4 or W2K, unless 'an ANSI console driver' is a recent
development, specifically for these OS's.

-marcel



Sun, 08 Aug 2004 16:16:16 GMT  
 How to clear screen in Gforth Dos
I'm sorry, but I can't figure out what AFAIK stands for.
Quote:



> >I am using the dos executable of Gforth-0.4.0 in a Ms-DOS window in
> >windows 95, but the supplied word for 'page' which is supposed to
> >clear the screen only mangaes to put garbage on the screen. I think it
> >an other screen commands use the 'ESC[' word which emits a esc
> >sequence, but it only puts garbatge on the screen.

> AFAIK you need to put ANSI.SYS in your CONFIG.SYS for the escape
> sequences to work.

> - anton



Tue, 17 Aug 2004 14:13:35 GMT  
 How to clear screen in Gforth Dos

Quote:




>  [..]
> > > Can anyone suggest an alternate definition for page and at-xy ?

> >     Assuming that GForth is a simple Win32 console program, all you need to
> > do is load an ANSI console drive (either in the DOS box before launching
> > GForth or in AUTOEXEC.BAT or CONFIG.SYS).

> Won't work on NT4 or W2K, unless 'an ANSI console driver' is a recent
> development, specifically for these OS's.

> -marcel

Hey, ansi works! Thanks Anton !

marcel, the computer at work has an out of the box Windows 98 OS, and
it has ANSI.SYS. I don't know how NT$ or W2K work, but see if they
have a Dos Mode option, and put a device= to the file in the
config.sys box.



Tue, 17 Aug 2004 14:16:54 GMT  
 How to clear screen in Gforth Dos

Quote:

> I'm sorry, but I can't figure out what AFAIK stands for.




> > >I am using the dos executable of Gforth-0.4.0 in a Ms-DOS window in
> > >windows 95, but the supplied word for 'page' which is supposed to
> > >clear the screen only mangaes to put garbage on the screen. I think it
> > >an other screen commands use the 'ESC[' word which emits a esc
> > >sequence, but it only puts garbatge on the screen.

> > AFAIK you need to put ANSI.SYS in your CONFIG.SYS for the escape
> > sequences to work.

> > - anton

AFAIK: as far as I know. (Read that any way you like.)

Jerry
--
Engineering is the art of making what you want from things you can get.
-----------------------------------------------------------------------



Tue, 17 Aug 2004 23:43:43 GMT  
 How to clear screen in Gforth Dos

Quote:

> I'm sorry, but I can't figure out what AFAIK stands for.




> > >I am using the dos executable of Gforth-0.4.0 in a Ms-DOS window in
> > >windows 95, but the supplied word for 'page' which is supposed to
> > >clear the screen only mangaes to put garbage on the screen. I think it
> > >an other screen commands use the 'ESC[' word which emits a esc
> > >sequence, but it only puts garbatge on the screen.

> > AFAIK you need to put ANSI.SYS in your CONFIG.SYS for the escape
> > sequences to work.

> > - anton

AFAIK: as far as I know. (Read that any way you like.)
http://users.erols.com/jyavins/acronyms.html

Jerry
--
Engineering is the art of making what you want from things you can get.
-----------------------------------------------------------------------



Wed, 18 Aug 2004 00:32:39 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. Can Python clear a DOS screen?

2. Subroutine to clear the screen in DOS

3. Screen Editor for gforth?

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

5. DOS Box/Full screen from DOS app in Windows

6. CRC-32 native code for DOS GForth 0.5.0

7. EKEY in gforth in DOS

8. Small bug in GForth.050 for DOS

9. Compiling Gforth for DOS; long

10. GForth for DOS -- HTML documentation

11. Low-Level I/O Primitives for GFORTH (for DOS)

12. Gforth, DOS and Win32 ports, Call for Volunteers

 

 
Powered by phpBB® Forum Software