garyh@iddic.UUCP (Gary Hanson) (01/13/85)
*** REPLACE THIS BUG WITH YOUR MESSAGE ***
Updates to the 'Commodore 64 Programmer's Reference Guide'
The following list consists of corrections of errors and enhancements to
the Reference Guide. All page numbers and fixes apply at least to the version
'FIRST EDITION / FOURTH PRINTING-1983'. I have no idea how much Commodore
may or may not have changed the book in succeeding editions, but I doubt that
much has changed. Anyway, the column marked 'Type' denotes the type of the
correction. B is for bugs; a blatant misprint, E is an enhancement; usually
a reminder of the type that can be easily written in the book for future
refererence.
This list is the result of countless hours spent trying to avoid finding
tiny, but irritating, undocumented 'features' of the system and
documentation, and utterly failing to avoid finding them. Thanks are also
due to alaya!alan for sending me his list of corrections.
-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-
Page Type Description
67 E Add the following list if you have a cassette deck:
Cassette Secondary Addresses
0: Read
1: Write, with EOF at CLOSE
2: Write, with EOT at CLOSE
241 E Reminder for CMPs:
C SET if A>=M
C CLR if A<M
265 B Memory map at bottom of page: 'GAME = 0' should be 'GAME = 1' The
case LORAM=1, HIRAM=1, GAME=0, and EXROM=0 is at the bottom of the
next page.
278 E CHROUT description: Change second sentence from ...'(number 3,
the screen).' to ...'(number 3, the screen) unless DFTLO ($9A) has
been POKEd with a different device number.'
283 B GETIN description: change reference to 'BASIN' routine to 'CHRIN'.
290 B PLOT description: change Y value range from '(6-39)' to '(0-39)'.
292 E READST description: add 'For RS232 status bits, see page 355', or
add the following values to the table (add a new column for RS232)
and, BTW, change the 'ST NUMERIC VALUE' '-128' to '128'. RS232
status values: bit 0 = parity err, bit 1 = framing error, bit 2 =
overrun error, bit 3 = rcv buffer empty, bit 4 = CTS missing,
bit 6 = DSR missing, bit 7 = BRK detect.
295 B SCNKEY description: change last sentence ...'routine is called'
to ...'routine should be called'.
303 B TKSA description: add 'Add $60 to the address before calling this
routine (same as SECOND, page 296)'.
311 E GARBFL ($F) value 1 = LIST
314 E TIME ($A0-A2) $A0 = high order, $A2 = low order
316 ? There is an undocumented piece of memory from $13F - $1FF. Some
of these locations are used by the serial bus routines.
317 E SGFLAG ($28D) values CTRL = 4, COMMODORE = 2, SHIFT = 1
319 E SPREG ($30F) change reference to 'SP Register' to 'Status Register'
to remove ambiguity. Also note that the area from $30C to $30F is
the communication area for SYS calls. Values put here will be
loaded into the appropriate registers prior to a SYS, and the
at the return of the SYS, the registers are stored here.
322 E $D018 bit 3 controls the location of the bit-map screen in the
current memory bank. If bit 3 is zero, the screen will be in the
bottom 8K of the 16K bank; if bit 3 is 1, the location will be 8K
higher.
334 E The memory block at $DE00 - $DEFF is 'reserved' for the Z80
cartridge. The block at $DF00 - $DFFF was once described as being
reserved for a 'fast, low-cost disk drive' that will probably never
appear (from Commodore, anyway. Ramdisk, anyone?) These two
blocks are also used by IEEE interfaces, and a myriad of other
hardware add-ons.
343 B Port corrections: change references to 'Port A' to 'Port 2', and
'Port B' to 'Port 1'.
350 ? The baud rate formula given refers to the values in M51AJB ($295 -
$296), the non-standard BPS counter. The regular baud rate counter
is BAUDOF ($299-$29A).
353 B In the box at the top of the page, change the reference to
'DataSsette Ready' to 'Data Set Ready'.
377, E Character set stuff: Any characters in set 2 which are not listed
378 are the same as set 1.
379, E More character set stuff: CHR$(19) is HOME; black out the 'CLR',
380 same thing with CHR$(20) is DEL not INST. CHR$(39) is apostrophe,
not period. CHR$(65) to CHR$(90) are lowercase a to z in the
upper/lower case character set, just like CHR$(97) to CHR$(122) ar
upper case A to Z in the same set. CHR$(126) in upper/lower case is
a checkerboard graphic character, and CHR$(127) is a diagonal
crosshatch, screen code 95 in set 2. CHR$(147) is CLR not HOME,
CHR$(148) is INST not DEL. CHR$(160) is a SHIFT-SPACE, used in
places like the disk directory. CHR$(169) is another diagonal
crosshatch in upper/lower case, see screen code 105 in set 2.
Similarly, CHR$(186) in upper/lower case is a check mark, screen
code 122 in set 2.
383 E GRAYs: GRAY 1 (11) is the darkest, value approximately 25 on
a scale 0=max black, 100=max white. GRAY 2 (12) is about 55 on the
same scale, while GRAY 3, the lighest, ranks about 75 on the scale
Those familiar with video signals will recognise the 0 - 100 scale
as IRE units, a voltage measurement on the video signal, which
ideally would correspond to actual light output from the CRT, but
this is dependent on proper monitor calibration.
394 B TANH derivation is wrong. Use:
TANH(x)=(EXP(x)-EXP(-x))/(EXP(x)+EXP(-x))
436 B VIC Character Display mode: change the ninth line from ...'counter
(VC3-VC0)' to ...'counter (VC9-VC0)'.
-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-<+>-
Well, that's all for now, but I'm sure there's even more bugs waiting
to be found, and the possibilities for future minor enhancements are limitless.
So, get out your books, and felt pens, and go to it.
Gary Hanson Tektronix IDG ...!tektronix!iddic!garyh
>This space intentionally left blank of quasi-witty aphorisms.<