SAM Coupé Technical Manual
Download
Release Year
Publisher
Description
The Technical Manual.
First published 1989 by MGT, Updated and republished 1990.
Republished 1991 by SAM Computers Limited.
Republished 1992 by Format Publications.
The PDF attached has OCR errors and has been transcribed correctly (with known errors corrected) by Stefan Drissen.
Trivia
Also see The Unofficial SAM Coupe Technical Manual
Errata
From Velesoft
The error is in the official SAM Coupé Technical Manual version 3.0 (Miles Gordon Technology plc, 1990), chapter Variable Formats (contents list: page 76). The same wording appears in Stefan Drissen’s transcription of that manual. It is not corrected in The Unofficial SAM Coupe Technical Manual v1.0 (Simon Cooke, 1994), which does not reproduce this chapter.
Quoted sentence:
The length is given as number of 16K pages, then length MOD 16K (LSB/MSB), for the rest of the array plus the 3 length bytes.
The first part is right. A string or array record is:
type/length byte, then 10 name bytes, then a 3-byte length: number of 16K pages, then length MOD 16K as LSB then MSB.
The error is “plus the 3 length bytes.” That claims the 3-byte field counts itself as well as the data that follows.
ROM SAVE does not do that. The three bytes are the length of only what follows them:
-
ordinary string: the string text
-
array: dimension count, each dimension (2 bytes), then the array data
They do not include the 3-byte field.
Checked against files written by ROM in SimCoupe (promenne2new.mgt):
-
LET A$="X" — payload after the length field is one byte 58 ("X"). The length field is 1, not 4.
-
DIM A(2,3) — payload is 02 02 00 03 00 plus six 5-byte zeros (2×3 elements). That is 35 bytes. The length field is 35, not 38.
Correct wording:
The length is given as number of 16K pages, then length MOD 16K (LSB/MSB), for the data that follows the length field (string text, or dimension header plus array data). The 3-byte length field is not included in that value.
