Well Derek, since you ask:
Using the 18-5-2022 book's page numbers, not the PDF's
P7 Supervisor stack: should be $28480 to
$28180, not $28480 to $28140
p151 Getting Parameters: OCR error at penultimate line "..and register AS
points to.." AS should be A5.
p152 Penultimate paragraph:
Line 6: "AJ in this addressing mode.." presumably AJ should be A1.
"On entry to the procedure or function, A1 is a suitable value for the top
of the stack." This is false. A better description might be:
"A1 is undefined on entry to a function or procedure. TOS can be found in
BV.RIP(a6) on entry to a procedure if need be, otherwise A1 will only point
to TOS after, for example, a call to fetch parameters."
p154:
Starting at first para:
First example: This is at best confusing and incomplete:
..
MOVE.L BV.RIP(A6),A1 new stack position possibly
There is nothing magical about A1. A1 will be exactly the same before and
after the call! The only thing that may change during BV.CHRIX is A6.
If you wanted to reserve, say, six bytes on the RI stack you could do worse
than:
Code: Select all
MOVE.L A1,BV_RIP(A6) keep some value stored on stack
or
MOVE.L BV_RIP(A6),A1 nothing on TOS or don't know/care
then
MOVEQ #6,D1 this many bytes wanted
MOVE.W BV.CHRIX,A0 reserve room vector
JSR (A0) make the call
SUBQ.L #6,BV_RIP(A6) adjust RIP to reflect
MOVE.L BV_RIP(A6),A1 new TOS
Also, here it might have been good to mention why there is no error return
from BV.CHRIX: If this call fails (due to insufficient memory) the routine
returns to the top level caller(? Not documented.)
Same page further down:
"Get parameters on to maths stack":
Code: Select all
..
"Entry: A1.L top of maths stack" This is false
Exit:
..
A0 update pointer to top of stack: This is false. Should be A1
A1 corrupted: False. See above
A2 preserved: Incorrect. Smashed
Also, all along the way Pennell confuses dots with underscore in the
mnemonics. There is method to why dots are used in, eg traps and vectors,
and underscores used in offsets and variables! Just another brick out of
the Jenga Tower of Babel..
I only scanned those parts of the book that I remembered had been problematic.
Common to many of the Sunshine books was that they were made in haste,
probably to cash in on the hoped for success of the QL. Both this book and the
Adder book are barely more than a rehash of
The QL Technical Guide by Tony
Tebby and David Karlin, which had it been published and/or advertised in a
timely manner would have saved us all a great deal of trouble!