PowerPC and Future-OS Compatibility Rules¶
Amiga Technologies was moving AmigaOS to PowerPC and restructuring the OS substantially. The rules below (DevInfo/Exec_and_PowerPC/FutureOS) define what AmigaOS 3.1-era code must avoid in order to survive the transition. The framing quote from the OS itself captures the intent:
"I told you this was private. The data beyond this point has changed, is changing, and will continue to change."
struct ExecBase and low-level hardware access are to be treated as a black box. Previously legal practices that block forward progress are declared illegal for PPC code, with replacement functionality to be provided.
Status note (OS 3.2, 2021): the predicted PowerPC transition did not happen. AmigaOS instead continued on 68k: 3.1.4 (V45) → 3.2 (V47).
struct ExecBasewas not restructured. However, the rules below remain excellent portability and stability advice — especially "use semaphores notForbid()," "use OS APIs not hardware," and "don't touch privateExecBasefields." Several were vindicated by 3.2's own changes (e.g. AVL trees and task trees were removed from exec). Treat this document as: the specific PPC rationale is historical, but follow the rules anyway.
Forbidden / dangerous exec.library functions¶
Avoid these — they "may change, become completely or partly obsolete and unusable":
exec.library/AllocAbs exec.library/FreeTrap
exec.library/AllocTrap exec.library/GetCC
exec.library/Disable exec.library/ObtainQuickVector
exec.library/Enable exec.library/OldOpenLibrary
exec.library/Forbid exec.library/Permit
exec.library/SetExcept exec.library/SetFunction
exec.library/SetIntVector exec.library/SetSR
exec.library/SetTaskPri exec.library/SuperState
exec.library/Supervisor exec.library/UserState
OldOpenLibrary()will eventually end in anAlert().SetTaskPri()(and everything else): it is not legal to modify tasks you do not own.
Concrete rules¶
- Do not read
SysBase->ThisTask. UseFindTask(NULL). Although OS 3.1 headers markThisTask"readable", as of 1 January 1996 it is private. - Cache
SysBaseinstead of re-reading location$4repeatedly — a real performance win. - Stay away from
Disable()andForbid(). Their semantics will be restricted; usingForbid()"to speed up things only demonstrates incompetence." Protect shared data with semaphores instead. - Do not rely on "atomic" CPU instructions, task priorities, or
Forbid()for synchronisation. Use semaphores for data; use signals and message replies to communicate with interrupt code. Don't depend on current scheduler behaviour. - Don't fiddle with the Lists in
ExecBase— they may disappear; access functions will replace direct access. - Avoid trap / exception handling and, where possible, interrupt handling — stay at the task/process level.
- Don't bang hardware. No poking OCS/ECS/AGA registers (use
graphics.library) or CIAs (usetimer.device,parallel.device,serial.device).
ExecBase fields¶
AttnFlags, VBlankFrequency, and PowerSupplyFrequency could in principle still be read, but each is problematic: AttnFlags will be useless on PowerPC and replaced with a query function; VBlankFrequency has always been tricky; PowerSupplyFrequency is no longer accurate even on current hardware. Expect access functions for whatever is actually needed.
Things that will never be supported¶
- Shutting the OS down and reviving it. "You will die, lose all the functionality and experience all the nasty things hidden by the OS." Don't try.
Heuristic¶
"If you can feel that something might be of questionable value, stability, or portability even before you did it, then don't do it."
If an OS function exists for a job, use it; if none exists, treat that as a signal you should not be doing the job.
See Also¶
- AmigaOS Programming Philosophy
- AmigaOS 3.2 — What Changed for Developers
- Intuition Layer Locking and Deadlocks
Sources: Heinz Wrobel, Amiga Technologies, "FutureOS" (1996).
Raw: raw/conventions/futureos-powerpc-rules.md; raw/architecture/os-3.2-release-notes.md
Updated: 2026-08-04