Commodore Amiga A1000 Hardware Reference Manual page 19

Table of Contents

Advertisement

Do not read, write, or use any currently undefined address ranges. The current and future
usage of such areas is reserved by Commodore and is definitely subject to change.
If you are using the system libraries, devices, and resources, you must follow the defined
interface. Assembler programmers (and compiler writers) must enter functions through
the library base jump Tables, with arguments passed as longs and library base address in
A6. Results returned in D0 must be tested, and the contents of D0-D1/A0-A1 must be
assumed gone after a system call.
NOTE
The assembler TAS instruction should not be used in any Amiga program. The TAS
instruction assumes an indivisible read-modify-write but this can be defeated by system
DMA. Instead use BSET and BCLR. These instructions perform a test and set operation
which cannot be interrupted.
TAS is only needed for a multiple CPU system. On a single CPU system, the BSET and
BCLR instructions are identical to TAS, as the 68000 does not interrupt instructions in the
middle. BSET and BCLR first test, then set bits.
Do not use assembler instructions which are privileged on any 68000 family processor,
most notably MOVE SR,<ea> which is privileged on the 68010/20/30. Use the Exec
function GetCC() instead of MOVE SR, or use the appropriate non-privileged instruction as
shown below:
CPU
68000
68010/20/30
All addresses must be 32 bits. Do not use the upper 8 bits for other data, and do not use
signed variables or signed math for addresses. Do not execute code on your stack or use
self-modifying code since such code can be defeated by the caching capabilities of some
68xxx processors. And never use processor or clock speed dependent software loops for
timing delays. See Appendix F for information on using an 8520 timer for delays.
NOTE
When strobing any register which responds to either a read or a write, (for example
copjmp2) be sure to use a MOVE.W #$00, not CLR.W. The CLR instruction causes a read
and a clear (two accesses) on a 68000, but only a single access on 68020 and above. This
will give different results on different processors.
If you are programming at the hardware level, you must follow hardware interfacing
specifications. All hardware is NOT the same. Do not assume that low level hacks for
speed or copy protection will work on all drives, or all keyboards, or all systems, or future
systems. Test your software on many different systems, with different processors, OS,
hardware, and RAM configurations.
User Mode
MOVE SR,<ea>
MOVE CCR,<ea>
- 10 Introduction -
Super Mode
MOVE SR,<ea>
MOVE SR,<ea>

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Amiga a500Amiga a2000

Table of Contents