2.1 General remarks 40 2.1.1 Public data structures 40 2.1.2 The stack 40 2.1.2.1 Determining the stack size 41 2.1.2.2 Switching to a bigger stack 42 2.1.3 System addresses, jumps into ROM, private data structures 44 2.1.4 SetFunction() 45 2.2 Conventions for calling system functions 46 2.2.1 Register A6 46 2.2.2 Registers A0, A1, D0, and D1 47 2.2.3 Results and status flags 47 2.3 Resources and protective protocols 48 2.3.1 Resources: claiming and relinquishing 48 2.3.2 Common resource pairs 49 2.3.3 OpenLibrary() 53 2.3.4 The blitter 53 2.3.5 The audio hardware 54 2.3.6 The audio cut-off filter 55 2.3.7 The battery-backed real-time clock 55 2.3.8 The gameport.device 55 2.3.9 The disk.resource 56 2.3.10 The CIA timers 57 2.4 Types of memory 57 2.4.1 MEMF_CHIP 59 2.4.2 MEMF_FAST 60 2.4.3 MEMF_PUBLIC 60 2.4.4 MEMF_24BITDMA++ 61 2.4.5 MEMF_LOCAL++ 61 2.4.6 KickTag memory 62 2.5 System "constants" 62 2.5.1 NTSC and PAL 62 2.5.2 Screen and window dimensions 63 2.5.3 Keymaps 64 2.5.4 Fonts 64 2.6 Who may do what and when? 64 2.6.1 Exec tasks 64 2.6.2 AmigaDOS processes 66 2.6.3 Task exceptions 67 2.6.4 Supervisor mode 67 2.6.5 Interrupts 68 2.6.6 Priority levels and the operating system 69 2.6.7 Traps and processor exceptions 70 2.6.8 Forbid()/Permit(), Disable()/Enable(), and semaphores 70 2.7 Compatibility with other processors 73 2.7.1 Delays and processor speed 74 2.7.2 MOVE from SR and MOVE from CCR 75 2.7.3 32-bit addresses 75 2.7.4 Exception vectors and the VBR 77 2.7.5 The CLR instruction 78 2.7.6 Caching 78 2.7.6.1 Self-modifying code and the code cache 78 2.7.6.2 Data caching, copyback, and DMA 80 2.7.6.3 MC68030 and write-allocation 81 2.7.7 CALLM and RTM 82 2.7.8 Memory management units 82 2.7.9 Transparent translation 83 2.7.10 Multiprocessor systems 83 Listing MoveVBRc.c 84 Listing MoveVBRa.a 86 Listing Makefiles (MoveVBR) 87