GForth: Can I access vga video memory directly? 
Author Message
 GForth: Can I access vga video memory directly?

I have downloaded gforth (v. 0.3 msdos binary only) yesterday.
My goal is to program a 3D graphics library based on
simtelnet/msdos/graphics/3DGPL.
But the archive I've got from ftp.complang.tuwien.ac.at/pub/forth/gforth
did not contains any doc, not even a readme file. Ok, I have the ANSI
documentation but I don't know if gforth have implemented special words
for my environment (DOS under DPMI as I can see) like for accessing IO
ports. I could download the source and try to figure out the answers to
my questions by myself but it would be too much time consumming.

I have try:
(*
hex
0 100 dump
*)
I was expecting to see Real mode interrupt vectors address but it have given
an #address error , so I see I don't have full access to the memory.

I have also try :
(*
hex
b8000 100 dump
*)

I was expecting that I was in a 4 Gbyte default to 32 bits segment beginning
at 0 with no paging giving me what is at b800:0 under real mode, i.e.
current vga video memory and see something like
b8000  20 07 20 07 20 07 etc
but I've got
b8000 00 00 00 00 00 00 instead


Question? 2) Is there words defined for IO ports access?
  If not my guess is I could program a word in hexadecimal assembler
  to do this but I am not sure how.

Question? 3) Does it exist a small doc file without downloading all the
 source code.

By the way...
Question? 4) Is gforth programmed in C?

Net-Tamer V 1.08X - Test Drive



Mon, 03 Jan 2000 03:00:00 GMT  
 GForth: Can I access vga video memory directly?

Quote:
>I have downloaded gforth (v. 0.3 msdos binary only) yesterday.
>My goal is to program a 3D graphics library based on
>simtelnet/msdos/graphics/3DGPL.
>But the archive I've got from ftp.complang.tuwien.ac.at/pub/forth/gforth
>did not contains any doc, not even a readme file. Ok, I have the ANSI

get the source from a GNU mirror. There is a texinfo doc, and a HTML can
be generated. However, you'll need: tar, gzip to decompress it

Note also that the doc is not complete, but it doesn't miss a lot



Mon, 03 Jan 2000 03:00:00 GMT  
 GForth: Can I access vga video memory directly?

Quote:

> I have downloaded gforth (v. 0.3 msdos binary only) yesterday.
> My goal is to program a 3D graphics library based on
> simtelnet/msdos/graphics/3DGPL.
> But the archive I've got from ftp.complang.tuwien.ac.at/pub/forth/gforth
> did not contains any doc, not even a readme file. Ok, I have the ANSI
> documentation but I don't know if gforth have implemented special words
> for my environment (DOS under DPMI as I can see) like for accessing IO
> ports. I could download the source and try to figure out the answers to
> my questions by myself but it would be too much time consumming.

[...]

Quote:
> Question? 3) Does it exist a small doc file without downloading all the
>  source code.

The GForth manual is available online at

        http://www.informatik.tu-muenchen.de/~paysan/html/gforth_toc.html

Quote:
> By the way...
> Question? 4) Is gforth programmed in C?

The GForth engine is written in C using GNU extensions (that means you
have to build it with gcc, the GNU C compiler).  For details of the
implementation take a look at

        http://www.complang.tuwien.ac.at/papers/ertl93.ps.Z

You will need a decompression program such as WinZip and Ghostview
(another GNU program) to view the postscript.

If you write something useful please share it with other GForth users.

--
Eric Marsden

It's elephants all the way down.



Mon, 03 Jan 2000 03:00:00 GMT  
 GForth: Can I access vga video memory directly?

Quote:


> > I have downloaded gforth (v. 0.3 msdos binary only) yesterday.
> > My goal is to program a 3D graphics library based on
> > simtelnet/msdos/graphics/3DGPL.
> > But the archive I've got from ftp.complang.tuwien.ac.at/pub/forth/gforth
> > did not contains any doc, not even a readme file. Ok, I have the ANSI
> > documentation but I don't know if gforth have implemented special words
> > for my environment (DOS under DPMI as I can see) like for accessing IO
> > ports. I could download the source and try to figure out the answers to
> > my questions by myself but it would be too much time consumming.

The binonly packages must be combined with the corresponding source
package to make a complete binary package. They are meant for those
people who have trouble downloading the binary packages; they can get
the (smaller) binonly package from www.complang.tuwien.ac.at and the
source package from their local GNU mirror, and combine them.

The source package and the binary packages do contain documentation.

Quote:
> > By the way...
> > Question? 4) Is gforth programmed in C?

> The GForth engine is written in C using GNU extensions (that means you
> have to build it with gcc, the GNU C compiler).  For details of the
> implementation take a look at

>    http://www.complang.tuwien.ac.at/papers/ertl93.ps.Z

I have integrated this paper into the Gforth documentation (chapter
"Engine").

- anton
--
M. Anton Ertl                    Some things have to be seen to be believed

http://www.complang.tuwien.ac.at/anton/home.html



Mon, 03 Jan 2000 03:00:00 GMT  
 GForth: Can I access vga video memory directly?

They access the virtual memory DPMI gives to a 32 bit application. If
you want to do MS-DOS specific things, get the documentation for GO32,
which is used as DOS extender. You need to change the sources, since the
used GO32 version (2.0) needs some C code to access the DPMI interface.
GO32 definitely allows you to access VGA video memory, since Quake uses
it as DOS extender, too.

--
Bernd Paysan
"Late answers are wrong answers!"
http://www.informatik.tu-muenchen.de/~paysan/



Mon, 03 Jan 2000 03:00:00 GMT  
 GForth: Can I access vga video memory directly?

Quote:
Bernd writes:
> GO32 definitely allows you to access VGA video memory, since Quake uses
> it as DOS extender, too.


-marcel
http://www.IAEhv.nl/users/mhx



Wed, 05 Jan 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Help writing directly to video memory

2. Question about changing a pixel by directly writing to video memory

3. Directly accessing video and keyboard.

4. Accessing Physical Memory Directly

5. Can Tcl directly access PCI memory space?

6. Direct video memory access

7. VIDEO MEMORY ACCESS WITH POINTERS

8. Accessing linear video memory in Win 9x??

9. Video Buffer access in Flat Memory Model

10. Access The Video memory

11. Video Memory Access

12. HOW to access video memory under WINDOWS 3.1

 

 
Powered by phpBB® Forum Software