.xlist ; Don't List this file .sall ; Don't List the expanded macros Title MD11 Rev 15 1_Sept_83 Copyright 1983 Morrow Designs Inc. ;Subttl -Global System Equates (Rev_15 1_Sept_83) ;------------------------------------------------ ; ; Copyright 1983 ; Morrow Designs, Inc. ; San Leandro, Ca. ; ; ; This module is included in all of the MD11 source files. It ; contains all of the definitions which a) need to be globally accessed, ; (e.g. the ASCII character equates) and/or b) definitions which need to ; be globally managed (e.g. address definitions). ; Address definitions deserve further comment. ALL address usage ; is declared in this module. This is done to make memory management ; easier. It is NOT done to facilitate the sharing of data between ; modules. This practice should be avoided within this piece of software. ; Parameters are passed by using the General Operations Data ; Area. Provisions have been made in the cbios to overlay the user ; application interface portion of the general operations data area. ; ; Index of Definition Module ;--------------------------- ; ; Identification Information ; ; I/O Registers - Serial Ports ; I/O Registers - Counter Timer Chip ; I/O Registers - Disk Read ; I/O Registers - Disk Write ; ASCII character equates ; ; Disk Operation Error Codes ; Module Starting Addresses ; General Address Definitions ; Disk Module Address Definitions ; Test Module Address Definitons ; ; General Operations Data Area Definitions ; offsets within the Applications Interface Area ; MTAB Table Format (there must be 1 MTAB for each logical drive) ; page 64 ; ; Identification Information (1_Sept_83) ;--------------------------------------- ; RomRev equ 40h ;Rom Revision Number Clevel equ 0 ;Compatibility Level ; I/O Registers - Serial Ports ;----------------------------- ; s1data equ 60h ;serial port 1 data (dart1 = console port) s1stat equ 61h ;serial port 1 status s2data equ 62h ;serial port 2 data (dart2 = printer port) s2stat equ 63h ;serial port 2 status s3data equ 70h ;serial port 3 data (sio) s3stat equ 71h ;serial port 3 status (sio) ; I/O Registers - Counter Timer Chip ;----------------------------------- ; 1) The labels baud0, baud1 and baud2 correspond to the schematic labels ; for the signals carrying the baud rate clocks to the dart/sio. baud0 ; is the clock for serial port 1. ; baudset equ 53h ;ctc channel select/mode port baud0 equ 52h ;baud rate control for serial port 1 (consol) baud1 equ 51h ;baud rate control for serial port 2 baud2 equ 50h ;baud rate control for serial port 3 ; I/O Registers - Disk Read ;-------------------------- ; cstat equ 0C1h ;Centronics status port $DIAGM equ 00001000b ; Select diagnostics mode ; $MTR equ 00000010b ; Motor on (drive active) $CNTRDY equ 00000001b ; Centronics Ready line clrint equ 0C2h ;Clear interrupts ; I/O Registers - Disk Write ;--------------------------- ; bnkstb equ 41h ;Bank Strobe $CNTIRQ equ 10000000b ; Centronics interrupt enable $XFER equ 01000000b ; Inter-bank transfer (1=true) $MTRON equ 00100000b ; Motor On $AUTOE equ 00010000b ; Hard Disk Read/Write $CNTSTB equ 00001000b ; Printer Strobe $CNTRST equ 00000100b ; Printer Restore $BANK2 equ 00000010b ; Select Bank 2 (1=true) $_RMENB equ 00000001b ; Enable Rom (0=true) cdata equ 42h ;Centronics data port ; page ; ASCII character equates ;------------------------ ; cr equ 0Dh ;carriage return lf equ 0Ah ;line feed bell equ 07h ;bell asc0 equ '0' ;ascii 0 asca equ 'A' ;ascii A asci equ 'I' ;ascii I ascr equ 'R' ;ascii R ; Bios Level Disk Operation Error Codes (31_Oct_83) ;-------------------------------------------------- ; 1) This is a table of the error codes that are passed to the bios. ; ERwp equ 1 ;Write Protected ERsk equ 2 ;Seek Error ERcrc equ 3 ;CRC Error ERnr equ 4 ;Not Ready ERef equ 5 ;Equipment Failure ERnf equ 6 ;Not Found ERmf equ 7 ;Media Failure ERuk equ 8 ;Unknown Error Code ; Module Starting Addresses ;-------------------------- ; o_main equ 0 ;Main line (hd*main.mac) o_io equ 220h ;Rom Level I/O (hd*io.mac) o_bios equ 380h ;Rom Level Bios Support (hd*bios.mac) o_disk equ 600h ;Disk Drivers (hd*disk.mac) o_test equ 1900h ;Test and Diagnostics (hd*test.mac) o_hirm equ 1E00h ;Code for hard disk drivers (hd*hirm.mac) ; General Address Definitions ;---------------------------- ; rom equ 0 ;Start of the ROM memtop equ 0FFFFh ;Top of Ram tstbuf equ memtop - 20 ;start of the test module's variable area CSboot equ 0FE00h ;Cold Start Boot loader execution location combuf equ 0FE00h ;Start of the Common Buffer for disk operations ramdat equ 0FC00h ;Start of the default IX, IY and MTABs stack equ 0FC00h ;Stack dskbuf equ 2800h ;Start of the Disk Buffer prebuf equ dskbuf - 20h ;Main Entry Point to the read/write routines postbuf equ dskbuf + 400h ;End of the disk buffer genbuf equ dskbuf + 440h ;Start of the Scratch buffer fmtbuf equ dskbuf + 480h ;Start of the Format Buffer page ; Disk Module Address Definitions ;-------------------------------- ; ;Pre-Buffer Definitions hdID1 equ prebuf+2 ;Hard Disk ID 1 (Sector Header Sync and ID) hngloc equ prebuf+3 ;Location of the PCHL (hang location) header equ prebuf+4 ;Header Image address hdID2 equ prebuf+0Ch ;Hard Disk ID 2 (Data Header Sync and ID) hdID3 equ prebuf+1Eh ;Hard Disk ID 3 (Data Header Sync and ID) ;General Buffer Definitions cpydrv equ genbuf ;Copy of Drive Strobe Register (drvstb) cpymod equ genbuf+1 ;Copy of Mode Register (mode) revs equ genbuf+2 ;Number of revolutions before index error error equ genbuf+3 ;Temp Error register for floppy disk operations fmoton equ genbuf+4 ;Floppy Motor On Flag rtycnt equ genbuf+5 ;Current Retry count blocks equ genbuf+6 ;Number 32 byte blocks for current sector size filchr equ genbuf+7 ;Fill byte (4E or FF) crnsec equ genbuf+8 ;Current sector count cyltbl equ genbuf+9 ;Current Cylinder Table ;Format Buffer Definitions gaptbl equ fmtbuf ;Define the start of the format table gap1 equ fmtbuf ;Post index gap gap3 equ fmtbuf+1 ;Inter-Sector gap gap5 equ fmtbuf+2 ;Pre-ID-Index mark gap HDstbl equ fmtbuf+3 ;Hard Disk Sector Skew Table FDstbl equ fmtbuf+12 ;Floppy Disk Sector Skew Table ;Disk Interrupt Vector Locations IRQbase equ memtop and 0FF00h ;Page address of interrupt vector table FDIvct equ IRQbase or 0F0h ;Floppy Disk Index Vector FDMvct equ IRQbase or 0F2h ;Floppy Disk Match Vector HDIvct equ IRQbase or 0F4h ;Hard Disk Index Vector HDMvct equ IRQbase or 0F6h ;Hard Disk Match Vector ; Test Module Address Definitons ;------------------------------- ; port equ tstbuf ;port to test stored here by diagnose bgnchar equ tstbuf + 1 ;starting character for barber-pole test mempass equ tstbuf ;number of memory passes errors equ tstbuf + 1 ;number of memory errors made ; page ; offsets within the General Operations Data Area ;------------------------------------------------ sekdsk equ 0 ;BDOS disk number sektrk equ 1 ;BDOS track number ; seksec equ 3 ;BDOS sector number ; sekhst equ 5 ;Sector number on the disk ; unacnt equ 7 ;unallocated rec count unadsk equ 8 ;unallocated disk unatrk equ 9 ;unallocated track ; unasec equ 11 ;unallocated sector ; unamax equ 13 ;sectors per allocation block sectrk equ 14 ;Logical Sectors per track ; physpt equ 16 ;Physical Sectors per track wrtype equ 17 ;write type wrall equ 0 ; write allocatted wrdir equ 1 ; write directroy wrual equ 2 ; write unallocatted cflag equ 18 ;flag: Bit ; 0 - 3 Not Used @hwsync equ 4 ; 4 Hardware handshake @cenlst equ 5 ; 5 List device is Centronics @imsact equ 6 ; 6 In memory submit flag (1=sub active) @imswet equ 7 ; 7 IMS buffer full (1=buffer has chars) dflag equ 19 ;flag: Bit hstacô equ 0 ; 0 hosô activå flaç (1=sector in buffer) hstwrô equ 1 ; 1 hosô writteî flaç (1=buffer writteî) rsflag equ 2 ; 2 read sector flag (1=need a read) readop equ 3 ; 3 read operation flag (1=read 0=write) ; 4 - 7 Not Used trseã equ 20 ;offset to logicaì sectoò withiî physicaì sectoò vmsgp equ 21 ;pointer to virt drive mesg. ; vdrvp equ 23 ;pointer to virt drive in mesg. ; cdsk equ 25 ;current drive vdsk equ 26 ;current virtual drive dmaadr equ 27 ;BDOS dma address ; cnout equ 29 ;pointer to current console output routine ; cnin equ 31 ;pointer to current console input routine ; cnsts equ 33 ;Pointer to the current console input status routine ; cpybnk equ 35 ;Copy of the Current value of the bnkstb (port 41h) GOleng equ 36 ;Define the length of the general operations area AIoff equ 36 ;Define offset from start of IY to start of AI ; page ; offsets within the Application Interface Area ;---------------------------------------------- hstdsk equ 0 + AIoff ;host disk (forms pointer to MTAB) hsttrk equ 1 + AIoff ;host track ; hstsec equ 3 + AIoff ;host sector (physical sector) ; seccnt equ 5 + AIoff ;sector count is number of sectors to transfer retry equ 6 + AIoff ;retry count = retries for read/write operations hstbuf equ 7 + AIoff ;pointer to disk data buffer ; erflag equ 9 + AIoff ;error flag opflag equ 10 + AIoff ;options flag @serd equ 7 ; 7 Suppress Error Display @serur equ 6 ; 6 Suppress User response to errors @nover equ 5 ; 5 Supress Verification of track on seek @recal equ 4 ; 4 Recalibrate the drive @wrhst equ 3 ; 3 Host Write Operations Flag phytrk equ 11 + AIoff ;Physical Track ; physec equ 13 + AIoff ;Physical Sector phyhd equ 14 + AIoff ;Physical Head phydrv equ 15 + AIoff ;Physical Drive address ioadd equ 16 + AIoff ;execution address of disk i/o (rdio/wrio/fmtio) ;(high byte of execution address) AIleng equ 18 ;Define the length of the Application Interface MToff equ 18 + AIoff ;Define offset from start of IY to start of MTAB ; page ; MTAB Table Format (there must be 1 MTAB for each logical drive) ;---------------------------------------------------------------- ; ;Static Drive Parameters dskdef0 equ 0 ;Flag Register (Active=True=Asserting=1) @VD equ 7 ; Virtual Drive (1) @FRGN equ 6 ; Foreign Drive (1) @SECZRO equ 5 ; Sector numbers start at zero (1) @DBLMED equ 2 ; Double(1)/Single Sided Media $HDMSK equ 00011100b ; Head Mask ; ; $PHYADR equ 00000011b ; Physical Drive Mask @HRDDSK equ 1 ; Hard Disk Flag ; Dynamic Drive Parameters dskdef1 equ 1 ;Flag Register (Active=True=Asserting=1) @DRVCAL equ 7 ; Drive Calibrated(1) @DRVRDY equ 6 ; Drive Has Ready Line(1) @DRVDEN equ 5 ; Double(1)/Single Density Media @DRVSIZ equ 4 ; Standard_8"(1)/Mini_5.25" Select ; Spare @FSTSEK equ 2 ; Drive has Fast Seek capabilities $SIZMSK equ 00000011b ; Sector Mask ; 00 - 128 Bytes/sector ; 01 - 256 Bytes/sector ; 10 - 512 Bytes/sector ; 11 - 1024 Bytes/sector CRNCYL equ 2 ;Current Cylinder (lo) ; MAXCYL equ 4 ;Maximum Number of Cylinders (lo) ; STPRAT equ 6 ;Step Rate STPSET equ 7 ;Step Settling Time STPRCL equ 8 ;Recalibration Step Rate HLDDLY equ 9 ;Head Load delay time MOTDLY equ 10 ;Motor On delay time STRPRE equ 11 ;Starting Track of Write Pre-Compensation (lo) ; STRLOC equ 13 ;Starting Track of Lo-Current (lo) ; FMTTYP equ 15 ;Format Type .list