EasyManua.ls Logo

Sinclair ZX INTERFACE 1 - Page 49

Sinclair ZX INTERFACE 1
64 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Microdrive channel‘
Every time a file is opened an area called a CHANNEL is created in the area
designated CHANS in the BASIC programming manual. This area is usually
addressed by the IX register in the software. The channel has a length of
595 bytes. and contains the 512 byte buffer.
The contents of the channel are as follows:
0
2
4
5
7
9
11
Address 8
Address 8
‘M’
Address of output subroutine in ROM
Address of input routine in ROM
Address 595
CHBYTE Current byte counter indicates the next byte to be
added or removed from the data area in the range
0-512 inclusive
13 CHREC
14 CHNAME
24
CHFLAG
Record number. Indicates the position of the record
in a file range 0-255
10 byte filename with trailing spaces
Flag byte bit 0 set. open for write
25 CHDRIV
26 CHMAP
28
CHMAP
40
HDFLAG
41
42
44
54
55
HDNUMB
HDNAME
HDCHK
67 RECFLG
clear. open for read
bits l-7 unused
Drive number
0-J
Address of the MAP for this Microdrive
12 bytes of header preamble marks the start of
the header workspace
Flag byte bit 0 set
bits l-7.. unused
Sector number in range 0-255
Unused
Cartridge name and trailing spaces
Header checksum
12 bytes of data block preamble.. marks the start
of the data workspace
Flag byte bit 0 = 0
bit Z=not a PRINT file
bits 3-7 unused
68 RECNUM Number of this record in the range 0-255
47