6128464LONGUEURDESCRIPTION
#0000#0000#40RESTART BLOCK
#0000#0000 RST 0: Reset complet de la machine
#0008#0008 
RST 1: LOWJUMP: à la suite 2 octets d’adresse:
b0 au b13=adresse;
b14=Lower ROM disabled;
b15=Upper ROM disabled
#000B#000B LOW PCHL: HL has address as RST 1
#000E#000E JMP BC’: BC has address to jump to
#0010#0010 
RST 2: SIDE CALL: inline two byte address:
b0 to b13=address-&C000;
bl4 to b15=offset to required ROM (used between sequenced Foreground ROMs)
#0013#0013 SIDE PCHL: HL has address as RST 2
#0016#0016 JMP DE’: DE has address to jump to
#0018#0018 
RST 3: FAR CALL: inline three byte address block:
bytes 1 and 2 hold the address;
byte 3 holds the ROM select address
#001B#001B 
FAR PCHL: as RST 3, but HL has address;
C has ROM select
#001E#001E 
JMP HL’: HL has address to jump to
#0020#0020 
RST 4: RAM LAM: LD A,(HL) from RAM with ROMs disabled
#0023#0023 
FAR CALL: as RST 3, but HL has address of three byte address block
#0028#0028 
RST 5: FIRM JUMP: inline two byte address to jump to
#0030#0030 
RST 6: User restart; default to RST 0
#0038#0038 
RST 7: Interrupt entry (KB/Time etc)
#003B#003B 
External interrupt (default to RET)
#0040#0040#130
ROM lower foreground area: BASIC input area (tokenised)
#016F#016F 
end of BASIC input area.
#0170#0170 
BASIC working area for program, variables, etc…
#0170#0170 
Program area;
Variables and DEF FNs area;
Arrays area;
Free space;
end of free space;
Strings area;
end of Strings area (=HIMEM);
Space for user machine code routines;
end of user space, byte before user;

 

 6128464LONGUEURDESCRIPTION
 #A6FC#A6FC4AMSDOS chain,ing block
 #A6FC#A6FC2
address of next ROM block in chain (or &0000 if the last in chain)
 #A6FE#A6FE1ROM Select address
 #A6FF#A6FF1#00
 #A700#A700#500
AMSDOS reserved area. This area is moved down if any ROMs have numbers greater than eight (6128 only)
 #A700#A7001
Current drive number (0=A; 1=B)
 #A701#A7011Current USER number
 #A702#A7021flag?
 #A703#A7032address?
 #A705#A7051flag?
 #A706#A7062address?
 #A708#A7081OPENIN flag (&FF=closed; <>&FF=opened)
 #A709#A709#20
Copy of current or last Disc Directory entry for OPENIN/LOAD:
 #A709#A7091USER number
 #A70A#A70A8Filename (padded with spaces)
 #A712#A7123File extension (BAS, BIN, BAK, etc) including: b7 set = Read Only
 #A713#A7131b7 set = System (ie not listed by CAT or DIR)
 #A715#A7151
16K block sequence number for this directory entry (0 for first block; if <>0 part of a larger file)
 #A716#A7162
Non utilisés
 #A718#A7181
length of this block in 128 byte records
 #A719#A71916
sequence of Disc Block numbers containing file – &00 as end marker
 #A729#A7291
number of 128 byte records loaded so far; before loading proper: &00 for ASCII (ie nothing loaded yet); &01 for BIN or BAS files (ie header record loaded)
 #A72A#A72A1
?
 #A72B#A72B1
?
 #A72C#A72C1
OPENOUT flag (&FF=closed; <>&FF=opened)
 #A72D#A72D#20
Copy of current or last Disc Directory entry for OPENOUT/SAVE:
 #A72D#A72D1
USER number
 #A72E#A72E8
Filename (padded with spaces)
 #A736#A7363
File extension ($$$ while open; correct extension when finished)
 #A739#A7391
flag (&00=open; &FF=closed, ie finished)
 #A73A#A73A1
?
 #A73B#A73B1
Flag (&00=open; &FF=closed)
 #A73C#A73C1
number of 128 byte records saved so far
 #A73D#A73D16
sequence of Disc Block numbers containing file – &00 as end marker
 #A74D#A74D1
number of 128 byte records saved so far
 #A74E#A74E1
?
 #A74F#A74F1
?
 #A750#A7501
flag (&00=OPENIN; &01=In Char; &02=In Direct (whole file))
 #A751#A7512
address of 2K buffer for ASCII, or of start of current/last block if BIN or BAS file
 #A753#A7532
address of next byte to read for ASCII, or of 2K buffer for BAS or BIN file
 #A755#A755#45
first #45 bytes of BAS/BIN file (extended header) or of extended header made for ASCII file
 #A755#A7551
USER number
 #A756#A7568
Filename (padded)
 #A75E#A75E3
Extension
 #A761#A7616
Non utilisés
 #A767#A7671
file type (&00=BASIC; &01=protected BASIC; &02=Binary; &16=ASCII)
 #A768#A7682
Non utilisés
 #A76A#A76A2
address to load file into (=actual destination), or buffer for an ASCII file
 #A76C#A76C1
Unused for disc
 #A76D#A76D2
length of file in bytes (&0000 for ASCII files)
 #A76F#A76F2
execution address fora BIN file
 #A770#A770#25
Non utilisés
 #A795#A7953
length of actual file in bytes (as &A76D) -BAS and BIN only
 #A798#A7982
simple checksum of first 67 bytes of header (LB first) – BAS and BIN only
 #A79A#A79A1
flag (&00=OPENOUT; &01=Out Char; &02=Out Direct(whole file))
 #A79B#A79B2
address of 2K block if an ASCII file, or of current/last block saved if a BAS or BIN file
 #A79D#A79D2
address of next byte to write for ASCII files, or of 2K buffer for BAS and BIN files
 #A79F#A79F#45
first &45 bytes of BAS/BIN file (ie extended header)
 #A79F#A79F1
USER number
 #A7A0#A7A08
Filename (padded)
 #A7A8#A7A83
Extension
 #A7AB#A7AB1
Flag (&00=Open)
 #A7AC#A7AC1
?
 #A7AD#A7AD1
Flag (&00=Open)
 #A7AE#A7AE3
Non utilisés
 #A7B1#A7B11
file type (&00=BASIC; &01=protected BASIC; &02=Binary; &16=ASCII)
 #A7B2#A7B22
Non utilisés
 #A7B4#A7B42
address to save file from (for BAS or BIN files), or of buffer for ASCII files
 #A7B6#A7B61Unused for disc
 #A7B7#A7B72
Length of file in bytes
 #A7B9#A7B92
execution address for BIN files
 #A7BB#A7BB#25
Non utilisés
 #A7DF#A7DF3
length of actual file in bytes (as at &A7B7) – BAS and BIN only
 #A7E2#A7E22
simple checksum of first 67 bytes of header (LB first) – BAS and BIN only
 #A7E4#A7E4#80
buffer area for records sent to or loaded from Disc, or used in forming filename and extension
 #A864#A86414*3
Tape Jumpblock is stored here by AMSDOS – is moved to &BC77 etc after |TAPE
 #A88B#A88B3
far address used by AMSDOS RST 3s at &BC77 etc (&CD30,&07)
 #A890#A890#19
Drive A Extended Disc Parameter Block (XDPB):
 #A890#A8902
number of 128 byte records per track
 #A892#A8921
log2(Block size)-7 (&03=1024 bytes; &04=2048 bytes)
 #A893#A8931
(Block size)/128-1 (&07=1024 bytes;
 #A894#A8941
(Block size)/1024 (if total of blocks <256, else /2048)-1
 #A895#A8952
number of blocks per disc side (excluding reserved tracks)
 #A897#A8972
number of (directory entries)-1
 #A899#A8992
bit signiflcant value of number of blocks for directory (&0080=1; &00C0=2)
 #A89B#A89B2
number of bits in checksum =((&A894)+ 1)/4
 #A89D#A89D2
number of reserved tracks (&00=Data; &01=IBM; &02=System)
 #A89F#A89F1
number of first sector (&01=IBM; &41=System; &C1=Data)
 #A8A0#A8A01
number of sectors per track (Data=9; System=9; IBM=8)
 #A8A1#A8A11
gap length (Read/Write)
 #A8A2#A8A21
gap length (Format)
 #A8A3#A8A31
format filler byte (&E5)
 #A8A4#A8A41
log2(sector size)-7 (&02=512; &03=1024)
 #A8A5#A8A51
records per sector
 #A8A6#A8A61
current track (not for use)
 #A8A7#A8A71
0=not aligned (not for use)
 #A8A8#A8A81
Auto select flag (&00=Auto select; &FF= don’t alter)
 #A8A9#A8A9 
 
 #A8B9#A8B9 
 
 #A8D0#A8D0#19
Drive B Extended Disc Parameter Block (arranged as at &A890)
 #A8E9#A8E9 
(&17 bytes of &FF)
 #A8F9#A8F9 
 
 #A900#A900 
(&12 bytes of &00)
 #A910#A910 
 
 #A918#A9182
address of area for reading directory entries for Drive A
 #A91A#A91A2
address of Drive A XDPB
 #A91C#A91C2
address of the byte after the end of Drive A XDPB
 #A91E#A91E2
 
 #A920#A920 
(8bytes of &00)
 #A928#A9282
address of area for reading directory entries for Drive B
 #A92A#A92A2
address of Drive B XDPB
 #A92C#A92C2
address of the byte after the end of Drive B XDPB
 #A92E#A92E2
 
 #A930#A930#80
block of directory entries, including last file loaded
 #A9B0#A9B0#200
buffer for loading; usually contains last sector loaded
 #ABB0#ABB0 
(&50 bytes of &00)
 #AC00#AC00 
Start of BASIC Operating System reserved area:
 #AC00#AC001
program line redundant spaces flag (0=keep extra spaces; <>0=remove)
  #AC019*3
groups of 3 RET bytes (&C9) called by the Upper ROM
 #AC01#AC1C1
AUTO flag (0=off; <>0=on)
 #AC02#AC1D2
number of the next line (6128) or of the current line (464) for AUTO
 #AC04#AC1F2
step distance for AUTO
 #AC06#AC211
 
 #AC07#AC221
 
 #AC08 1
 
  #AC231
 
 #AC09#AC241
WIDTH (&84=132)
 #AC0A#AC25 
 
 #AC0B  
 
 #AC0C#AC261
FOR/NEXT flag (0=NEXT not yet used; <>0=used)
 #ACOD#AC275
FOR start value (real). Only 2 bytes are used if % or DEFINT variable
 #AC12#AC2C2
address of `: ‘ or of the end of program line byte after a NEXT command
 #AC14#AC2E2
address of LB of the line number containing WEND
 #AC16#AC301
WHILE/WEND flag (&41=WEND not yet used; &04=used)
 #AC17#AC31 
 
 #AC18#AC322
 
 #AC1A#AC342
 
 #AC1C#AC362
address of location holding ROM routine address for KB event block
 #AC1E#AC38#0C
Event Block for ON SQ(l):
 #AC1E#AC382
chain address to next event block; &0000 if last in chain, but &FFFF if unused
 #AC20#AC3A1
count
 #AC21#AC3B1
class: Far address, highest (ON SQ) priority, Normal & Synchronous event
 #AC22#AC3C2
routine address (in BASIC ROM)
 #AC24#AC3E1
ROM Select number (&FD ie ROM 0 enabled, Lower ROM disabled)
 #AC25#AC3F1
(first byte of user field)
 #AC26#AC402
address of the end of program line byte or `:’ after `ON SQ(x) GOSUB line number’ statement
 #AC28#AC422
address of the end of program line byte of the line before the GOSUB routine
 #AC2A#AC44#0C
Event block for ON SQ(2), arranged as #AC1E onwards – second ON SQ priority
 #AC36#AC50#0C
Event block for ON SQ(4), arranged as &AC1E onwards – lowest ON SQ priority
 #AC42#AC5C#12
Ticker and Event Block for AFTER/EVERY Timer 0
 #AC42#AC5C2
chain address to next event block (usually to another timer or &00FF)
 #AC44#AC5E2
‘count down’ count
 #AC46#AC602
recharge count (for EVERY only – &0000 if AFTER)
 #AC48#AC622
chain address to next ticker block
 #AC4A#AC641
count
 #AC4B#AC651
class: Far address, lowest (timer) priority, Normal and Synchronous event
 #AC4C#AC662
Routine address (in BASIC ROM)
 #AC4E#AC681
ROM Select No (&FD ie ROM 0 enabled, Lower ROM disabled)
 #AC4F#AC691
(first byte of user field)
 #AC50#AC6A2
address of the end of program line byte or `:’ after statement in use when the timer `timed-out’
 #AC52#AC6C2
address of tbe end of program line byte of tbe line before the GOSUB routine
 #AC54#AC6E#12
Ticker and Event Block for AFTER/EVERY Timer 1 (3rd Timer priority) arranged as at &AC42
 #AC66#AC80#12
Ticker and Event Block for AFTER/EVERY Timer 2 (2nd Timer priority) arranged as at &AC42
 #AC78#AC92#12
Ticker and Event Block for AFTER/EVERY Timer 3 (highest priority) arranged as at &AC42
 #AC8A#ACA4#100
BASIC input area for lines (as typed in and not tokenised) or for INPUT
 #AD8C#ADA62
address of line number LB in line containing error
 #AD8E#ADA82
address of byte before statement containing error – ie of `:’ or of HB of Line No
 #AD90#ADAA1
ERR (Error No)
 #AD91 1
DERR (Disc Error No)
 #AD92#ADAB2
as &AD8E if error is in a program (ie not if in Direct Command Mode)
 #AD94#ADAD2
as &AD8C if error is in a program (ie not if in Direct Command Mode)
 #AD96#ADAF2
address of the length LB of line specified by the `ON ERROR GOTO’ command
 #AD98#ADB11
 #AD99#ADB2#09
Current SOUND parameter block (see Firmware Jump #BCAA)
 #AD99#ADB21
Channel andrendezvous status
 #AD9A#ADB31
Amplitude enveloppe (ENV) number
 #AD9B#ADB41
Tone enveloppe (ENT) number
 #AD9C#ADB52
Tone period
 #AD9E#ADB71
Noise period
 #AD9F#ADB81
Initial amplitude
 #ADA0#ADB92
Duration, or envelope repeat count
 #ADA2#ADBB#10
Current Amplitude or Tone Envelope parameter bloc (see #BCBC or #BCBF)
 #ADA2#ADBB1
Number of sections (+#80 for negative ENT number, ie the envelope is run until end of sound
 #ADA3#ADBC3
First section of the enveloppe:
 #ADA3#ADBC1
Step count (if<#80) otherwise envelope shape (not tone envelope)
 #ADA4#ADBD1
Step size (if step count<#80) otherwise envelope period (not tone envelope)
 #ADB5#ADBE1
pause time (if step count<#80) otherwise envelope period (not tone envelope)
 #ADA6#ADBF3
Second section of the envelope, as #ADA3
 #ADA9#ADC23
Third section of the envelope, as #ADA3
 #ADAC#ADC53
Fourth section of the envelope, as #ADA3
 #ADAF#ADC83
Fifth section of the envelope, as #ADA3
 #ADB2#ADCB5
 
 #ADB7#ADD0#36
 
 #ADEB#AE042
 
 #ADED#AE066
 
 #ADF3#AE0C26*1
Table of DEFINT (#02), DEFSTR (#03) or DEFREAL default (#05), for variables ‘a’ to ‘z’
 #AE0D#AE26 
 
 #AE0E#AE272
 
 #AE10#AE292
 
 #AE12#AE2B2
 
 #AE14#AE2D1
 
 #AE15#AE2E2
address of line number LB of last BASIC line (or #FFFF)
 #AE17#AE302
Address of byte before next DATA item (eg comma or space)
 #AE19#AE322
Address of space on GOSUB etc stack, (see also #B06F)
 #AE1B#AE342
Address of byte before current statement (#003F if in Direct Command mode)
 #AE1D#AE362
Address of line number LB of line of current statement (#0000 if in Direct Command mode)
 #AE1F#AE381
Trace flag (0=TROFF; <>0=TRON)