M68K/BCPL: fault (a.k.a. writeErr) not implemented
fault (GV offset $1A0, known as writeErr in the AROS source) is not currently implemented. An AROS implementation would just call PrintFault().
fault is used by:
- Several Workbench 1.x commands (CD, Copy, Delete, Dir, Ed, Install, List, Path, Search, Why, L:Shell-Seg)
- Cambridge LISP 68000 (Lisp:l/lisp/lispmain)
- Amiga Pascal (Pascal:l/pascal/paslib.obj)
fault takes one argument, an error code in D1. It basically sets pr_Result2 to the error code, then runs C:FAULT. The Kickstart 1.3 implementation does this:
- If D1 on entry is 0, just return.
- Set pr_Result2 to the error code argument.
- Call NoReqLoadSeg to load C:FAULT. If that fails, print "Error code nnn\n", where nnn is the error code argument, then return.
- If NoReqLoadSeg succeeded, call BCPL RunCommand to run Fault.