* Filename : MYARC-FDC1 - Actual code example is on files 80T-INIT-A thru D **************************************************************************** * MYARC DISK CONTROLLER CRU INFORMATIONS ******************************************************************************** Paolo Bagnaresi Via Kennedy 17 20097 San donato Milanese ITALY - Phone (02)-514.202 ******************************************************************************** The following informations are accurate and to the best of my knowledge. However, you should not assume they are free from errors. I will gladly accept any correction that you will send to my address. Please feel free to contact me on this matter. I am trying to share informations on this subject in the hope of receiving some feed back from other users: I would like to know YOUR PERSONAL EXPERIENCES. PLEASE WRITE ME BACK. ******************************************************************************** Note: The Eprom is logically divided into two banks, each being 4 KBytes long and each residing in the address range >4000 - >4FFF. When the Eprom is accessed, which Eprom bank will be paged-in depends on the state of CRU OUT Bit # 3, which has also another function: it enables the Double Density when reading/writing from/to Floppy Disk. This particular hardware arrangements creates a problem: the software residing in the Eprom cannot directly turn on/off the Single/Double Density. If it does, the other Eprom bank may get turned on and the microprocessor would start executing the code residing in the other side of the Eprom. The problem is software solved by relocating a short portion of code in the Scratch Pad area (>8300 - >83FF) just prior to accessing the Floppy Disk Drive. Then, execution will be transfered to this code relocated in the Scratch Pad area. The selected density can be safely enabled and, after the transfer from/to the Floppy Disk has been carried out, the density pertaining to the Eprom bank being used will be restored to its previous state. Eventually, a return to the original Eprom bank will be performed. Also, it's worth noting that the code relocation to the Scratch Pad area ensures a 16 bit fast execution, as opposed to the 8 bit/wait state/8 bit slow execution that would take place for code executing from inside the Eprom. The MYARC Disk Controller (from now on MDC) is a card to be fitted in the PEB. It provides DS/DD diskette formatting and some other useful routines. This doc deals primarily with the CRU arrangement onf the MDC, that is somehow different from TI, ATRONIC and CORCOMP disk Controller. The MDC has usually a CRU base address of >1100. Inside, the MDC you can see, among the other chips: - 1 EPROM 4164 (8 Kbytes) - 1 2 Kbyte Ram. - 1 WD 1770 Disk controller The EPROM is banked into two 4 k portions. Each portion is addressed between >4000 and >4FFF. CRU Address >1100 turns on the first bank. Additionally, CRU address >1106 turns on the second bank. The 2 K Ram is addressed from >5000 to >57FF. Addresses between >5800 - >5EFF are unused. Adresses between >5F00 and >5FFF are reserved for I/O mapping (WD 1770 gates, see below). Banking the 4 K Eprom will not affect the Ram. Thus, the Ram can be "seen" from both Eprom banks. This is very convenient. The Ram is used to keep informations relevant to drive usage and to save part of the Scracth pad. Also, the Ram will act as temporary Buffer, for a read from disk. The usage of WD 1770 chip (28 pins) is fully described in the WESTERN DIGITAL "1986 Storage Management Products Handbook". This is the address of Western Digital: WESTERN DIGITAL CORPORATION 2445 McCabe Way Irvine, CA 92714, USA Phone (714)-863.0102. TWX 910-595-1139 GATES (HARDWARE MAPPED GATES TO DISK CONTROLLER) ================================================ These are special CPU RAM addresses that act as a gate to and from the disk controller WD 1770. They are 8 bits gates (a full byte). Please refer to the Western Digital Manual (see above) for a full description on how to use these gates. In the following range of addresses, only odd byte addresses between >5F01 and >5F07 are fully decoded; other odd address are the copy of odd addresses between >5F01 and >5F07: thus, >5F09 should act as >5F01. The even addresses on the same range are without effect. >5F01 = READ : STATUS REGISTER. = WRITE : COMMAND REGISTER. >5F03 = WRITE : CURRENT TRACK ADDRESS. >5F05 = WRITE : NEEDED SECTOR REGISTER. See a note below. >5F07 = READ : READ DATA GATE = WRITE : WRITE DATA GATE In the following descrition the CRU BASE is assumed to be >1100. All SBO, SBZ, TB, LDCR, STCR will have >1100 as a CRU BASE. TB INSTRUCTIONS (Test Bit istructions) ====================================== CRU BASE + 0 = TB 0 : COMMAND COMPLETED TEST. After issuing a Command to >5F01, COMMAND REGISTER GATE, you may want to check if the command has already been performed . This will avoid issuing a new command before completion of the current command. The TB will return 1 if Command has been completed, 0 if not completed. Example: TB 0 JEQ DONE CRU BASE + 2 = TB 1 : DATA REQUEST READY TEST. When reading or writing data to the >5F07 READ/WRITE DATA GATE, some time may elapse before the data is processed by the WD 1770 chip. By checking this CRU BIT you will know when a new data is ready to be processed. If a 1 is returned, then the gate is READY to process a new data. If a 0 is returned, the gate is not ready. Example: TB 1 JEQ READY CRU BASE + 4 = TB 2 : VERIFY HARD DISABLED if set to ZERO. Myarc suggests to run a jumper, inside the Myarc Disk Controller, between pin # 2 of U5 [a 74LS251] and ground to disable VERIFY after a write. The means for the software to detected if this jumper has been run is a TB 2. The only time this bit is tested is after a Write Sector. Example : TB 2 JNE DISABL (Jump if Verify is DISABLed) BASE + 6 = TB 3 : ?? unknown. Apparently is never used. CRU BASE + 8 = TB 4 : DRIVE # 4 80 TRACK DIP-SWITCH SELECTED TEST. This CRU Bit reflects the condition of the internal Dip-Switch # 4, relative to drive # 4 (can be either on ON or on OFF position). It returns 1 if the dip-switch is OFF, 0 if the dip-switch is ON. The dip-switch has to be turned on if the corresponding drive is an 80 track drive (such as TEAC FD 55 F). Please note that this CRU BIT depends only on the position of the corresponding Dip-Switch: it is not capable of really detecting the kind of drive connected. In other words, it is entirely possible that user has a 40 track drive and by mistake turned on the dip-switch: then the softwre will act as if an 80 track is connected .... with all the problem you can easily imagine. Example : TB 4 JNE TRAK80 jump if DIP-SWITCH is OFF. CRU BASE + 10 = TB 5 : DRIVE # 3 80 TRACK DIP-SWITCH SELECTED TEST. This CRU bit reflects the condition of the internal Dip-Switch # 3, relative to drive # 3 (can be either on ON or on OFF position). It returns 1 if the dip-switch is OFF, 0 if the dip-switch is ON. See explanations for TB 4. Example: TB 5 JNE TRAK80 jump if DIP-SWITCH is OFF. CRU BASE + 12 = TB 6 : DRIVE # 2 80 TRACK DIP-SWITCH SELECTED TEST. This CRU bit reflects the condition of the internal Dip-Switch # 2, relative to drive # 2 (can be either on ON or on OFF position). It returns 1 if the dip-switch is OFF, 0 if the dip-switch is ON. See explanations for TB 4. Example: TB 6 JNE TRAK80 jump if DIP-SWITCH is OFF. CRU BASE + 14 = TB 7 : DRIVE # 1 80 TRACK DIP-SWITCH SELECTED TEST. This CRU bit reflects the condition of the internal Dip-Switch # 1, relative to drive # 1 (can be either on ON or on OFF position). It returns 1 if the dip-switch is OFF, 0 if the dip-switch is ON. See explanations for TB 4. Example: TB 7 JNE TRAK80 jump if DIP-SWITCH is OFF. SBO, SBZ INSTRUCTIONS (Set cru Bit to One, Set cru Bit to Zero) =============================================================== CRU BASE + 0 = SBO 0 : ENABLE MYARC DSR CARD SBZ 0 : DISABLE MYARC DSR CARD CRU BASE + 2 = SBO 1 : ?? (may be WD 1770 Chip Enable) SBZ 1 : ?? ( " " " " Chip Disable) CRU BASE + 4 = SBO 2 : ENABLE SECOND SIDE OF MAGNETIC HEAD SBZ 2 : ENABLE FIRST SIDE OF MAGNETIC HEAD CRU BASE + 6 = SBO 3 : ENABLE SINGLE DENSITY AND BANK 2 OF EPROM MEMORY ADDRESSES BETWEEN >4000 AND >4FFF. SBZ 3 : ENABLE DOUBLE DENSITY AND BANK 1 BETWEEN >4000 AND >4FFF. CRU BASE + 8 = SBO 4 : ENABLE DRIVE # 1 SBZ 4 : DISABLE DRIVE # 1 CRU BASE + 10 = SBO 5 : ENABLE DRIVE # 2 SBZ 5 : DISABLE DRIVE # 2 CRU BASE + 12 = SBO 6 : ENABLE DRIVE # 3 SBZ 6 : DISABLE DRIVE # 3 CRU BASE + 14 = SBO 7 : ENABLE DRIVE # 4 SBZ 7 : DISABLE DRIVE # 4 >5F05 GATE (HARDWARE MAPPED SECTOR GATE TO DISK CONTROLLER) =========================================================== The sector # to write to disk Gate is the sector # relative to the track (INTERNAL SECTOR #). When a diskette is initialized, each track contains several sectors (they span from 0 up to either 9 or 18, depending on the density you are using). So, in each track, the sector # is numbered from 0 up to 18. When accessing a LOGICAL sector number, say sector LOGICAL SECTOR # 70, you have to compute the corrisponding TRACK # and INTERNAL SECTOR #. For instance, if the diskette has been initialized to 18 sectors, then LOGICAL SECTOR 70 is = TRACK # 3 (Integer of 70/18) = INTERNAL SECTOR 16 (Remainder of 70/18) Thus, you will write 16 to the >5F05 SECTOR GATE and 3 to the >5F03 TRACK GATE. INTERNAL RAM ORGANIZATION ========================= As said above, the 2 K RAM inside the MDC (>5000 - >57FF) it is used to store information relevant to Disk Management. The following map is a partial description of the use of this RAM. Further infos are needed to complete the map. Please help! >5000 - >501F = Workspace used by Sector READ/WRITE and Disk FORMATTING. >5020 - >508B = Save SCRATCH PAD HIGH AREA (>6C bytes from >8394 through >83FE). >508C - >50AE = Subprogram or Program invoked by the DSRLNK. Here will be stored the Subprogram you call (Ex. >0111 for a Disk Formatting routine), or a full PAB description if you call a Program (>0500,>1000,>0000,>2100,>000A,'DSK1.UTIL1' for a LOAD MEMORY IMAGE PROGRAM of a file 'UTIL1' from Drive 1). >50AF - = Byte: # of maximum RETRY during a READ/WRITE sector. It is initialized to 5 upon entering the READ/WRITE sector routine. The Read/Write Sector software will enable retrying 5 times before issuing error when accessing a sector. A LOST DATA during a read or a write sector will not modify this value (you still have 5 more chances). After a Write Sector error, Sector Zero of the diskette is read. If a new error is issued after reading sector Zero, then DENSITY value is changed and sector Zero is accessed again. This DENSITY swapping and reding Sector ZERO is continued until either sector zero is read succesfully, or RETRY times remains greater than ZERO. After that, a final error is issued to the routine that called the READ/WRITE sector.. On the other hand, if Sector Zero is read succesfully, then the original assigned sector is accessed again. A new error will restart the ZERO READ SECTOR PROCEDURE. >50B0 - >50B1 = Drive # accessed (at >50B1). Usually >50B0 is zero. >50B2 = Byte: if 0 then SECTOR ZERO doesn't need to be updated. If different from zero, then SECTOR ZERO needs updating. >50B3 = Byte: Drive # previously accessed. After computer RESET is always zero. >50B4 - >50B5 = unknown *----- DISKETTE TYPE INFORMATION AREA ---------------------------------------* *----- DRIVE 1 -----* >50B6 - >50B7 = Word: Drive 1 Maximum # of sector/disk. This value is taken from sector ZERO, offset >10, of the diskette you are using. It is always updated whenever you access sector ZERO. It will be: >0168 for 360 sectors >0280 " 640 " >02D0 " 720 " >0500 " 1280 " >05A0 " 1400 " >0A00 " 2560 " >0B40 " 2880 " >50B8 = Byte: Flag for Drive # 1 when an 80 Track Drive is used with a 40 track diskette. If the Most Significant Bit of this byte is set to 1, then the drive is an 80 track drive, but the diskette is a 40 track diskette. In other words, this bit flag enables double step of magnetic head in read a write operations. >50B9 = Byte: Drive 1 SECTOR/TRACK. Usually is either >09 (Single Density, or >10 (Double Density 16 Sector/Track) or >12 (Double Density 18 Sector/Track). *----- DRIVE 2 -----* >50BA - >50BB = Word: Drive 2 Maximum # of sector/disk. This value is taken from sector ZERO, offset >10, of the diskette you are using. It is always updated whenever you access sector ZERO. It will be: >0168 for 360 sectors >0280 " 640 " >02D0 " 720 " >0500 " 1280 " >05A0 " 1400 " >0A00 " 2560 " >0B40 " 2880 " >50BC = Byte: Flag for Drive # 2 when an 80 Track Drive is used with a 40 track diskette. If the Most Significant Bit of this byte is set to 1, then the drive is an 80 track drive, but the diskette is a 40 track diskette. In other words, this bit flag enables double step of magnetic head in read a write operations. >50BD = Byte: Drive 2 SECTOR/TRACK. Usually is either >09 (Single Density, or >10 (Double Density 16 Sector/Track) or >12 (Double Density 18 Sector/Track). *----- DRIVE 3 -----* >50BE - >50BF = Word: Drive 3 Maximum # of sector/disk. This value is taken from sector ZERO, offset >10, of the diskette you are using. It is always updated whenever you access sector ZERO. It will be: >0168 for 360 sectors >0280 " 640 " >02D0 " 720 " >0500 " 1280 " >05A0 " 1400 " >0A00 " 2560 " >0B40 " 2880 " >50C0 = Byte: Flag for Drive # 3 when an 80 Track Drive is used with a 40 track diskette. If the Most Significant Bit of this byte is set to 1, then the drive is an 80 track drive, but the diskette is a 40 track diskette. In other words, this bit flag enables double step of magnetic head in read a write operations. >50C1 = Byte: Drive 3 SECTOR/TRACK. Usually is either >09 (Single Density, or >10 (Double Density 16 Sector/Track) or >12 (Double Density 18 Sector/Track). *----- DRIVE 4 -----* >50C2 - >50C3 = Word: Drive 4 Maximum # of sector/disk. This value is taken from sector ZERO, offset >10, of the diskette you are using. It is always updated whenever you access sector ZERO. It will be: >0168 for 360 sectors >0280 " 640 " >02D0 " 720 " >0500 " 1280 " >05A0 " 1400 " >0A00 " 2560 " >0B40 " 2880 " >50C4 = Byte: Flag for Drive # 4 when an 80 Track Drive is used with a 40 track diskette. If the Most Significant Bit of this byte is set to 1, then the drive is an 80 track drive, but the diskette is a 40 track diskette. In other words, this bit flag enables double step of magnetic head in read a write operations. >50C5 = Byte: Drive 4 SECTOR/TRACK. Usually is either >09 (Single Density, or >10 (Double Density 16 Sector/Track) or >12 (Double Density 18 Sector/Track). *------ LAST TRACK ACCESSED >50C6 = Byte: Last track accessed of Drive # 1 >50C7 = Byte: " " " of Drive # 2 >50C8 = Byte: " " " of Drive # 3 >50C9 = Byte: " " " of Drive # 4 *-----------------------------------------------------------------------------* >50CA = Word: DSRLNK (or EPROM bank 1) RETURN ADDRESS >50CC = Byte: Flag. If ZERO, the the diskette has been previously accessed. If different from ZERO, then the diskette is handled as if it was never been accessed previously: therefore Sector zero is Read and the DISKETTE TYPE INFORMATION AREA is updated. Also, this byte is <>0 after a Read/Write sector error. >50CD = Byte: Flag. HARD VERIFY DISABLED. It reflects the condition of CRU bit 2 after a TB (TB 2). If ZERO, then VERIFY is ENABLED. PLEASE NOTE THAT A VERIFY IN MYARC DC ONLY IMPLIES READING BACK THE GIVEN SECTOR (to >4000 EPROM, a "deaf" area!). No match between the diskette sector content and the BUFFER area is ever performed This, in my opinion, is a strange approach. Myarc approach is entirely different from TI and CORCOMP, that do allow checking of the written sector against the BUFFER content. The Myarc Verify is based only on CRC, LOST DATA, SECTOR NOT FOUND ERRORS. It does not ensure that all the bytes you have passed to the diskette have been really written on the diskette. If, by any means, you bump into an hardware or software failure AND a different sector is accessed, NO ERROR IS EVER REPORTED! If the >50CD byte is different from ZERO, then VERIFY is disabled. >50CE = Byte: Flag. If ZERO, then the Read/Write sector and Initialize routnes will use the VPD RAM BUFFER. If different from ZERO, then the same routines will use a CPU RAM BUFFER (pointed, as usual, by the sane address in the FAC area. This way is faster than having to deal with VPD buffer. >50CF - = Byte: # of maximum files you can open from Basic or Assembler. It is the # of Files you want to allow with a CALL FILES from Basic. Paolo Bagnaresi, Via J.F. Kennedy 17, San Donato Milanese, Italy ~- % ~- File name : MYARC-FDC2 Stored on disk TECH-NOTES * Filename : MYARC-FDC2 - Actual code example is on files 80T-INIT-A thru D **************************************************************************** * MYARC DISK CONTROLLER INFORMATIONS ******************************************************************************** Paolo Bagnaresi Via Kennedy 17 20097 San donato Milanese ITALY - Phone (02)-514.202 ******************************************************************************** INTERNAL RAM ORGANIZATION (follows from previous file) ========================= >50D0 - >51CF = >100 bytes taken from sector ZERO of the diskette last accessed. This is the standard layout of sector ZERO. >50D0 - >50D9 = 10 bytes: DISKNAME, padded to the right with blancks. >50DA - >50DB = Total sector/disk: >0168 for 360 sectors >0280 " 640 " >02D0 " 720 " >0500 " 1280 " >05A0 " 1400 " >0A00 " 2560 " >0B40 " 2880 " >50DC = Byte: Sector/Track. - >09 = 9 (Single Density) - >10 = 16 (Double Density Myarc) - >12 = 18 (Double Density Myarc or CorComp). >50DD - >50DF = 3 Bytes: 'DSK' identifier. >50E0 = Byte: Disk Proprietary Protection >20 -> Not protected, >50 Protected. >50E1 = Byte: Track/Side. Usually either >28 (40 Track) or >50 (80 Track). >50E2 = Byte: Disk Side. >01 Single Side, >02 Double Side. >50E3 = Byte: Disk Density. >01 Single Density, >02 Double Density. >50E4 - >5107 = All >0000. Reserved area. >5018 ..>51CF = Used sector bit map. The actual lenght depends on a side/density factor. There are: >2D (45) bytes for Single Side/Single Dens. ( 9 Sector/Track) >5A (90) " " Double " / " " ( 9 " / " ) >5A (90) " " Single " /Double " (18 " / " ) >A0 (160) " " Double " / " " (16 " / " ) >B4 (180) " " " " / " " (18 " / " ) DISK BUFFERING AREA: The last FILE CONTROL BLOCK # available is always used before the others. ******************* 1st FILE CONTROL BLOCK= >108 bytes: 8 bytes for description, >100 bytes sector ------------------------------------------------------------------------------- >50D0 = Byte: EOF offset for DIS/VAR type file. It will be zeroed when the file is closed. >51D1 = Byte: Drive # used, real number. It will be zeroed when the file is closed. >51D2 - >52D3 = Sector # where the NAME OF THE FILE is kept. >51D4 - >50D5 = Word: The first nibble is the FILE/TYPE. The second nibble, and the second byte, together, point to the last used sector. >51D6 - >51D7 = Word: Total sectors engaged for this file. >51D8 - >52D7 = >100 bytes brought directly from the NAME OF THE FILE sector. OFFSET >51D8 - >51E1 = >00 10 Bytes= FILENAME >51E2 - >51E3 = >0A Word = >0000 = Reserved >51E4 = >0C Byte = File Status Flag (File Type and Write Protection) >51E5 = >0D Byte = Max # of records per Sector = >03 for a 80 DIS/VAR file. >51E6 - >51E7 = >0E Word = Number of sectors currently allocated. >51E8 = >10 Byte = End Of File offset within the last used sector. >51E9 = >11 Byte = Logical Record Length. >50 for a DIS/VAR 80 file. >51EA - >51EB = >12 Word = # of FIXED length records or # of sectors for VARIABLE length (the bytes are reversed, LSB|MSB should be MSB|LSB. >51EC - >51F3 = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved. >51F4 - >51F6 = >1C 3 Bytes = Sector # of first sector and # of following sectors. Nibble are reversed. Also, if next 3 bytes are not zero, fracturing map. 2nd FILE CONTROL BLOCK = >108 bytes: 8 bytes for description, >100 bytes sector ------------------------------------------------------------------------------- >52D8 = Byte: EOF offset for DIS/VAR type file. It will be zeroed when the file is closed. >52D9 = Byte: Drive # used, real number. It will be zeroed when the file is closed. >52DA - >52DB = Sector # where the NAME OF THE FILE is kept. >52DC - >50DD = Word: The first nibble is the FILE/TYPE. The second nibble, and the second byte, together, point to the last used sector. >52DE - >52DF = Word: Total sectors engaged for this file. >52E0 - >53DF = >100 bytes brought directly from the NAME OF THE FILE sector. OFFSET >52E0 - >52E9 = >00 10 Bytes= FILENAME >52EA - >52EB = >0A Word = >0000 = Reserved >52EC >0C Byte = File Status Flag (File Type and Write Protection) >52ED = >0D Byte = Max # of records per Sector = >03 for a 80 DIS/VAR file. >52EE - >52EF = >0E Word = Number of sectors currently allocated. >52F0 = >10 Byte = End Of File offset within the last used sector. >52F1 = >11 Byte = Logical Record Length. >50 for a DIS/VAR 80 file. >52F2 - >52F3 = >12 Word = # of FIXED length records or # of sectors for VARIABLE length (the bytes are reversed, LSB|MSB should be MSB|LSB. >52F4 - >52FB = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved. >52FC - >52FE = >1C 3 Bytes = Sector # of first sector and # of following sectors. Nibble are reversed. Also, if next 3 bytes are not zero, fracturing map. 3rd FILE CONTROL BLOCK = >108 bytes: 8 bytes for description, >100 bytes sector ------------------------------------------------------------------------------- >53E0 = Byte: EOF offset for DIS/VAR type file. It will be zeroed when the file is closed. >53E1 = Byte: Drive # used, real number. It will be zeroed when the file is closed. >53E2 - >53E3 = Sector # where the NAME OF THE FILE is kept. >53E4 - >53E5 = Word: The first nibble is the FILE/TYPE. The second nibble, and the second byte, together, point to the last used sector. >53E6 - >53E7 = Word: Total sectors engaged for this file. >53E8 - >54E7 = >100 bytes brought directly from the NAME OF THE FILE sector. OFFSET >53E8 - >53F1 = >00 10 Bytes= FILENAME >53F2 - >53F3 = >0A Word = >0000 = Reserved >53F4 = >0C Byte = File Status Flag (File Type and Write Protection) >53F5 = >0D Byte = Max # of records per Sector = >03 for a 80 DIS/VAR file. >53F6 - >53F7 = >0E Word = Number of sectors currently allocated. >53F8 = >10 Byte = End Of File offset within the last used sector. >53F9 = >11 Byte = Logical Record Length. >50 for a DIS/VAR 80 file. >53FA - >53FB = >12 Word = # of FIXED length records or # of sectors for VARIABLE length (the bytes are reversed, LSB|MSB should be MSB|LSB. >53FC - >5403 = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved. >5404 - >5406 = >1C 3 Bytes = Sector # of first sector and # of following sectors. Nibble are reversed. Also, if next 3 bytes are not zero, fracturing map. 4th FILE CONTROL BLOCK = >108 bytes: 8 bytes for description, >100 bytes sector ------------------------------------------------------------------------------- >54E8 = Byte: EOF offset for DIS/VAR type file. It will be zeroed when the file is closed. >54E9 = Byte: Drive # used, real number. It will be zeroed when the file is closed. >54EA - >54EB = Sector # where the NAME OF THE FILE is kept. >54EC - >54ED = Word: The first nibble is the FILE/TYPE. The second nibble, and the second byte, together, point to the last used sector. >54EE - >54EF = Word: Total sectors engaged for this file. >54F0 - >55EF = >100 bytes brought directly from the NAME OF THE FILE sector. OFFSET >54F0 - >54F9 = >00 10 Bytes= FILENAME >54FA - >54FB = >0A Word = >0000 = Reserved >54FC >0C Byte = File Status Flag (File Type and Write Protection) >54FD = >0D Byte = Max # of records per Sector = >03 for a 80 DIS/VAR file. >54FE - >54FF = >0E Word = Number of sectors currently allocated. >5500 = >10 Byte = End Of File offset within the last used sector. >5501 = >11 Byte = Logical Record Length. >50 for a DIS/VAR 80 file. >5502 - >5503 = >12 Word = # of FIXED length records or # of sectors for VARIABLE length (the bytes are reversed, LSB|MSB should be MSB|LSB. >5504 - >550B = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved. >550C - >550E = >1C 3 Bytes = Sector # of first sector and # of following sectors. Nibble are reversed. Also, if next 3 bytes are not zero, fracturing map. 5th FILE CONTROL BLOCK = >108 bytes: 8 bytes for description, >100 bytes sector ------------------------------------------------------------------------------- >55F0 = Byte: EOF offset for DIS/VAR type file. It will be zeroed when the file is closed. >55F1 = Byte: Drive # used, real number. It will be zeroed when the file is closed. >55F2 - >55F3 = Sector # where the NAME OF THE FILE is kept. >55F4 - >55F5 = Word: The first nibble is the FILE/TYPE. The second nibble, and the second byte, together, point to the last used sector. >55F6 - >55F7 = Word: Total sectors engaged for this file. >55F8 - >56F7 = >100 bytes brought directly from the NAME OF THE FILE sector. OFFSET >55F8 - >5601 = >00 10 Bytes= FILENAME >5602 - >5603 = >0A Word = >0000 = Reserved >5604 = >0C Byte = File Status Flag (File Type and Write Protection) >5605 = >0D Byte = Max # of records per Sector = >03 for a 80 DIS/VAR file. >5606 - >5607 = >0E Word = Number of sectors currently allocated. >5608 = >10 Byte = End Of File offset within the last used sector. >5609 = >11 Byte = Logical Record Length. >50 for a DIS/VAR 80 file. >560A - >560B = >12 Word = # of FIXED length records or # of sectors for VARIABLE length (the bytes are reversed, LSB|MSB should be MSB|LSB. >560C - >5613 = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved. >5614 - >5616 = >1C 3 Bytes = Sector # of first sector and # of following sectors. Nibble are reversed. Also, if next 3 bytes are not zero, fracturing map. 6th FILE CONTROL BLOCK = >108 bytes: 8 bytes for description, >100 bytes sector ------------------------------------------------------------------------------- >56F8 = Byte: EOF offset for DIS/VAR type file. It will be zeroed when the file is closed. >56F9 = Byte: Drive # used, real number. It will be zeroed when the file is closed. >56FA - >56FB = Sector # where the NAME OF THE FILE is kept. >56FC - >56FD = Word: The first nibble is the FILE/TYPE. The second nibble, and the second byte, together, point to the last used sector. >56FE - >56FF = Word: Total sectors engaged for this file. >5700 - >57FF = >100 bytes brought directly from the NAME OF THE FILE sector. OFFSET >5700 - >5709 = >00 10 Bytes= FILENAME >570A - >570B = >0A Word = >0000 = Reserved >570C >0C Byte = File Status Flag (File Type and Write Protection) >570D = >0D Byte = Max # of records per Sector = >03 for a 80 DIS/VAR file. >570E - >570F = >0E Word = Number of sectors currently allocated. >5710 = >10 Byte = End Of File offset within the last used sector. >5711 = >11 Byte = Logical Record Length. >50 for a DIS/VAR 80 file. >5712 - >5713 = >12 Word = # of FIXED length records or # of sectors for VARIABLE length (the bytes are reversed, LSB|MSB should be MSB|LSB. >5714 - >571B = >14 4 Words = >0000,>0000,>0000,>0000 : Reserved. >571C - >571E = >1C 3 Bytes = Sector # of first sector and # of following sectors. Nibble are reversed. Also, if next 3 bytes are not zero, fracturing map. ******************************************************************************** >577F Note = Last location in Myarc FDC RAM.