[comp.sys.atari.st] v_opnwk

johns@maccs.dcss.mcmaster.ca (Conan the Barbarian) (05/29/90)

	I'm trying to do some GEM programming and I'm having a few problems.
Does anyone else have any experience they can share in doing this?

	Specifically, I'm trying to write metafiles.  The problems I'm 
coming across involves v_opnwk(), v_clswk(), v_opnvwk(), and v_clsvwk().  
Of course I assign workin_in[0] = 31 for metafiles.  

	This is what happens.  When I compile and run the program with 
v_opnvwk(), the handle comes back zero and it crashes when I try to call
v_clsvwk().  When I instead use v_opnwk(), it writes a 68 byte file to disk
called GEMFILE.GEM and then crashes.  I get 2 bombs and it does not come
back from that command.  

	ABACUS GEM Programmer's Reference mentions that v_opnwk() does not
work on the ST and tends to crash.  Is there a reason for this, or is it a
case of I don't know what I'm doing?  

	Thanks for any help.
-- 
John Schmitt
johns@maccs.dcss.mcmaster.ca
...!unet!utai!utgpu!maccs!johns
SCHMITTJ@SCIvax.McMaster.ca

zessel@incas.informatik.uni-kl.de (Holger Zessel AG Nehmer) (06/01/90)

johns@maccs.dcss.mcmaster.ca (Conan the Barbarian) writes:

...
>	Specifically, I'm trying to write metafiles.  The problems I'm 

>	This is what happens.  When I compile and run the program with 
>v_opnvwk(), the handle comes back zero and it crashes when I try to call
>v_clsvwk().  When I instead use v_opnwk(), it writes a 68 byte file to disk
>called GEMFILE.GEM and then crashes.  I get 2 bombs and it does not come
>back from that command.  

I had similar problems too. I noticed that every program writing metafiles
i know of uses the screen too. This lead me to opnvwk the screen and
additionally opnwk the meta device. And this worked for me.
I believe it is not even necessary to keep the virtual device open.
May be that some components of gdos are initialized in that step, but who
knows ?
I posted this 2 months ago but there was no reaction.
Hope this helps...

>John Schmitt
Holger
----------------------------------------------------------------
Holger Zessel, uucp: ...!uunet!unido!uklirb!incas!zessel
	or	zessel@informatik.uni-kl.de
	or	zessel%informatik.uni-kl.de@relay.cs.net (from usa)
Fachbereich Informatik, SFB124-D1
Universitaet Kaiserslautern, West-Germany

johns@maccs.dcss.mcmaster.ca (Conan the Barbarian) (06/04/90)

In article <2661949C.29268@maccs.dcss.mcmaster.ca> johns@maccs.dcss.mcmaster.ca (Conan the Barbarian) writes:
>
>	I'm trying to do some GEM programming and I'm having a few problems.
>Does anyone else have any experience they can share in doing this?
>
>	This is what happens.  When I compile and run the program with 
>v_opnvwk(), the handle comes back zero and it crashes when I try to call
>v_clsvwk().  When I instead use v_opnwk(), it writes a 68 byte file to disk
>called GEMFILE.GEM and then crashes.  I get 2 bombs and it does not come
>back from that command.  
>

	I haven't figured it out yet, but after going through the code 
with a debugger for some hours, I found something that might or might not be
usefull.  

	For some reason or other, the code segment where it crashes, it 
seems to be looking for a pointer at f9ee which turns out to be NULL.  I
don't know why this is, but that is the reason for the bus error.

	What is at f9ee?  Is this something a user program should know? 
Somehow I doubt it.

	Thanks for any input.
-- 
John Schmitt
johns@maccs.dcss.mcmaster.ca
...!unet!utai!utgpu!maccs!johns
SCHMITTJ@SCIvax.McMaster.ca