home *** CD-ROM | disk | FTP | other *** search
- If you are using the Aztec 3.40 compiler, don't compile the example
- programs in this directory. Rather, use the lattice ones and link
- with the libraries in NewAztecLib.
-
- If you are using an earlier Aztec compiler:
-
- Because of different register passing conventions, a little extra
- work is involved in getting Aztec modules to run.
-
- Aztec doesn't obey the Amiga register trashing conventions. Normally,
- this is no problem since an Aztec program only calls Aztec routines, and
- things are set straight when system calls are made.
-
- But with a SoundScape module, we run into an interesting problem:
- You provide routines that SoundScape calls. SoundScape assumes that
- your routine will only trash register D0, D1, A0, and A1. However,
- Aztec considers A6 and D3 to be scratch registers. In addition, Aztec
- needs A4 loaded with its Data Segment pointer.
-
- So, there are two routines your Aztec code needs to call. On entering
- an Aztec function that is called by SoundScape, call `enteraztec()'.
- This saves several registers on the stack and loads A4 with the proper
- pointer. When leaving your routine, call `leaveaztec'. This reloads
- the saved registers from the stack.
-
- These routines are in the file `aztec.asm'. The assembled code is
- `aztec.o'.
-
- Use these routines entering and leaving your opencode, closecode,
- outcode, and editcode routines. In addition, if you use FunctionCall,
- you'll need to stick these in the function that is called (since
- it ends up being called by another process.)
-
- By the way, this comes in handy anytime you are writing
- code that gets called by the system. For example, if you are writing
- an interrupt handler, you run into the same issues, which these
- routines will fix.
-
- Good luck!
-
- Todor
-