Enforcer Help
Can anyone help with a problem I am having?
I have an A1200 with an M1230 XA accelerator. Since this has an MMU I have
been using enforcer and mungwall to check some of my old programs. One of them
causes an error. I have deleted parts until I found the offending piece of code
but now I am stumped because I do not understand what enforcer is telling me.
All the code does is open then close the dos library. The full program has no
startup code and I have kept this the same. The saveds keyword seems to be
causing the problem. Here is the code and subsequent enforcer output.
Hope someone can help and thanks in advance.
Nev.
#include <proto/dos.h> #include <proto/exec.h> #include <exec/types.h>
/*#include <exec/memory.h>*/
#define DOSVER 37L
void __saveds main(void) {
struct DosLibrary *DOSBase = NULL;
if (!(DOSBase = (struct DosLibrary
*)OpenLibrary("dos.library",DOSVER)))
{
;
}
if (DOSBase)
CloseLibrary((struct Library *)DOSBase); }
This is compiled with no startup code.(SAS 6) The enforcer mungwall combination
gave the following output:
Program Counter (approximate)= 8106B04 Fault address = 0 User
stack pointer = 810E4C4 DOS process address = 810FFD8 Data: 0810E4BC
02041ABF 00003E80 0811141C 00000001 00000001 0204466B 08106AFC Addr: 0811141C
0810A650 0800BD0C 08106AFC 0810E4C8 00F96460 00F96454 001FFFA0 Stck: 00F96C8C
00003E80 081109CC BBBBBBBB BBBBBBBB BBBBBBBB BBBBBBBB BBBBBBBB READ-LONG
(—)(-)(-) SR=0008 SSW=0749 Shell Process, "dire", Hunk #0, Offset $4
I have found that it is the saveds keyword that is causing the enforcer hit.
Can anyone tell me why? The program will not work properly without saveds.