home *** CD-ROM | disk | FTP | other *** search
- #include "exec/types.h"
- #include "exec/execbase.h"
- #include "exec/memory.h"
- #include "libraries/dos.h"
- #include "proto/exec.h"
- #define VECTSIZE (0x400)
-
- struct ExecBase *ExecBase;
- ULONG *OldVects;
- ULONG *NewVects;
-
- extern MoveVects ();
-
- main ()
- {
- ExecBase=(struct ExecBase *)4;
- if ((ExecBase->AttnFlags)&AFB_68010)
- {
- printf ("This Amiga does not have a VBR register.\n");
- exit (RETURN_WARN);
- }
- if (!(NewVects=(ULONG *)AllocMem (VECTSIZE,MEMF_CLEAR|MEMF_PUBLIC|MEMF_FAST)))
- {
- printf ("No fast memory was available.\n");
- exit (RETURN_FAIL);
- }
- if (!MoveVects ())
- {
- FreeMem (NewVects,VECTSIZE);
- printf ("Vectors located at $%lx.\n",OldVects);
- exit (RETURN_FAIL);
- }
- printf ("Vectors moved from $%lx to $%lx.\n",OldVects,NewVects);
- exit (RETURN_OK);
- }
-