hansel%amy@usc.edu (Steve Hansel) (09/03/89)
I am trying to learn how to write a handler. Currently I am trying to compile the NULL: handler that was posted to comp.sources.amiga a few months (years?) ago. Since this program was originally compiled with Manx and I am using Lattice 5.02, I had to change some of the #include statements. When I try to send output to my: (my version of null:) I meet the Guru instantly. These are the commands that I am using to compile the code: lc -cu -b0 -v -M myhandle misc blink with myhandle.lnk copy myhandle l:my-handler ===================== begin myhandle.lnk ================ FROM "myhandle.o"+"misc.o" TO "myhandle" LIB LIB:lcnb.lib LIB:amiga.lib BATCH ===================== end myhandle.lnk ================== Here is the mountlist entry that I am using: my: Handler = L:my-handler Stacksize = 500 Priority = 5 GlobVec = 1 # The entry point of the handler is called _main. Am I using the correct compiler options, libraries, etc? Does anyone have any advise on handlers or how to debug them? Thanks in advance. Steve Hansel usc.edu!amy!hansel gryphon.com!amy!hansel
walker@sas.UUCP (Doug Walker) (09/05/89)
In article <678@amy.uucp> hansel%amy@usc.edu (Steve Hansel) writes: >I am trying to learn how to write a handler. Currently I am trying to >compile the NULL: handler that was posted to comp.sources.amiga a few >months (years?) ago. Since this program was originally compiled with >Manx and I am using Lattice 5.02, I had to change some of the #include >statements. When I try to send output to my: (my version of null:) I >meet the Guru instantly. Why don't you use one of the Software Distillery's handlers? Source code to a complete AmigaDOS 1.2-format floppy handler is available on BIX, from us directly, or probably lots of other places by now. I have submitted postings to comp.binaries.amiga and comp.sources.amiga before which dropped off the face of the earth, so try to get them from other sources... Anyway, the SD handlers all compile under Lattice (of course) and are layered to be mostly portable across devices - for a NULL: handler you would just delete about 50% of the code, write about 5%, and be done with it. --Doug