OpenCores
URL https://opencores.org/ocsvn/System09/System09/trunk

Subversion Repositories System09

[/] [System09/] [trunk/] [src/] [sys09bug/] [sys09atl.lst] - Diff between revs 218 and 221

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 218 Rev 221
Line 47... Line 47...
0020                                IFD XESOPT
0020                                IFD XESOPT
0021                         MONEXT EQU $F000  START OF EXTENDED COMMANDS
0021                         MONEXT EQU $F000  START OF EXTENDED COMMANDS
0022                         EXTCMD EQU $00    EXTENDED OFFSET
0022                         EXTCMD EQU $00    EXTENDED OFFSET
0023                                ENDIF XESOPT
0023                                ENDIF XESOPT
0023                                ENDIF XESOPT
0023                                ENDIF XESOPT
0024                                IFD DE270OPT
0024                                IFD ATLOPT
0025                         MONEXT EQU $F000  START OF EXTENDED COMMANDS
0025 F000                    MONEXT EQU $F000  START OF EXTENDED COMMANDS
0026                         EXTCMD EQU $00    EXTENDED OFFSET
0026 0000                    EXTCMD EQU $00    EXTENDED OFFSET
0027                                ENDIF DE270OPT
0027                                ENDIF ATLOPT
0027                                ENDIF DE270OPT
0028                                IFD DE270OPT
0028                         **************************************************
0029                         MONEXT EQU $F000  START OF EXTENDED COMMANDS
0029                         **************************************************
0030                         EXTCMD EQU $00    EXTENDED OFFSET
0030
0031                                ENDIF DE270OPT
0031                                 IFD SWTOPT
0031                                ENDIF DE270OPT
0032                         *
0032                         **************************************************
0033                         * SOUTH WEST TECHNICAL PRODUCTS COMPUTER
0033                         **************************************************
0034                         *
0034
0035                         ACIAOPT EQU $FF ACIA AT PORT 0
0035                                 IFD SWTOPT
0036                         DMAFOPT EQU $FF DMAF2 8" FLOPPY DISK BOOT
0036                         *
0037                         MFDCOPT EQU $FF MINIFLOPPY 5.25" DISK BOOT
0037                         * SOUTH WEST TECHNICAL PRODUCTS COMPUTER
0038                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0038                         *
0039                                 ENDIF
0039                         ACIAOPT EQU $FF ACIA AT PORT 0
0039                                 ENDIF
0040                         DMAFOPT EQU $FF DMAF2 8" FLOPPY DISK BOOT
0040                         *
0041                         MFDCOPT EQU $FF MINIFLOPPY 5.25" DISK BOOT
0041                                 IFD ADSOPT
0042                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0042                         *
0043                                 ENDIF
0043                         * ACKERMAN DIGITAL ADS6809
0043                                 ENDIF
0044                         *
0044                         *
0045                         DG640OPT  EQU $FF DG640 VDU AT $E800
0045                                 IFD ADSOPT
0046                         *RTCOPT  EQU $FF REAL TIME CLOCK
0046                         *
0047                         PRTOPT  EQU $FF PRINTER DRIVERS
0047                         * ACKERMAN DIGITAL ADS6809
0048                         MFDCOPT EQU $FF MINIFLOPPY 5.25" DISK BOOT
0048                         *
0049                                 ENDIF ADSOPT
0049                         DG640OPT  EQU $FF DG640 VDU AT $E800
0049                                 ENDIF ADSOPT
0050                         *RTCOPT  EQU $FF REAL TIME CLOCK
0050                         *
0051                         PRTOPT  EQU $FF PRINTER DRIVERS
0051                                 IFD B3SOPT
0052                         MFDCOPT EQU $FF MINIFLOPPY 5.25" DISK BOOT
0052                         *
0053                                 ENDIF ADSOPT
0053                         * BURCHED SPARTAN 2 B3+
0053                                 ENDIF ADSOPT
0054                         *
0054                         *
0055                         ACIAOPT EQU $FF ACIA AT PORT 0
0055                                 IFD B3SOPT
0056                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0056                         *
0057                         VDUOPT  EQU $FF VDU AT $E030
0057                         * BURCHED SPARTAN 2 B3+
0058                         IDEOPT  EQU $FF IDE AT $E100
0058                         *
0059                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0059                         ACIAOPT EQU $FF ACIA AT PORT 0
0060                         HFCOPT  EQU $FF HARDWARE FLOW CONTROL
0060                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0061                                 ENDIF B3SOPT
0061                         VDUOPT  EQU $FF VDU AT $E030
0061                                 ENDIF B3SOPT
0062                         IDEOPT  EQU $FF IDE AT $E100
0062                         *
0063                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0063                                 IFD B5XOPT
0064                         HFCOPT  EQU $FF HARDWARE FLOW CONTROL
0064                         *
0065                                 ENDIF B3SOPT
0065                         * BURCHED SPARTAN 2 B5-X300
0065                                 ENDIF B3SOPT
0066                         *
0066                         *
0067                         ACIAOPT EQU $FF ACIA AT PORT 0
0067                                 IFD B5XOPT
0068                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0068                         *
0069                         VDUOPT  EQU $FF VDU AT $E030
0069                         * BURCHED SPARTAN 2 B5-X300
0070                         CF8OPT  EQU $FF COMPACT FLASH AT $E040
0070                         *
0071                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0071                         ACIAOPT EQU $FF ACIA AT PORT 0
0072                         HFCOPT  EQU $FF HARDWARE FLOW CONTROL
0072                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0073                                 ENDIF B5XOPT
0073                         VDUOPT  EQU $FF VDU AT $E030
0073                                 ENDIF B5XOPT
0074                         CF8OPT  EQU $FF COMPACT FLASH AT $E040
0074                         *
0075                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0075                                 IFD S3SOPT
0076                         HFCOPT  EQU $FF HARDWARE FLOW CONTROL
0076                         *
0077                                 ENDIF B5XOPT
0077                         * DIGILENT SPARTAN 3 STARTER
0077                                 ENDIF B5XOPT
0078                         *
0078                         *
0079                         ACIAOPT EQU $FF ACIA AT PORT 0
0079                                 IFD S3SOPT
0080                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0080                         *
0081                         VDUOPT  EQU $FF VDU AT $E030
0081                         * DIGILENT SPARTAN 3 STARTER
0082                         CF8OPT  EQU $FF COMPACT FLASH AT $E040
0082                         *
0083                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0083                         ACIAOPT EQU $FF ACIA AT PORT 0
0084                         EXTOPT  EQU $FF EXTENDED COMMANDS
0084                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0085                                 ENDIF S3SOPT
0085                         VDUOPT  EQU $FF VDU AT $E030
0085                                 ENDIF S3SOPT
0086                         CF8OPT  EQU $FF COMPACT FLASH AT $E040
0086                         *
0087                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0087                                 IFD S3EOPT
0088                         EXTOPT  EQU $FF EXTENDED COMMANDS
0088                         *
0089                                 ENDIF S3SOPT
0089                         * DIGILENT SPARTAN 3E STARTER
0089                                 ENDIF S3SOPT
0090                         *
0090                         *
0091                         ACIAOPT EQU $FF ACIA AT PORT 0
0091                                 IFD S3EOPT
0092                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0092                         *
0093                         VDUOPT  EQU $FF VDU AT $E030
0093                         * DIGILENT SPARTAN 3E STARTER
0094                         TRAOPT  EQU $FF PIA TRACE TIMER
0094                         *
0095                                 ENDIF S3EOPT
0095                         ACIAOPT EQU $FF ACIA AT PORT 0
0095                                 ENDIF S3EOPT
0096                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0096                         *
0097                         VDUOPT  EQU $FF VDU AT $E030
0097                                 IFD XESOPT
0098                         TRAOPT  EQU $FF PIA TRACE TIMER
0098                         *
0099                                 ENDIF S3EOPT
0099                         * XESS SPARTAN 3 XSA-3S1000 & XST-3.0
0099                                 ENDIF S3EOPT
0100                         *
0100                         *
0101                         ACIAOPT EQU $FF ACIA AT PORT 0
0101                                 IFD XESOPT
0102                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0102                         *
0103                         VDUOPT  EQU $FF VDU AT $E030
0103                         * XESS SPARTAN 3 XSA-3S1000 & XST-3.0
0104                         IDEOPT  EQU $FF IDE AT $E100
0104                         *
0105                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0105                         ACIAOPT EQU $FF ACIA AT PORT 0
0106                         HFCOPT  EQU $FF HARDWARE FLOW CONTROL
0106                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0107                         EXTOPT  EQU $FF EXTENDED COMMANDS
0107                         VDUOPT  EQU $FF VDU AT $E030
0108                                 ENDIF XESOPT
0108                         IDEOPT  EQU $FF IDE AT $E100
0108                                 ENDIF XESOPT
0109                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0109                         *
0110                         HFCOPT  EQU $FF HARDWARE FLOW CONTROL
0110                                 IFD DE270OPT
0111                         EXTOPT  EQU $FF EXTENDED COMMANDS
0111                         *
0112                                 ENDIF XESOPT
0112                         * TERASIC CYCLONE 2 DE2-70
0112                                 ENDIF XESOPT
0113                         *
0113                         *
0114                         ACIAOPT EQU $FF ACIA AT PORT 0
0114                                 IFD ATLOPT
0115                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0115                         *
0116                         VDUOPT  EQU $FF VDU AT $E030
0116                         * Digilent Atlys SPARTAN6
0117                         CF8OPT  EQU $FF COMPACT FLASH AT $E040
0117                         *
0118                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0118 00FF                    ACIAOPT EQU $FF ACIA AT PORT 0
0119                         EXTOPT  EQU $FF EXTENDED COMMANDS
0119 00FF                    PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0120                                 ENDIF DE270OPT
0120 00FF                    VDUOPT  EQU $FF VDU AT $E030
0120                                 ENDIF DE270OPT
0121 00FF                    IDEOPT  EQU $FF IDE AT $E100
0121                         *
0122 00FF                    DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0122                         *
0123 00FF                    HFCOPT  EQU $FF HARDWARE FLOW CONTROL
0123                                 IFD   ACIAOPT
0124 00FF                    EXTOPT  EQU $FF EXTENDED COMMANDS
0124                         *
0125                                 ENDIF ATLOPT
0125                         ***************************************************
0126                         *
0126                         *   SERIAL PORT                                   *
0127                                 IFD DE270OPT
0127                         ***************************************************
 
0128                         *
0128                         *
0129                         ** ACIA SITS ON PORT 0
0129                         * TERASIC CYCLONE 2 DE2-70
0130                         *
0130                         *
0131                         ACIAS   EQU   MONIO+$00   CONTROL PORT
0131                         ACIAOPT EQU $FF ACIA AT PORT 0
0132                         *
0132                         PS2OPT  EQU $FF PS2 KEYBOARD AT $E020
0133                                 ENDIF ACIAOPT
0133                         VDUOPT  EQU $FF VDU AT $E030
0133                                 ENDIF ACIAOPT
0134                         CF8OPT  EQU $FF COMPACT FLASH AT $E040
0134                                 IFD   MFDCOPT
0135                         DATOPT  EQU $FF DYNAMIC ADDRESS TRANSLATION
0135                         *
0136                         EXTOPT  EQU $FF EXTENDED COMMANDS
0136                         ***************************************************
0137                                 ENDIF DE270OPT
0137                         *   MINIFLOPPY DRIVE                              *
0137                                 ENDIF DE270OPT
0138                         ***************************************************
0138                         *
0139                         *
0139                         *
0140                         ** FLOPPY DISK CONTROLLER SITS ON PORT 1
0140                                 IFD   ACIAOPT
0141                         *
0141                         *
0142                         DRVFDC  EQU   MONIO+$14
0142                         ***************************************************
0143                         CMDFDC  EQU   MONIO+$18
0143                         *   SERIAL PORT                                   *
0144                         SECFDC  EQU   MONIO+$1A
0144                         ***************************************************
0145                         DATFDC  EQU   MONIO+$1B
0145                         *
0146                                 ENDIF MFDCOPT
0146                         ** ACIA SITS ON PORT 0
0146                                 ENDIF MFDCOPT
0147                         *
0147                                 IFD PS2OPT
0148 E000                    ACIAS   EQU   MONIO+$00   CONTROL PORT
0148                         *
0149                         *
0149                         ***************************************************
0150                                 ENDIF ACIAOPT
0150                         *   VDU8 PS/2 KEYBOARD PORT                       *
0151                                 IFD   MFDCOPT
0151                         ***************************************************
 
0152                         *
0152                         *
0153                         ** KEYBOARD SITS ON PORT 2
0153                         ***************************************************
0154                         *
0154                         *   MINIFLOPPY DRIVE                              *
0155                         PS2KBD  EQU   MONIO+$20   PS/2 KEYBOARD PORT
0155                         ***************************************************
0156                                 ENDIF PS2OPT
0156                         *
0156                                 ENDIF PS2OPT
0157                         ** FLOPPY DISK CONTROLLER SITS ON PORT 1
0157                                 IFD VDUOPT
 
0158                         *
0158                         *
0159                         ***************************************************
0159                         DRVFDC  EQU   MONIO+$14
0160                         *   VDU8 DISPLAY DRIVER EQUATES                   *
0160                         CMDFDC  EQU   MONIO+$18
0161                         ***************************************************
0161                         SECFDC  EQU   MONIO+$1A
0162                         *
0162                         DATFDC  EQU   MONIO+$1B
0163                         ** VDU8 DISPLAY SITS ON PORT 3
0163                                 ENDIF MFDCOPT
0164                         *
0163                                 ENDIF MFDCOPT
0165                         VDU     EQU   MONIO+$30
0164                                 IFD PS2OPT
0166                         VDUCHR  EQU   0        CHARACTER REGISTER
0165                         *
0167                         VDUATT  EQU   1        ATTRIBUTE REGISTER
0166                         ***************************************************
0168                         VDUCOL  EQU   2        CURSOR COLUMN
0167                         *   VDU8 PS/2 KEYBOARD PORT                       *
0169                         VDUROW  EQU   3        CURSOR ROW
0168                         ***************************************************
0170                         VDUOFF  EQU   4        ROW OFFSET
0169                         *
 
0170                         ** KEYBOARD SITS ON PORT 2
0171                         *
0171                         *
0172                         LINLEN  EQU   80       LENGTH OF A LINE
0172 E020                    PS2KBD  EQU   MONIO+$20   PS/2 KEYBOARD PORT
0173                         NUMLIN  EQU   25       NUMBER OF LINES
0173                                 ENDIF PS2OPT
0174                                 ENDIF VDUOPT
0174                                 IFD VDUOPT
0174                                 ENDIF VDUOPT
 
0175                         *
0175                         *
0176                                    IFD CF8OPT
0176                         ***************************************************
0177                         *
0177                         *   VDU8 DISPLAY DRIVER EQUATES                   *
0178                         ***************************************************
0178                         ***************************************************
0179                         *   COMPACT FLASH EQUATES 8 BIT TRANSFER          *
0179                         *
0180                         ***************************************************
0180                         ** VDU8 DISPLAY SITS ON PORT 3
0181                         *
0181                         *
0182                         ** COMPACT FLASH SITS AT PORT 4
0182 E030                    VDU     EQU   MONIO+$30
0183                         *
0183 0000                    VDUCHR  EQU   0        CHARACTER REGISTER
0184                         CF_BASE    EQU MONIO+$40
0184 0001                    VDUATT  EQU   1        ATTRIBUTE REGISTER
0185                         CF_DATA    EQU CF_BASE+0
0185 0002                    VDUCOL  EQU   2        CURSOR COLUMN
0186                         CF_ERROR   EQU CF_BASE+1 ; read error
0186 0003                    VDUROW  EQU   3        CURSOR ROW
0187                         CF_FEATURE EQU CF_BASE+1 ; write feature
0187 0004                    VDUOFF  EQU   4        ROW OFFSET
0188                         CF_SECCNT  EQU CF_BASE+2
0188                         *
0189                         CF_SECNUM  EQU CF_BASE+3
0189 0050                    LINLEN  EQU   80       LENGTH OF A LINE
0190                         CF_CYLLO   EQU CF_BASE+4
0190 0019                    NUMLIN  EQU   25       NUMBER OF LINES
0191                         CF_CYLHI   EQU CF_BASE+5
0191                                 ENDIF VDUOPT
0192                         CF_HEAD    EQU CF_BASE+6
0192                         *
0193                         CF_STATUS  EQU CF_BASE+7 ; read status
0193                                    IFD CF8OPT
0194                         CF_COMAND  EQU CF_BASE+7 ; write command
0194                         *
0195                         *
0195                         ***************************************************
0196                         * Command Equates
0196                         *   COMPACT FLASH EQUATES 8 BIT TRANSFER          *
0197                         *
0197                         ***************************************************
0198                         CMDREAD    EQU $20 ; Read Single sector
0198                         *
0199                         CMDWRITE   EQU $30 ; Write Single sector
0199                         ** COMPACT FLASH SITS AT PORT 4
0200                         CMDFEATURE EQU $EF
0200                         *
0201                         FEAT8BIT   EQU $01 ; enable 8 bit transfers
0201                         CF_BASE    EQU MONIO+$40
0202                         HEADLBA    EQU $E0
0202                         CF_DATA    EQU CF_BASE+0
0203                         *
0203                         CF_ERROR   EQU CF_BASE+1 ; read error
0204                         * Status bit equates
0204                         CF_FEATURE EQU CF_BASE+1 ; write feature
0205                         *
0205                         CF_SECCNT  EQU CF_BASE+2
0206                         BUSY       EQU $80
0206                         CF_SECNUM  EQU CF_BASE+3
0207                         DRDY       EQU $40
0207                         CF_CYLLO   EQU CF_BASE+4
0208                         DRQ        EQU $08
0208                         CF_CYLHI   EQU CF_BASE+5
0209                         ERR        EQU $01
0209                         CF_HEAD    EQU CF_BASE+6
0210                         *
0210                         CF_STATUS  EQU CF_BASE+7 ; read status
0211                                    ENDIF CF8OPT
0211                         CF_COMAND  EQU CF_BASE+7 ; write command
0211                                    ENDIF CF8OPT
 
0212                         *
0212                         *
0213                                    IFD IDEOPT
0213                         * Command Equates
0214                         *
0214                         *
0215                         ***************************************************
0215                         CMDREAD    EQU $20 ; Read Single sector
0216                         *   COMPACT FLASH EQUATES 16 BIT TRANSFER (XESS)  *
0216                         CMDWRITE   EQU $30 ; Write Single sector
0217                         ***************************************************
0217                         CMDFEATURE EQU $EF
0218                         *
0218                         FEAT8BIT   EQU $01 ; enable 8 bit transfers
0219                         ** COMPACT FLASH SITS AT PORT 4
0219                         HEADLBA    EQU $E0
0220                         *
0220                         *
0221                         CF_BASE    EQU MONIO+$0100
0221                         * Status bit equates
0222                         CF_DATA    EQU CF_BASE+0
0222                         *
0223                         CF_ERROR   EQU CF_BASE+2 ; read error
0223                         BUSY       EQU $80
0224                         CF_FEATURE EQU CF_BASE+2 ; write feature
0224                         DRDY       EQU $40
0225                         CF_SECCNT  EQU CF_BASE+4
0225                         DRQ        EQU $08
0226                         CF_SECNUM  EQU CF_BASE+6
0226                         ERR        EQU $01
0227                         CF_CYLLO   EQU CF_BASE+8
0227                         *
0228                         CF_CYLHI   EQU CF_BASE+10
0228                                    ENDIF CF8OPT
0229                         CF_HEAD    EQU CF_BASE+12
0228                                    ENDIF CF8OPT
0230                         CF_STATUS  EQU CF_BASE+14 ; read status
0229                         *
0231                         CF_COMAND  EQU CF_BASE+14 ; write command
0230                                    IFD IDEOPT
0232                         CF_AUX     EQU CF_BASE+30
0231                         *
0233                         *
0232                         ***************************************************
0234                         * Command Equates
0233                         *   COMPACT FLASH EQUATES 16 BIT TRANSFER (XESS)  *
 
0234                         ***************************************************
0235                         *
0235                         *
0236                         CMDREAD    EQU $20 ; Read Single sector
0236                         ** COMPACT FLASH SITS AT PORT 4
0237                         CMDWRITE   EQU $30 ; Write Single sector
0237                         *
0238                         AUXRESET   EQU $06 ; Reset IDE
0238 E100                    CF_BASE    EQU MONIO+$0100
0239                         AUXRSTREL  EQU $02 ; Reset release IRQ masked
0239 E100                    CF_DATA    EQU CF_BASE+0
0240                         HEADLBA    EQU $E0
0240 E102                    CF_ERROR   EQU CF_BASE+2 ; read error
0241                         *
0241 E102                    CF_FEATURE EQU CF_BASE+2 ; write feature
0242                         * Status bit equates
0242 E104                    CF_SECCNT  EQU CF_BASE+4
0243                         *
0243 E106                    CF_SECNUM  EQU CF_BASE+6
0244                         BUSY       EQU $80
0244 E108                    CF_CYLLO   EQU CF_BASE+8
0245                         DRDY       EQU $40
0245 E10A                    CF_CYLHI   EQU CF_BASE+10
0246                         DRQ        EQU $08
0246 E10C                    CF_HEAD    EQU CF_BASE+12
0247                         ERR        EQU $01
0247 E10E                    CF_STATUS  EQU CF_BASE+14 ; read status
0248                         *
0248 E10E                    CF_COMAND  EQU CF_BASE+14 ; write command
0249                                    ENDIF CF8OPT
0249 E11E                    CF_AUX     EQU CF_BASE+30
0249                                    ENDIF CF8OPT
 
0250                         *
0250                         *
0251                                 IFD RTCOPT
0251                         * Command Equates
0252                         *
0252                         *
0253                         **************************************************
0253 0020                    CMDREAD    EQU $20 ; Read Single sector
0254                         * MM58167A REAL TIME CLOCK MEMORY MAP:
0254 0030                    CMDWRITE   EQU $30 ; Write Single sector
0255                         **************************************************
0255 0006                    AUXRESET   EQU $06 ; Reset IDE
0256                         *
0256 0002                    AUXRSTREL  EQU $02 ; Reset release IRQ masked
0257                         ** REAL TIME CLOCK SITS ON PORT 4 AND PORT 5
0257 00E0                    HEADLBA    EQU $E0
0258                         *
0258                         *
0259                         CLOCK  EQU MONIO+$40 CLOCK BASE ADDRESS AND REGISTERS
0259                         * Status bit equates
0260                         *
0260                         *
0261                         * COUNTER AND COMPARITOR REGISTERS:
0261 0080                    BUSY       EQU $80
0262                         *
0262 0040                    DRDY       EQU $40
0263                         * Both the Clock Counter and Clock Comparitor
0263 0008                    DRQ        EQU $08
0264                         * consist of 8 registers for holding the time.
0264 0001                    ERR        EQU $01
0265                         * The register offsets from the Counter and
0265                         *
0266                         * Comparitor registers are listed above.
0266                                    ENDIF CF8OPT
0267                         *
0267                         *
0268                         COUNTR EQU CLOCK+0
0268                                 IFD RTCOPT
0269                         CMPRAM EQU CLOCK+8 COMPARITOR REGISTERS
0269                         *
0270                         *
0270                         **************************************************
0271                         * CLOCK REGISTER OFFSETS:
0271                         * MM58167A REAL TIME CLOCK MEMORY MAP:
0272                         * These register offsets are used for the CLOCK
0272                         **************************************************
0273                         * and comparitor ram CMPRAM.
0273                         *
0274                         *
0274                         ** REAL TIME CLOCK SITS ON PORT 4 AND PORT 5
0275                         S10000 EQU 0 TEN THOUNSANDTHS OF SECONDS
0275                         *
0276                         S100   EQU 1 HUNDRETHS AND TENTHS OF SECONDS
0276                         CLOCK  EQU MONIO+$40 CLOCK BASE ADDRESS AND REGISTERS
0277                         SECOND EQU 2
0277                         *
0278                         MINUIT EQU 3
0278                         * COUNTER AND COMPARITOR REGISTERS:
0279                         HOUR   EQU 4
0279                         *
0280                         WKDAY  EQU 5
0280                         * Both the Clock Counter and Clock Comparitor
0281                         MTHDAY EQU 6
0281                         * consist of 8 registers for holding the time.
0282                         MONTH  EQU 7
0282                         * The register offsets from the Counter and
0283                         *
0283                         * Comparitor registers are listed above.
0284                         * INTERRUPT OUTPUT REGISTERS:
0284                         *
0285                         *
0285                         COUNTR EQU CLOCK+0
0286                         * An interrupt output may be generated at the
0286                         CMPRAM EQU CLOCK+8 COMPARITOR REGISTERS
0287                         * following rates by setting the appropriate bit
0287                         *
0288                         * in the Interrupt Control Register (CINTCR).
0288                         * CLOCK REGISTER OFFSETS:
0289                         * The Interrupt Status Register (CINTSR) must be
0289                         * These register offsets are used for the CLOCK
0290                         * read to clear the interrupt and will return
0290                         * and comparitor ram CMPRAM.
0291                         * the source of the interrupt.
0291                         *
0292                         *
0292                         S10000 EQU 0 TEN THOUNSANDTHS OF SECONDS
0293                         * 1/Month      Bit 7
0293                         S100   EQU 1 HUNDRETHS AND TENTHS OF SECONDS
0294                         * 1/Week       Bit 6
0294                         SECOND EQU 2
0295                         * 1/Day        Bit 5
0295                         MINUIT EQU 3
0296                         * 1/Hour       Bit 4
0296                         HOUR   EQU 4
0297                         * 1/Minuite    Bit 3
0297                         WKDAY  EQU 5
0298                         * 1/Second     Bit 2
0298                         MTHDAY EQU 6
0299                         * 10/Second    Bit 1
0299                         MONTH  EQU 7
0300                         * Comparitor   Bit 0
0300                         *
0301                         *
0301                         * INTERRUPT OUTPUT REGISTERS:
0302                         CINTSR  EQU CLOCK+16 INTERRUPT STATUS REGISTER
0302                         *
0303                         CINTCR  EQU CLOCK+17 INTERRUPT CONTROL REGISTER
0303                         * An interrupt output may be generated at the
0304                         *
0304                         * following rates by setting the appropriate bit
0305                         * COUNTER AND RAM RESETS; GO COMMAND.
0305                         * in the Interrupt Control Register (CINTCR).
0306                         *
0306                         * The Interrupt Status Register (CINTSR) must be
0307                         * The counter and comparitor may be reset
0307                         * read to clear the interrupt and will return
0308                         * by writing $FF into CTRRES and CMPRES
0308                         * the source of the interrupt.
0309                         * respectivly.
0309                         *
0310                         * A write to the Go command register (GOCMND)
0310                         * 1/Month      Bit 7
0311                         * will reset the 1/1000ths, 1/100ths and 1/10ths
0311                         * 1/Week       Bit 6
0312                         * of a second counter.
0312                         * 1/Day        Bit 5
0313                         *
0313                         * 1/Hour       Bit 4
0314                         CTRRES EQU CLOCK+18 COUNTER RESET
0314                         * 1/Minuite    Bit 3
0315                         CMPRES EQU CLOCK+19 COMPARITOR RAM RESET
0315                         * 1/Second     Bit 2
0316                         GOCMND EQU CLOCK+21 GO COMMAND
0316                         * 10/Second    Bit 1
0317                         *
0317                         * Comparitor   Bit 0
0318                         * CLOCK STATUS REGISTER.
0318                         *
0319                         *
0319                         CINTSR  EQU CLOCK+16 INTERRUPT STATUS REGISTER
0320                         * The counter takes 61 usec. to rollover for
0320                         CINTCR  EQU CLOCK+17 INTERRUPT CONTROL REGISTER
0321                         * every 1KHz clock pulse. If the Status bit is
0321                         *
0322                         * set after reading the counter, the counter
0322                         * COUNTER AND RAM RESETS; GO COMMAND.
0323                         * should be re-read to ensure the time is correct.
0323                         *
0324                         *
0324                         * The counter and comparitor may be reset
0325                         CLKSTA EQU CLOCK+20 STATUS BIT
0325                         * by writing $FF into CTRRES and CMPRES
0326                         SBYINT EQU CLOCK+22 STANDBY INTERRUPT
0326                         * respectivly.
0327                         TSTMOD EQU CLOCK+31 TEST MODE REGISTER
0327                         * A write to the Go command register (GOCMND)
0328                                ENDIF RTCOPT
0328                         * will reset the 1/1000ths, 1/100ths and 1/10ths
0328                                ENDIF RTCOPT
0329                         * of a second counter.
0329                         *
0330                         *
0330                                IFD TRAOPT
0331                         CTRRES EQU CLOCK+18 COUNTER RESET
0331                         *
0332                         CMPRES EQU CLOCK+19 COMPARITOR RAM RESET
0332                         **************************************************
0333                         GOCMND EQU CLOCK+21 GO COMMAND
0333                         * PIA INTERRUPT TIMER
0334                         *
0334                         **************************************************
0335                         * CLOCK STATUS REGISTER.
0335                         *
0336                         *
0336                         ** PIA INTERRUPT TIMER SITS ON PORT 7
0337                         * The counter takes 61 usec. to rollover for
0337                         *
0338                         * every 1KHz clock pulse. If the Status bit is
0338                         ** PIA TIMER FOR SINGLE STEP / TRACE
0339                         * set after reading the counter, the counter
0339                         *
0340                         * should be re-read to ensure the time is correct.
0340                         * TADATA = Output = Timer preset register
0341                         *
0341                         * TACTRL - CA1 = input = rising edge = NMI
0342                         CLKSTA EQU CLOCK+20 STATUS BIT
0342                         *        - CA2 = Output = Timer Reset (Active High)
0343                         SBYINT EQU CLOCK+22 STANDBY INTERRUPT
0343                         * TBDATA = Input = Timer read back register
0344                         TSTMOD EQU CLOCK+31 TEST MODE REGISTER
0344                         * TBCTRL - CB1 = input = rising edge = FIRQ
0345                                ENDIF RTCOPT
0345                         *        - CB2 = output = strobe low on write to TBDATA = Timer Preset
0345                                ENDIF RTCOPT
0346                         *
0346                         *
0347                         * CRA0 = 0 CA1 IRQ DISAB, CRA0 = 1 CA1 IRQ ENAB
0347                                IFD TRAOPT
0348                         * CRA1 = 1 CA1 Rising edge IRQ
0348                         *
0349                         * CRA2 = 0 TADATA = Data Direction, CRA2 = 1 TADATA = I/O Register
0349                         **************************************************
0350                         * CRA3 = 0 CA2 = 0 output, CRA3 = 1 CA2 = 1
0350                         * PIA INTERRUPT TIMER
0351                         * CRA4 = 1 ] CA2 = Set/Reset output
0351                         **************************************************
0352                         * CRA5 = 1 ]
0352                         *
0353                         * CRA6 = X CA2 Input Interrupt Flag
0353                         ** PIA INTERRUPT TIMER SITS ON PORT 7
0354                         * CRA7 = X CA1 Interrupt Flag
0354                         *
0355                         *
0355                         ** PIA TIMER FOR SINGLE STEP / TRACE
0356                         * CRB0 = 0 CB1 IRQ DISAB, CRB0 = 1 CA1 IRQ ENAB
0356                         *
0357                         * CRB1 = 1 CB1 Rising edge IRQ
0357                         * TADATA = Output = Timer preset register
0358                         * CRB2 = 0 TBDATA = Data Direction, CRB2 = 1 TBDATA = I/O Register
0358                         * TACTRL - CA1 = input = rising edge = NMI
0359                         * CRB3 = 0 CB2 = 0 output, CRB3 = 1 CB2 = 1
0359                         *        - CA2 = Output = Timer Reset (Active High)
0360                         * CRB4 = 1 ] CB2 = Set/Reset output
0360                         * TBDATA = Input = Timer read back register
0361                         * CRB5 = 1 ]
0361                         * TBCTRL - CB1 = input = rising edge = FIRQ
0362                         * CRB6 = X CB2 Input Interrupt Flag
0362                         *        - CB2 = output = strobe low on write to TBDATA = Timer Preset
0363                         * CRB7 = X CB1 Interrupt Flag
0363                         *
0364                         *
0364                         * CRA0 = 0 CA1 IRQ DISAB, CRA0 = 1 CA1 IRQ ENAB
0365                         * DDRA = 0 TADATA = Input, DDRA = 1 TADATA = Output
0365                         * CRA1 = 1 CA1 Rising edge IRQ
0366                         * DDRB = 0 TBDATA = Input, DDRB = 1 TBDATA = Output
0366                         * CRA2 = 0 TADATA = Data Direction, CRA2 = 1 TADATA = I/O Register
0367                         *
0367                         * CRA3 = 0 CA2 = 0 output, CRA3 = 1 CA2 = 1
0368                         TADATA EQU MONIO+$70 Timer preset port
0368                         * CRA4 = 1 ] CA2 = Set/Reset output
0369                         TACTRL EQU MONIO+$71
0369                         * CRA5 = 1 ]
0370                         TBDATA EQU MONIO+$72 Timer read back port
0370                         * CRA6 = X CA2 Input Interrupt Flag
0371                         TBCTRL EQU MONIO+$73
0371                         * CRA7 = X CA1 Interrupt Flag
0372                         *
0372                         *
0373                         TRADEL EQU 13  Number of E cycles for RTI (May need to be fudged)
0373                         * CRB0 = 0 CB1 IRQ DISAB, CRB0 = 1 CA1 IRQ ENAB
0374                         *
0374                         * CRB1 = 1 CB1 Rising edge IRQ
0375                                ENDIF TRAOPT
0375                         * CRB2 = 0 TBDATA = Data Direction, CRB2 = 1 TBDATA = I/O Register
0375                                ENDIF TRAOPT
0376                         * CRB3 = 0 CB2 = 0 output, CRB3 = 1 CB2 = 1
0376                                IFD ADSOPT
0377                         * CRB4 = 1 ] CB2 = Set/Reset output
0377                         *
0378                         * CRB5 = 1 ]
0378                         ***************************************************
0379                         * CRB6 = X CB2 Input Interrupt Flag
0379                         *   SERIAL PORT FOR DG640                         *
0380                         * CRB7 = X CB1 Interrupt Flag
0380                         ***************************************************
 
0381                         *
0381                         *
0382                         ** SET UP FOR ACKERMAN DIGITAL ADS6809
0382                         * DDRA = 0 TADATA = Input, DDRA = 1 TADATA = Output
0383                         ** THE ADS6809 S100 BOAD HAS AN ON BOARD ACIA
0383                         * DDRB = 0 TBDATA = Input, DDRB = 1 TBDATA = Output
0384                         *
0384                         *
0385                         ACIAS   EQU   MONIO+$400   CONTROL PORT
0385                         TADATA EQU MONIO+$70 Timer preset port
0386                         *
0386                         TACTRL EQU MONIO+$71
0387                                 ENDIF ADSOPT
0387                         TBDATA EQU MONIO+$72 Timer read back port
0387                                 ENDIF ADSOPT
0388                         TBCTRL EQU MONIO+$73
0388                                 IFD PRTOPT
 
0389                         *
0389                         *
0390                         ***************************************************
0390                         TRADEL EQU 13  Number of E cycles for RTI (May need to be fudged)
0391                         * PRINTER INTERFACE                               *
0391                         *
0392                         ***************************************************
0392                                ENDIF TRAOPT
0393                         *
0392                                ENDIF TRAOPT
0394                         PADATA EQU MONIO+$404
0393                                IFD ADSOPT
0395                         PACTRL EQU MONIO+$405
0394                         *
0396                         PBDATA EQU MONIO+$406
0395                         ***************************************************
0397                         PBCTRL EQU MONIO+$407
0396                         *   SERIAL PORT FOR DG640                         *
 
0397                         ***************************************************
0398                         *
0398                         *
0399                         ** CB1  ACK.  I/P
0399                         ** SET UP FOR ACKERMAN DIGITAL ADS6809
0400                         ** CB2  STB.  O/P
0400                         ** THE ADS6809 S100 BOAD HAS AN ON BOARD ACIA
0401                         ** PB0 - PB7   DATA 1 - 8   O/P
0401                         *
0402                         ** PORT A BIT ASSIGNMENT
0402                         ACIAS   EQU   MONIO+$400   CONTROL PORT
0403                         *
0403                         *
0404                         PBUSY  EQU $80 I/P
0404                                 ENDIF ADSOPT
0405                         PEMPTY EQU $40 I/P
0404                                 ENDIF ADSOPT
0406                         SELECT EQU $20 I/P
0405                                 IFD PRTOPT
0407                         PERROR EQU $10 I/P
0406                         *
0408                         PRESET EQU %00000100 O/P PA3 = 0
0407                         ***************************************************
0409                         AUTOFD EQU %00001000 O/P PA2 = 0
0408                         * PRINTER INTERFACE                               *
0410                         DIRMSK EQU %00001100
0409                         ***************************************************
0411                                ENDIF PRTOPT
0410                         *
0411                                ENDIF PRTOPT
0411                         PADATA EQU MONIO+$404
0412                                IFD DG640OPT
0412                         PACTRL EQU MONIO+$405
0413                         *
0413                         PBDATA EQU MONIO+$406
0414                         ***************************************************
0414                         PBCTRL EQU MONIO+$407
0415                         *   DG640 MEMORY MAPPED DISPLAY DRIVER VARIABLES  *
0415                         *
0416                         ***************************************************
0416                         ** CB1  ACK.  I/P
0417                         *
0417                         ** CB2  STB.  O/P
0418                         ** VIDEO DISPLAY DEFINITIONS
0418                         ** PB0 - PB7   DATA 1 - 8   O/P
0419                         *
0419                         ** PORT A BIT ASSIGNMENT
0420                         SCREEN  EQU   MONIO+$0800 START OF SCREEN MEMORY
0420                         *
0421                         LINLEN  EQU   64          LENGTH OF A LINE
0421                         PBUSY  EQU $80 I/P
0422                         NUMLIN  EQU   16          NUMBER OF LINES
0422                         PEMPTY EQU $40 I/P
0423                         SCNLEN  EQU   $400        LENGTH OF SCREEN
0423                         SELECT EQU $20 I/P
0424                                 ENDIF DG640OPT
0424                         PERROR EQU $10 I/P
0424                                 ENDIF DG640OPT
0425                         PRESET EQU %00000100 O/P PA3 = 0
0425                         *
0426                         AUTOFD EQU %00001000 O/P PA2 = 0
0426                                 IFD   DMAFOPT
0427                         DIRMSK EQU %00001100
0427                         *
0428                                ENDIF PRTOPT
0428                         ***************************************************
0428                                ENDIF PRTOPT
0429                         *   DMAF2 8" DRIVE                                *
0429                                IFD DG640OPT
0430                         ***************************************************
0430                         *
0431                         *
0431                         ***************************************************
0432                         ADDREG  EQU   $F000  ADDRESS REGISTER
0432                         *   DG640 MEMORY MAPPED DISPLAY DRIVER VARIABLES  *
0433                         CNTREG  EQU   $F002  COUNT REGISTER
0433                         ***************************************************
0434                         CCREG   EQU   $F010  CHANNEL CONTROL REGISTER
0434                         *
0435                         PRIREG  EQU   $F014  DMA PRIORITY REGISTER
0435                         ** VIDEO DISPLAY DEFINITIONS
0436                         AAAREG  EQU   $F015  ???
0436                         *
0437                         BBBREG  EQU   $F016  ???
0437                         SCREEN  EQU   MONIO+$0800 START OF SCREEN MEMORY
0438                         COMREG  EQU   $F020  1791 COMMAND REGISTER
0438                         LINLEN  EQU   64          LENGTH OF A LINE
0439                         SECREG  EQU   $F022  SECTOR REGISTER
0439                         NUMLIN  EQU   16          NUMBER OF LINES
0440                         DRVREG  EQU   $F024  DRIVE SELECT LATCH
0440                         SCNLEN  EQU   $400        LENGTH OF SCREEN
0441                         CCCREG  EQU   $F040  ???
0441                                 ENDIF DG640OPT
0442                                 ENDIF DMAFOPT
0441                                 ENDIF DG640OPT
0442                                 ENDIF DMAFOPT
0442                         *
0443                                 IFD DATOPT
0443                                 IFD   DMAFOPT
0444                         **************************************************
0444                         *
0445                         * DYNAMIC ADDRESS TRANSLATION REGISTERS          *
0445                         ***************************************************
0446                         **************************************************
0446                         *   DMAF2 8" DRIVE                                *
0447                         *
0447                         ***************************************************
0448                         IC11    EQU  $FFF0  DAT RAM CHIP
0448                         *
0449                         TSTPAT  EQU  $55AA  TEST PATTERN
0449                         ADDREG  EQU   $F000  ADDRESS REGISTER
0450                                 ENDIF DATOPT
0450                         CNTREG  EQU   $F002  COUNT REGISTER
0450                                 ENDIF DATOPT
0451                         CCREG   EQU   $F010  CHANNEL CONTROL REGISTER
0451                         *
0452                         PRIREG  EQU   $F014  DMA PRIORITY REGISTER
 
0453                         AAAREG  EQU   $F015  ???
 
0454                         BBBREG  EQU   $F016  ???
 
0455                         COMREG  EQU   $F020  1791 COMMAND REGISTER
 
0456                         SECREG  EQU   $F022  SECTOR REGISTER
 
0457                         DRVREG  EQU   $F024  DRIVE SELECT LATCH
 
0458                         CCCREG  EQU   $F040  ???
 
0459                                 ENDIF DMAFOPT
 
0459                                 ENDIF DMAFOPT
 
0460                                 IFD DATOPT
 
0461                         **************************************************
 
0462                         * DYNAMIC ADDRESS TRANSLATION REGISTERS          *
 
0463                         **************************************************
 
0464                         *
 
0465 FFF0                    IC11    EQU  $FFF0  DAT RAM CHIP
 
0466 55AA                    TSTPAT  EQU  $55AA  TEST PATTERN
 
0467                                 ENDIF DATOPT
 
0468                         *
0003                                 END
0003                                 END
0000                          INCLUDE "sys09nul.asm"
0000                          INCLUDE "sys09ide.asm"
0001                         *
0001                         *
0002                         ** SYS09BUG MONITOR EXTENSIONS
0002                         ** SYS09BUG MONITOR EXTENSIONS
0003                         *
0003                         *
0004                         * FOR GENERIC SYS09BUG
0004                         * FOR SYS09BUG ON THE XESS XSA-3S100 / XST-3.0
0005                         * WITH I/O MAPPED AT $XE000
0005                         * WITH I/O MAPPED AT $XE000
0006                         * AND ROM MAPPED AT $XF000
0006                         * 16 BIT IDE MAPPED AT $E100
0007                         * (JUST A COPY OF SYS09IDE.ASM
0007                         * AND ROM MAPPED AT $XF000
0008                         * TO FILL THE MEMORY AT F000)
0008                         *
0009                         *
0009                         *
0010                         *
 
 
 


sys09nul.asm                                                                      page   2
sys09ide.asm                                                                      page   2
0012                         *
0011                         *
0013                         ***************************************************
0012                         ***************************************************
0014                         * Serial PROM register
0013                         * Serial PROM register
0015                         ***************************************************
0014                         ***************************************************
0016                         *
0015                         *
0017                         ** CONFIGURATION PROM DEFINITIONS
0016                         ** CONFIGURATION PROM DEFINITIONS
0018                         *
0017                         *
0019 E0C0                    PROMREG EQU MONIO+$C0
0018 E0C0                    PROMREG EQU MONIO+$C0
0020 0001                    PCLKHI  EQU $01     Toggle PROM Clock High
0019 0001                    PCLKHI  EQU $01     Toggle PROM Clock High
0021 0000                    PCLKLO  EQU $00     Toggle PROM Clock Low
0020 0000                    PCLKLO  EQU $00     Toggle PROM Clock Low
0022 0002                    PRSTHI  EQU $02     Toggle PROM Reset High
0021 0002                    PRSTHI  EQU $02     Toggle PROM Reset High
0023 0000                    PRSTLO  EQU $00     Toggle PROM Reset Low
0022 0000                    PRSTLO  EQU $00     Toggle PROM Reset Low
0024 AA55                    SYNCHI  EQU $AA55   Synch Pattern High Word
0023 AA55                    SYNCHI  EQU $AA55   Synch Pattern High Word
0025 FF00                    SYNCLO  EQU $FF00   Synch Pattern Low Word
0024 FF00                    SYNCLO  EQU $FF00   Synch Pattern Low Word
 
0025                         *
0026                         *
0026                         *
0027                         *
0027                         ***************************************************
0028                         ***************************************************
0028                         *   START OF ROM                                  *
0029                         *   START OF ROM                                  *
0029                         ***************************************************
0030                         ***************************************************
0030                         *
0031                         *
0031 F800                    MONITV EQU MONROM+0  FDB MONITOR
0032 F800                    MONITV EQU MONROM+0  FDB MONITOR
0032 F802                    NXTCMV EQU MONROM+2  FDB NEXTCMD
0033 F802                    NXTCMV EQU MONROM+2  FDB NEXTCMD
0033 F804                    INCHV  EQU MONROM+4  FDB INCH
0034 F804                    INCHV  EQU MONROM+4  FDB INCH
0034 F806                    INCHEV EQU MONROM+6  FDB INCHE
0035 F806                    INCHEV EQU MONROM+6  FDB INCHE
0035 F808                    INCHKV EQU MONROM+8  FDB INCHEK
0036 F808                    INCHKV EQU MONROM+8  FDB INCHEK
0036 F80A                    OUTCHV EQU MONROM+10 FDB OUTCH
0037 F80A                    OUTCHV EQU MONROM+10 FDB OUTCH
0037 F80C                    PDATAV EQU MONROM+12 FDB PDATA
0038 F80C                    PDATAV EQU MONROM+12 FDB PDATA
0038 F80E                    PCRLFV EQU MONROM+14 FDB PCRLF
0039 F80E                    PCRLFV EQU MONROM+14 FDB PCRLF
0039 F810                    PSTRGV EQU MONROM+16 FDB PSTRNG
0040 F810                    PSTRGV EQU MONROM+16 FDB PSTRNG
0040 F812                    LRAV   EQU MONROM+18 FDB LRA
0041 F812                    LRAV   EQU MONROM+18 FDB LRA
0041                         *
0042                         *
0042                         * Condition code flags
0043                         * Condition code flags
0043                         *
0044                         *
0044 0001                    CFLAG   EQU $01     CARRY FLAG
0045 0001                    CFLAG   EQU $01     CARRY FLAG
0045 0002                    VFLAG   EQU $02     OVERFLOW FLAG
0046 0002                    VFLAG   EQU $02     OVERFLOW FLAG
0046 0004                    ZFLAG   EQU $04     ZERO FLAG
0047 0004                    ZFLAG   EQU $04     ZERO FLAG
0047 0008                    NFLAG   EQU $08     NEGATIVE FLAG
0048 0008                    NFLAG   EQU $08     NEGATIVE FLAG
0048 0010                    IFLAG   EQU $10     IRQ MASK CC
0049 0010                    IFLAG   EQU $10     IRQ MASK CC
0049 0020                    HFLAG   EQU $20     HALF CARRY
0050 0020                    HFLAG   EQU $20     HALF CARRY
0050 0040                    FFLAG   EQU $40     FIRQ MASK CC
0051 0040                    FFLAG   EQU $40     FIRQ MASK CC
0051 0080                    EFLAG   EQU $80     ENTIRE FLAG
0052 0080                    EFLAG   EQU $80     ENTIRE FLAG
0052                         *
0053                         *
0053                         * Serial Port
0054                         * Serial Port
0054                         *
0055                         *
0055 E000                    ACIAC1  EQU ACIAS
Symbol 'ACIAS' undefined Pass 20056 0000                    ACIAC1  EQU ACIAS
0056 E001                    ACIAD1  EQU ACIAS+1
Symbol 'ACIAS' undefined Pass 20057 0001                    ACIAD1  EQU ACIAS+1
0057 04E2                    DELCON  EQU 1250    Delay (Processor clock in MHz * 50)
0058 04E2                    DELCON  EQU 1250    Delay (Processor clock in MHz * 50)
0058                         *
0059                         *
0059                         * XMODEM Control characters
0060                         * XMODEM Control characters
0060                         *
0061                         *
0061 0001                    SOH     EQU $01
0062 0001                    SOH     EQU $01
0062 0004                    EOT     EQU $04
0063 0004                    EOT     EQU $04
0063 0006                    ACK     EQU $06
0064 0006                    ACK     EQU $06
0064 0015                    NAK     EQU $15
0065 0015                    NAK     EQU $15
0065 0018                    CAN     EQU $18
0066 0018                    CAN     EQU $18
0066                         *
0067                         *
0067                         * Some Disk Constants
0068                         * Some Disk Constants
0068                         *
0069                         *
0069 0100                    RMAXTRK EQU 256
0070 0100                    RMAXTRK EQU 256
0070 00FF                    RMAXSEC EQU 255
0071 00FF                    RMAXSEC EQU 255
0071 FE01                    RTOTSEC EQU RMAXTRK*RMAXSEC-RMAXSEC
0072 FE01                    RTOTSEC EQU RMAXTRK*RMAXSEC-RMAXSEC
0072                         *
0073                         *
0073                         * RAM SPACE
0074                         * RAM SPACE
0074                         *
0075                         *
0075                         * PUT THIS DOWN THE BOTTOM OF MEMORY
0076                         * PUT THIS DOWN THE BOTTOM OF MEMORY
0076                         *
0077                         *
0077 0100                            ORG  $0100
0078 0100                            ORG  $0100
0078 0100                    DRVNUM  RMB 1
0079 0100                    DRVNUM  RMB 1
0079 0101                    TRACK   RMB 1
0080 0101                    TRACK   RMB 1
0080 0102                    SECTOR  RMB 1
0081 0102                    SECTOR  RMB 1
0081 0103                    CHKSUM  RMB 1
0082 0103                    CHKSUM  RMB 1
0082 0104                    BLKNUM  RMB 1 Xmodem block number
0083 0104                    BLKNUM  RMB 1 Xmodem block number
0083 0105                    BYTCNT  RMB 1 Xmodem byte count
0084 0105                    BYTCNT  RMB 1 Xmodem byte count
0084 0106                    XSTATE  RMB 2 Xmodem State Vector
0085 0106                    XSTATE  RMB 2 Xmodem State Vector
0085 0108                    DELCNT  RMB 3  $00,$00,$00 Xmodem Poll timer
0086 0108                    DELCNT  RMB 3  $00,$00,$00 Xmodem Poll timer
0086 010B                    MAXTRK  RMB 1
0087 010B                    MAXTRK  RMB 1
0087 010C                    MAXSEC  RMB 1
0088 010C                    MAXSEC  RMB 1
0088 0200                            ORG  $0200
0089 0200                            ORG  $0200
0089                         *
0090                         *
0090                         * SECTOR BUFFER
0091                         * SECTOR BUFFER
0091                         *
0092                         *
0092 0200                    BUFFER  RMB  256
0093 0200                    BUFFER  RMB  256
0093                         *
0094                         *
0094                         ****************************************
0095                         ****************************************
0095                         *
0096                         *
0096                         * START OF EXTENSION COMMANDS
0097                         * START OF EXTENSION COMMANDS
0097                         *
0098                         *
0098                         ****************************************
0099                         ****************************************
0099                         *
0100                         *
0100 F000                            ORG MONEXT
Symbol 'MONEXT' undefined Pass 20101 0000                            ORG MONEXT
0101 F000 F0 02                      FDB NEXTEXT   Jump to next extended command
0102 0000 00 02                      FDB NEXTEXT   Jump to next extended command
0102                         *
0103                         *
0103                         ***** NEXTCMD *****
0104                         ***** NEXTCMD *****
0104                         *
0105                         *
0105 F002 AD 9F F8 06        NEXTEXT JSR [INCHEV]  GET ONE CHAR. FROM TERMINAL
0106 0002 AD 9F F8 06        NEXTEXT JSR [INCHEV]  GET ONE CHAR. FROM TERMINAL
0106 F006 84 7F                      ANDA #$7F STRIP PARITY FROM CHAR.
0107 0006 84 7F                      ANDA #$7F STRIP PARITY FROM CHAR.
0107 F008 1F 89                      TFR  A,B
0108 0008 1F 89                      TFR  A,B
0108 F00A 86 20                      LDA  #$20
0109 000A 86 20                      LDA  #$20
0109 F00C AD 9F F8 0A                JSR [OUTCHV] PRNT SPACE
0110 000C AD 9F F8 0A                JSR [OUTCHV] PRNT SPACE
0110 F010 C1 60                      CMPB #$60
0111 0010 C1 60                      CMPB #$60
0111 F012 2F 02                      BLE NXTEX0
0112 0012 2F 02                      BLE NXTEX0
0112 F014 C0 20                      SUBB #$20
0113 0014 C0 20                      SUBB #$20
0113                         *
0114                         *
0114                         ***** DO TABLE LOOKUP *****
0115                         ***** DO TABLE LOOKUP *****
0115                         *   FOR COMMAND FUNCTIONS
0116                         *   FOR COMMAND FUNCTIONS
0116                         *
0117                         *
0117 F016 8E F0 2C           NXTEX0  LDX #EXTTAB    POINT TO JUMP TABLE
0118 0016 8E 00 2C           NXTEX0  LDX #EXTTAB    POINT TO JUMP TABLE
0118 F019 E1 80              NXTEX1  CMPB ,X+       DOES COMMAND MATCH TABLE ENTRY ?
0119 0019 E1 80              NXTEX1  CMPB ,X+       DOES COMMAND MATCH TABLE ENTRY ?
0119 F01B 27 0D                      BEQ  JMPEXT    BRANCH IF MATCH FOUND
0120 001B 27 0D                      BEQ  JMPEXT    BRANCH IF MATCH FOUND
0120 F01D 30 02                      LEAX 2,X       POINT TO NEXT ENTRY IN TABLE
0121 001D 30 02                      LEAX 2,X       POINT TO NEXT ENTRY IN TABLE
0121 F01F 8C F0 35                   CMPX #EXTEND   REACHED END OF TABLE YET ?
0122 001F 8C 00 35                   CMPX #EXTEND   REACHED END OF TABLE YET ?
0122 F022 26 F5                      BNE  NXTEX1    IF NOT END, CHECK NEXT ENTRY
0123 0022 26 F5                      BNE  NXTEX1    IF NOT END, CHECK NEXT ENTRY
0123 F024 8E F0 35                   LDX  #MSGWHAT  POINT TO MSG "WHAT?"
0124 0024 8E 00 35                   LDX  #MSGWHAT  POINT TO MSG "WHAT?"
0124 F027 16 02 29                   LBRA PDATA1    PRINT MSG AND RETURN
0125 0027 16 02 1E                   LBRA PDATA1    PRINT MSG AND RETURN
0125 F02A 6E 94              JMPEXT  JMP  [,X]      JUMP TO COMMAND ROUTINE
0126 002A 6E 94              JMPEXT  JMP  [,X]      JUMP TO COMMAND ROUTINE
0126                         *
0127                         *
0127                         * EXTENDED COMMAND JUMP TABLE
0128                         * EXTENDED COMMAND JUMP TABLE
0128                         *
0129                         *
0129 F02C                    EXTTAB EQU *
0130 002C                    EXTTAB EQU *
0130 F02C 42                        FCC 'B'   BOOT FLEX
0131 002C 42                        FCC 'B'   BOOT FLEX
0131 F02D F0 3E                     FDB UBSUB
0132 002D 00 3E                     FDB UBSUB
0132 F02F 46                        FCC 'F'   FORMAT IDE DISK
0133 002F 46                        FCC 'F'   FORMAT IDE DISK
0133 F030 F0 EA                     FDB UFSUB
0134 0030 00 E6                     FDB UFSUB
0134 F032 58                        FCC 'X'   XMODEM ROM DISK UPLOAD
0135 0032 58                        FCC 'X'   XMODEM ROM DISK UPLOAD
0135 F033 F2 BC                     FDB UXSUB
0136 0033 02 B1                     FDB UXSUB
0136                         *
0137                         *
0137 F035                    EXTEND EQU *
0138 0035                    EXTEND EQU *
0138                         *
0139                         *
0139 F035 57 48 41 54 20 3F  MSGWHAT FCC "WHAT ?"
0140 0035 57 48 41 54 20 3F  MSGWHAT FCC "WHAT ?"
0140 F03B 0A 0D 04                   FCB $0A,$0D,$04
0141 003B 0A 0D 04                   FCB $0A,$0D,$04
0141                         *
0142                         *
0142                         * GO TO FLEX RESIDENT IN MEMORY
0143                         * GO TO FLEX RESIDENT IN MEMORY
0143                         *
0144                         *
0144 F03E 8E CD 00           UBSUB   LDX #$CD00
0145 003E 8E CD 00           UBSUB   LDX #$CD00
0145 F041 AF 4A                      STX 10,U
0146 0041 AF 4A                      STX 10,U
0146 F043 1F 34                      TFR  U,S
0147 0043 1F 34                      TFR  U,S
0147 F045 3B                         RTI
0148 0045 3B                         RTI
0148                         *
0149                         *
0149                         * recieve char from remote drive.
0150                         * recieve char from remote drive.
0150                         * timeout if no response for approx 1s.
0151                         * timeout if no response for approx 1s.
0151                         * Entry: no parameters
0152                         * Entry: no parameters
0152                         * Exit:  (A) = recieved char, (C)=1 if valid char, (C)=0 if timeout.
0153                         * Exit:  (A) = recieved char, (C)=1 if valid char, (C)=0 if timeout.
0153                         *
0154                         *
0154 F046 34 30              RCHAR   PSHS    X,Y
0155 0046 34 30              RCHAR   PSHS    X,Y
0155                         *
0156                         *
0156 F048 8E 03 E8                   LDX     #1000         1000x inner loop
0157 0048 8E 03 E8                   LDX     #1000         1000x inner loop
0157 F04B 10 8E 04 E2        RCHAR1  LDY     #DELCON       delay constant for inner loop (approx 1ms).
0158 004B 10 8E 04 E2        RCHAR1  LDY     #DELCON       delay constant for inner loop (approx 1ms).
0158 F04F B6 E0 00           RCHAR2  LDA     ACIAC1        test for recieved char
0159 004F 96 00              RCHAR2  LDA     ACIAC1        test for recieved char
0159 F052 47                         ASRA
0160 0051 47                         ASRA
0160 F053 25 0A                      BCS     RCHAR3        get character
0161 0052 25 0A                      BCS     RCHAR3        get character
0161 F055 31 3F                      LEAY    -1,Y          else, continue to count delay
0162 0054 31 3F                      LEAY    -1,Y          else, continue to count delay
0162 F057 26 F6                      BNE     RCHAR2
0163 0056 26 F7                      BNE     RCHAR2
0163 F059 30 1F                      LEAX    -1,X
0164 0058 30 1F                      LEAX    -1,X
0164 F05B 26 EE                      BNE     RCHAR1
0165 005A 26 EF                      BNE     RCHAR1
0165 F05D 35 B0                      PULS    X,Y,PC        return with error if timed out
0166 005C 35 B0                      PULS    X,Y,PC        return with error if timed out
0166                         *
0167                         *
0167 F05F B6 E0 01           RCHAR3  LDA     ACIAD1        return data (carry bit still set)
0168 005E 96 01              RCHAR3  LDA     ACIAD1        return data (carry bit still set)
0168 F062 35 B0                      PULS    X,Y,PC
0169 0060 35 B0                      PULS    X,Y,PC
0169                         *
0170                         *
0170                         *
0171                         *
0171                         * transmit char to remote drive.
0172                         * transmit char to remote drive.
0172                         * timeout if no response for approx 1s. (allows for use of hardware flow control)
0173                         * timeout if no response for approx 1s. (allows for use of hardware flow control)
0173                         * Entry: (A) = char to transmit
0174                         * Entry: (A) = char to transmit
0174                         * Exit:  (A) = recieved char, (C)=1 if valid char, (C)=0 if timeout.
0175                         * Exit:  (A) = recieved char, (C)=1 if valid char, (C)=0 if timeout.
0175                         *
0176                         *
0176 F064 34 30              SCHAR   PSHS    X,Y
0177 0062 34 30              SCHAR   PSHS    X,Y
0177 F066 34 02                      PSHS    A
0178 0064 34 02                      PSHS    A
0178                         *
0179                         *
0179 F068 8E 03 E8                   LDX     #1000         1000x inner loop
0180 0066 8E 03 E8                   LDX     #1000         1000x inner loop
0180 F06B 10 8E 04 E2        SCHAR1  LDY     #DELCON       delay constant for inner loop (approx 1ms).
0181 0069 10 8E 04 E2        SCHAR1  LDY     #DELCON       delay constant for inner loop (approx 1ms).
0181 F06F B6 E0 00           SCHAR2  LDA     ACIAC1        test for space in transmit FIFO
0182 006D 96 00              SCHAR2  LDA     ACIAC1        test for space in transmit FIFO
0182 F072 47                         ASRA
0183 006F 47                         ASRA
0183 F073 47                         ASRA
0184 0070 47                         ASRA
0184 F074 25 0C                      BCS     SCHAR3        send character
0185 0071 25 0C                      BCS     SCHAR3        send character
0185 F076 31 3F                      LEAY    -1,Y          else, continue to count delay
0186 0073 31 3F                      LEAY    -1,Y          else, continue to count delay
0186 F078 26 F5                      BNE     SCHAR2
0187 0075 26 F6                      BNE     SCHAR2
0187 F07A 30 1F                      LEAX    -1,X
0188 0077 30 1F                      LEAX    -1,X
0188 F07C 26 ED                      BNE     SCHAR1
0189 0079 26 EE                      BNE     SCHAR1
0189 F07E 35 02                      PULS    A
0190 007B 35 02                      PULS    A
0190 F080 35 B0                      PULS    X,Y,PC        return with error if timed out
0191 007D 35 B0                      PULS    X,Y,PC        return with error if timed out
0191                         *
0192                         *
0192 F082 35 02              SCHAR3  PULS    A
0193 007F 35 02              SCHAR3  PULS    A
0193 F084 B7 E0 01                   STA     ACIAD1        send data (carry bit still set)
0194 0081 97 01                      STA     ACIAD1        send data (carry bit still set)
0194 F087 35 B0                      PULS    X,Y,PC
0195 0083 35 B0                      PULS    X,Y,PC
0195                         *
0196                         *
0196                         ** 'UF' Format IDE Drive to FLEX standard.
0197                         ** 'UF' Format IDE Drive to FLEX standard.
0197                         *
0198                         *
0198 F089 0A 0D              DISFOS  FCB $0A,$0D
0199 0085 0A 0D              DISFOS  FCB $0A,$0D
0199 F08B 46 6F 72 6D 61 74          FCC 'Formating IDE disk... '
0200 0087 46 6F 72 6D 61 74          FCC 'Formating IDE disk... '
 
          69 6E 67 20 49 44
          69 6E 67 20 49 44
          45 20 64 69 73 6B
          45 20 64 69 73 6B
          2E 2E 2E 20
          2E 2E 2E 20
0201 009D 0A 0D                      FCB $0A,$0D
0200 F0A1 0A 0D                      FCB $0A,$0D
0202 009F 44 72 69 76 65 20          FCC 'Drive Number ?'
0201 F0A3 44 72 69 76 65 20          FCC 'Drive Number ?'
          4E 75 6D 62 65 72
          4E 75 6D 62 65 72
          20 3F
          20 3F
0203 00AD 04                         FCB 4
0202 F0B1 04                         FCB 4
0204 00AE 0A 0D 04           MESS6   FCB $0A,$0D,4
0203 F0B2 0A 0D 04           MESS6   FCB $0A,$0D,4
0205 00B1 49 44 45 20 64 72          FCC 'IDE drive not allocated! '
0204 F0B5 49 44 45 20 64 72          FCC 'IDE drive not allocated! '
          69 76 65 20 6E 6F
          69 76 65 20 6E 6F
          74 20 61 6C 6C 6F
          74 20 61 6C 6C 6F
          63 61 74 65 64 21
          63 61 74 65 64 21
          20
          20
0206 00CA 04                    FCB 4
0205 F0CE 04                    FCB 4
0207 00CB 0A 0D              UFMSG1  FCB $0A,$0D
0206 F0CF 0A 0D              UFMSG1  FCB $0A,$0D
0208 00CD 46 6F 72 6D 61 74          FCC 'Format Complete'
0207 F0D1 46 6F 72 6D 61 74          FCC 'Format Complete'
          20 43 6F 6D 70 6C
          20 43 6F 6D 70 6C
          65 74 65
          65 74 65
0209 00DC 04                         FCB 4
0208 F0E0 04                         FCB 4
0210 00DD 49 44 45 44 49 53  VOLMSG  FCC 'IDEDISK '
0209 F0E1 49 44 45 44 49 53  VOLMSG  FCC 'IDEDISK '
          4B 20
          4B 20
0211 00E5 04                         FCB 4
0210 F0E9 04                         FCB 4
0212                         *
0211                         *
0213 00E6 BD 04 B2           UFSUB   JSR  INITDR
0212 F0EA BD F4 BD           UFSUB   JSR  INITDR
0214 00E9 8E 00 85                   LDX #DISFOS
0213 F0ED 8E F0 89                   LDX #DISFOS
0215 00EC BD 02 48                   JSR PDATA1
0214 F0F0 BD F2 53                   JSR PDATA1
0216 00EF 17 FF 54           UFSUB1  LBSR RCHAR
0215 F0F3 17 FF 50           UFSUB1  LBSR RCHAR
0217 00F2 24 FB                      BCC  UFSUB1
0216 F0F6 24 FB                      BCC  UFSUB1
0218 00F4 17 FF 6B                   LBSR SCHAR
0217 F0F8 17 FF 69                   LBSR SCHAR
0219 00F7 81 30                      CMPA #'0'
0218 F0FB 81 30                      CMPA #'0'
0220 00F9 10 25 00 EF                LBLO UFEXIT
0219 F0FD 10 25 00 EF                LBLO UFEXIT
0221 00FD 81 33                      CMPA #'3'
0220 F101 81 33                      CMPA #'3'
0222 00FF 10 22 00 E9                LBHI  UFEXIT
0221 F103 10 22 00 E9                LBHI  UFEXIT
0223 0103 80 30                      SUBA #'0'
0222 F107 80 30                      SUBA #'0'
0224 0105 1F 89                      TFR  A,B
0223 F109 1F 89                      TFR  A,B
0225 0107 F7 01 00                   STB DRVNUM
0224 F10B F7 01 00                   STB DRVNUM
0226 010A 8E 00 FD                   LDX #DRVNUM-3
0225 F10E 8E 00 FD                   LDX #DRVNUM-3
0227 010D BD 05 2F                   JSR DRVSEL
0226 F111 BD F5 3A                   JSR DRVSEL
0228                         *
0227                         *
0229                         * set up free chain
0228                         * set up free chain
0230                         *
0229                         *
0231 0110 8E 02 00                   LDX #BUFFER clear out buffer
0230 F114 8E 02 00                   LDX #BUFFER clear out buffer
0232 0113 4F                         CLRA
0231 F117 4F                         CLRA
0233 0114 5F                         CLRB
0232 F118 5F                         CLRB
0234 0115 A7 80              DFL1    STA 0,X+
0233 F119 A7 80              DFL1    STA 0,X+
0235 0117 5A                         DECB
0234 F11B 5A                         DECB
0236 0118 26 FB                      BNE DFL1
0235 F11C 26 FB                      BNE DFL1
0237                         *
0236                         *
0238 011A 7F 01 01                   CLR TRACK
0237 F11E 7F 01 01                   CLR TRACK
0239 011D 86 01                      LDA #1
0238 F121 86 01                      LDA #1
0240 011F B7 01 02                   STA SECTOR
0239 F123 B7 01 02                   STA SECTOR
0241 0122 8E 02 00           DFL2    LDX #BUFFER
0240 F126 8E 02 00           DFL2    LDX #BUFFER
0242 0125 B6 01 01                   LDA TRACK
0241 F129 B6 01 01                   LDA TRACK
0243 0128 A7 84                      STA 0,X
0242 F12C A7 84                      STA 0,X
0244 012A B6 01 02                   LDA SECTOR
0243 F12E B6 01 02                   LDA SECTOR
0245 012D 4C                         INCA
0244 F131 4C                         INCA
0246 012E 81 00                      CMPA #RMAXSEC+1 last sector on track?
0245 F132 81 00                      CMPA #RMAXSEC+1 last sector on track?
0247 0130 26 04                      BNE DFL3
0246 F134 26 04                      BNE DFL3
0248 0132 6C 84                      INC 0,X
0247 F136 6C 84                      INC 0,X
0249 0134 86 01                      LDA #1
0248 F138 86 01                      LDA #1
0250 0136 A7 01              DFL3    STA 1,X
0249 F13A A7 01              DFL3    STA 1,X
0251 0138 B6 01 01                   LDA TRACK
0250 F13C B6 01 01                   LDA TRACK
0252 013B F6 01 02                   LDB SECTOR
0251 F13F F6 01 02                   LDB SECTOR
0253 013E BD 05 0A                   JSR WRITSC
0252 F142 BD F5 15                   JSR WRITSC
0254 0141 7C 01 02                   INC SECTOR
0253 F145 7C 01 02                   INC SECTOR
0255 0144 B6 01 02                   LDA SECTOR
0254 F148 B6 01 02                   LDA SECTOR
0256 0147 81 00                      CMPA #RMAXSEC+1
0255 F14B 81 00                      CMPA #RMAXSEC+1
0257 0149 26 D7                      BNE DFL2
0256 F14D 26 D7                      BNE DFL2
0258 014B 86 01                      LDA #1
0257 F14F 86 01                      LDA #1
0259 014D B7 01 02                   STA  SECTOR
0258 F151 B7 01 02                   STA  SECTOR
0260 0150 7C 01 01                   INC TRACK
0259 F154 7C 01 01                   INC TRACK
0261 0153 B6 01 01                   LDA TRACK
0260 F157 B6 01 01                   LDA TRACK
0262 0156 81 00                      CMPA #RMAXTRK
0261 F15A 81 00                      CMPA #RMAXTRK
0263 0158 26 C8                      BNE DFL2
0262 F15C 26 C8                      BNE DFL2
0264                         * break free chain at last track/sector
0263                         * break free chain at last track/sector
0265 015A 8E 02 00                   LDX  #BUFFER
0264 F15E 8E 02 00                   LDX  #BUFFER
0266 015D 86 FF                      LDA  #RMAXTRK-1
0265 F161 86 FF                      LDA  #RMAXTRK-1
0267 015F C6 FF                      LDB  #RMAXSEC
0266 F163 C6 FF                      LDB  #RMAXSEC
0268 0161 BD 04 E6                   JSR  READSC
0267 F165 BD F4 F1                   JSR  READSC
0269 0164 8E 02 00                   LDX  #BUFFER
0268 F168 8E 02 00                   LDX  #BUFFER
0270 0167 6F 84                      CLR  0,X
0269 F16B 6F 84                      CLR  0,X
0271 0169 6F 01                      CLR  1,X
0270 F16D 6F 01                      CLR  1,X
0272 016B 86 FF                      LDA  #RMAXTRK-1
0271 F16F 86 FF                      LDA  #RMAXTRK-1
0273 016D C6 FF                      LDB  #RMAXSEC
0272 F171 C6 FF                      LDB  #RMAXSEC
0274 016F BD 05 0A                   JSR  WRITSC
0273 F173 BD F5 15                   JSR  WRITSC
0275                         * set up sector structure, SIR, directory etc
0274                         * set up sector structure, SIR, directory etc
0276 0172 8E 02 00                   LDX  #BUFFER
0275 F176 8E 02 00                   LDX  #BUFFER
0277 0175 4F                         CLRA
0276 F179 4F                         CLRA
0278 0176 C6 FF                      LDB  #RMAXSEC
0277 F17A C6 FF                      LDB  #RMAXSEC
0279 0178 BD 04 E6                   JSR  READSC
0278 F17C BD F4 F1                   JSR  READSC
0280 017B 8E 02 00                   LDX  #BUFFER
0279 F17F 8E 02 00                   LDX  #BUFFER
0281 017E 6F 84                      CLR  0,X break end of directory chain
0280 F182 6F 84                      CLR  0,X break end of directory chain
0282 0180 6F 01                      CLR  1,X
0281 F184 6F 01                      CLR  1,X
0283 0182 4F                         CLRA
0282 F186 4F                         CLRA
0284 0183 C6 FF                      LDB  #RMAXSEC
0283 F187 C6 FF                      LDB  #RMAXSEC
0285 0185 BD 05 0A                   JSR  WRITSC
0284 F189 BD F5 15                   JSR  WRITSC
0286                         *
0285                         *
0287 0188 8E 02 00                   LDX  #BUFFER
0286 F18C 8E 02 00                   LDX  #BUFFER
0288 018B 4F                         CLRA
0287 F18F 4F                         CLRA
0289 018C C6 03                      LDB  #3 set up SIR
0288 F190 C6 03                      LDB  #3 set up SIR
0290 018E BD 04 E6                   JSR  READSC
0289 F192 BD F4 F1                   JSR  READSC
0291 0191 8E 02 00                   LDX  #BUFFER
0290 F195 8E 02 00                   LDX  #BUFFER
0292 0194 6F 84                      CLR  0,X break forward link
0291 F198 6F 84                      CLR  0,X break forward link
0293 0196 6F 01                      CLR  1,X
0292 F19A 6F 01                      CLR  1,X
0294                         *
0293                         *
0295 0198 34 20                      PSHS Y
0294 F19C 34 20                      PSHS Y
0296 019A 10 8E 00 DD                LDY  #VOLMSG
0295 F19E 10 8E F0 E1                LDY  #VOLMSG
0297 019E C6 10                      LDB  #16
0296 F1A2 C6 10                      LDB  #16
0298 01A0 A6 A0              DFL4    LDA  ,Y+
0297 F1A4 A6 A0              DFL4    LDA  ,Y+
0299 01A2 A7 85                      STA  B,X
0298 F1A6 A7 85                      STA  B,X
0300 01A4 5C                         INCB
0299 F1A8 5C                         INCB
0301 01A5 C1 18                      CMPB #24
0300 F1A9 C1 18                      CMPB #24
0302 01A7 26 F7                      BNE  DFL4
0301 F1AB 26 F7                      BNE  DFL4
0303 01A9 35 20                      PULS Y
0302 F1AD 35 20                      PULS Y
0304                         *
0303                         *
0305 01AB 4F                         CLRA
0304 F1AF 4F                         CLRA
0306 01AC F6 01 00                   LDB  DRVNUM volume number
0305 F1B0 F6 01 00                   LDB  DRVNUM volume number
0307 01AF ED 88 1B                   STD  27,X
0306 F1B3 ED 88 1B                   STD  27,X
0308                         *
0307                         *
0309 01B2 CC 01 01                   LDD  #$0101 first trk/sec  01-01
0308 F1B6 CC 01 01                   LDD  #$0101 first trk/sec  01-01
0310 01B5 ED 88 1D                   STD  29,X
0309 F1B9 ED 88 1D                   STD  29,X
0311 01B8 86 FF                      LDA  #RMAXTRK-1
0310 F1BC 86 FF                      LDA  #RMAXTRK-1
0312 01BA C6 FF                      LDB  #RMAXSEC
0311 F1BE C6 FF                      LDB  #RMAXSEC
0313 01BC ED 88 1F                   STD  31,X
0312 F1C0 ED 88 1F                   STD  31,X
0314 01BF ED 88 26                   STD  38,X
0313 F1C3 ED 88 26                   STD  38,X
0315 01C2 CC FE 01                   LDD  #RTOTSEC total DATA sectors (2912-14)
0314 F1C6 CC FE 01                   LDD  #RTOTSEC total DATA sectors (2912-14)
0316 01C5 ED 88 21                   STD  33,X
0315 F1C9 ED 88 21                   STD  33,X
0317                         *
0316                         *
0318 01C8 86 01                      LDA #01 month   set default creation date (SYS09's birthday!)
0317 F1CC 86 01                      LDA #01 month   set default creation date (SYS09's birthday!)
0319 01CA A7 88 23                   STA 35,X
0318 F1CE A7 88 23                   STA 35,X
0320 01CD 86 07                      LDA #07 day
0319 F1D1 86 07                      LDA #07 day
0321 01CF A7 88 24                   STA 36,X
0320 F1D3 A7 88 24                   STA 36,X
0322 01D2 86 07                      LDA #07 year
0321 F1D6 86 07                      LDA #07 year
0323 01D4 A7 88 25                   STA 37,X
0322 F1D8 A7 88 25                   STA 37,X
0324                         *
0323                         *
0325 01D7 4F                 RF3     CLRA
0324 F1DB 4F                 RF3     CLRA
0326 01D8 C6 03                      LDB  #3
0325 F1DC C6 03                      LDB  #3
0327 01DA BD 05 0A                   JSR  WRITSC
0326 F1DE BD F5 15                   JSR  WRITSC
0328                         *
0327                         *
0329                         * Not sure what this is about
0328                         * Not sure what this is about
0330                         * put bootstrap on track 0 sector 1
0329                         * put bootstrap on track 0 sector 1
0331                         *
0330                         *
0332                         *        LDX #BUFFER
0331                         *        LDX #BUFFER
0333                         *        CLRA
0332                         *        CLRA
0334                         *        LDB #1
0333                         *        LDB #1
0335                         *        JSR READSC
0334                         *        JSR READSC
0336                         *        LDX #BUFFER
0335                         *        LDX #BUFFER
0337                         *        LDA #$AA set the init flag
0336                         *        LDA #$AA set the init flag
0338                         *        STA 0,X
0337                         *        STA 0,X
0339                         *        LDA  #$55
0338                         *        LDA  #$55
0340                         *        STA 1,X
0339                         *        STA 1,X
0341                         *        CLRA
0340                         *        CLRA
0342                         *        LDB #1
0341                         *        LDB #1
0343                         *        JSR WRITSC
0342                         *        JSR WRITSC
0344                         *
0343                         *
0345                         *  Write Boot sector
0344                         *  Write Boot sector
0346                         *
0345                         *
0347 01DD 8E 07 00                   LDX  #BOOT
0346 F1E1 8E F7 00                   LDX  #BOOT
0348 01E0 4F                         CLRA         TRACK 0
0347 F1E4 4F                         CLRA         TRACK 0
0349 01E1 C6 01                      LDB  #$01    SECTOR 1
0348 F1E5 C6 01                      LDB  #$01    SECTOR 1
0350 01E3 B7 01 01                   STA  TRACK
0349 F1E7 B7 01 01                   STA  TRACK
0351 01E6 F7 01 02                   STB  SECTOR
0350 F1EA F7 01 02                   STB  SECTOR
0352 01E9 17 03 1E                   LBSR WRITSC
0351 F1ED 17 03 25                   LBSR WRITSC
0353                         *
0352                         *
0354 01EC 8E 00 CB           UFEXIT  LDX #UFMSG1
0353 F1F0 8E F0 CF           UFEXIT  LDX #UFMSG1
0355 01EF 7E 02 48                   JMP PDATA1
0354 F1F3 7E F2 53                   JMP PDATA1
0356                         *
0355                         *
0357                         * ACIA INPUT TEST
0356                         * ACIA INPUT TEST
0358                         *
0357                         *
0359 01F2 96 00              INTEST  LDA ACIAC1
0358 F1F6 B6 E0 00           INTEST  LDA ACIAC1
0360 01F4 85 01                      BITA #$01
0359 F1F9 85 01                      BITA #$01
0361 01F6 39                         RTS
0360 F1FB 39                         RTS
0362                         *
0361                         *
0363                         * RESET ACIA
0362                         * RESET ACIA
0364                         *
0363                         *
0365 01F7 86 03              ACIRST  LDA #$03 master reset
0364 F1FC 86 03              ACIRST  LDA #$03 master reset
0366 01F9 97 00                      STA  ACIAC1
0365 F1FE B7 E0 00                   STA  ACIAC1
0367 01FB 86 11                      LDA #$11
0366 F201 86 11                      LDA #$11
0368 01FD 97 00                      STA ACIAC1
0367 F203 B7 E0 00                   STA ACIAC1
0369 01FF 39                         RTS
0368 F206 39                         RTS
0370                         *
0369                         *
0371                         * ACIA INPUT
0370                         * ACIA INPUT
0372                         *
0371                         *
0373 0200 86 10              INTER   LDA  #16
0372 F207 86 10              INTER   LDA  #16
0374 0202 B7 01 08                   STA  DELCNT+0
0373 F209 B7 01 08                   STA  DELCNT+0
0375 0205 7F 01 09                   CLR  DELCNT+1
0374 F20C 7F 01 09                   CLR  DELCNT+1
0376 0208 7F 01 0A                   CLR  DELCNT+2
0375 F20F 7F 01 0A                   CLR  DELCNT+2
0377 020B 96 00              INTER0  LDA  ACIAC1
0376 F212 B6 E0 00           INTER0  LDA  ACIAC1
0378 020D 85 01                      BITA #$01
0377 F215 85 01                      BITA #$01
0379 020F 26 08                      BNE  INTER1
0378 F217 26 08                      BNE  INTER1
0380 0211 85 78                      BITA #$78
0379 F219 85 78                      BITA #$78
0381 0213 27 09                      BEQ  INTER2
0380 F21B 27 0A                      BEQ  INTER2
0382 0215 8D E0                      BSR  ACIRST
0381 F21D 8D DD                      BSR  ACIRST
0383 0217 20 E7                      BRA  INTER
0382 F21F 20 E6                      BRA  INTER
0384                         *
0383                         *
0385 0219 96 01              INTER1  LDA  ACIAD1
0384 F221 B6 E0 01           INTER1  LDA  ACIAD1
0386 021B 1C FD                      ANDCC #$FF-VFLAG
0385 F224 1C FD                      ANDCC #$FF-VFLAG
0387 021D 39                         RTS
0386 F226 39                         RTS
0388                         *
0387                         *
0389 021E 7A 01 0A           INTER2  DEC  DELCNT+2
0388 F227 7A 01 0A           INTER2  DEC  DELCNT+2
0390 0221 26 E8                      BNE  INTER0
0389 F22A 26 E6                      BNE  INTER0
0391 0223 7A 01 09                   DEC  DELCNT+1
0390 F22C 7A 01 09                   DEC  DELCNT+1
0392 0226 26 E3                      BNE  INTER0
0391 F22F 26 E1                      BNE  INTER0
0393 0228 7A 01 08                   DEC  DELCNT+0
0392 F231 7A 01 08                   DEC  DELCNT+0
0394 022B 26 DE                      BNE  INTER0
0393 F234 26 DC                      BNE  INTER0
0395 022D 4F                         CLRA
0394 F236 4F                         CLRA
0396 022E 1A 02                      ORCC #VFLAG
0395 F237 1A 02                      ORCC #VFLAG
0397 0230 39                         RTS
0396 F239 39                         RTS
0398                         *
0397                         *
0399                         * ACIA OUTPUT
0398                         * ACIA OUTPUT
0400                         *
0399                         *
0401 0231 34 02              OUTTER  PSHS A
0400 F23A 34 02              OUTTER  PSHS A
0402                         *
0401                         *
0403 0233 96 00              OUTTE1  LDA ACIAC1
0402 F23C B6 E0 00           OUTTE1  LDA ACIAC1
0404 0235 85 02                      BITA #$02
0403 F23F 85 02                      BITA #$02
0405 0237 26 08                      BNE  OUTTE2
0404 F241 26 08                      BNE  OUTTE2
0406 0239 85 78                      BITA #$78
0405 F243 85 78                      BITA #$78
0407 023B 27 F6                      BEQ  OUTTE1
0406 F245 27 F5                      BEQ  OUTTE1
0408 023D 8D B8                      BSR  ACIRST
0407 F247 8D B3                      BSR  ACIRST
0409 023F 20 F2                      BRA  OUTTE1
0408 F249 20 F1                      BRA  OUTTE1
0410                         *
0409                         *
0411 0241 35 02              OUTTE2  PULS A
0410 F24B 35 02              OUTTE2  PULS A
0412 0243 97 01                      STA ACIAD1
0411 F24D B7 E0 01                   STA ACIAD1
0413 0245 39                         RTS
0412 F250 39                         RTS
0414                         *
0413                         *
0415                         * Print Data
0414                         * Print Data
0416                         *
0415                         *
0417 0246 8D E9              PDATA0  BSR  OUTTER
0416 F251 8D E7              PDATA0  BSR  OUTTER
0418 0248 A6 80              PDATA1  LDA  ,X+
0417 F253 A6 80              PDATA1  LDA  ,X+
0419 024A 81 04                      CMPA #$04
0418 F255 81 04                      CMPA #$04
0420 024C 26 F8                      BNE  PDATA0
0419 F257 26 F8                      BNE  PDATA0
0421 024E 39                         RTS
0420 F259 39                         RTS
 
0421                         *
0422                         *
0422                         *
0423                         *
0423                         ** 'UX' Xmodem IDE Disk upload
0424                         ** 'UX' Xmodem IDE Disk upload
0424                         *
0425                         *
0425 F25A 0D 0A              UXMES0  FCB $0D,$0A
0426 024F 0D 0A              UXMES0  FCB $0D,$0A
0426 F25C 58 6D 6F 64 65 6D          FCC 'Xmodem IDE Disk Upload'
0427 0251 58 6D 6F 64 65 6D          FCC 'Xmodem IDE Disk Upload'
 
          20 49 44 45 20 44
          20 49 44 45 20 44
          69 73 6B 20 55 70
          69 73 6B 20 55 70
          6C 6F 61 64
          6C 6F 61 64
0428 0267 04                         FCB 4
0427 F272 04                         FCB 4
0429 0268 0D 0A              UXMES1  FCB $0D,$0A
0428 F273 0D 0A              UXMES1  FCB $0D,$0A
0430 026A 55 70 6C 6F 61 64          FCC 'Upload Complete'
0429 F275 55 70 6C 6F 61 64          FCC 'Upload Complete'
          20 43 6F 6D 70 6C
          20 43 6F 6D 70 6C
          65 74 65
          65 74 65
0431 0279 04                         FCB 4
0430 F284 04                         FCB 4
0432 027A 0D 0A              UXMES2  FCB $0D,$0A
0431 F285 0D 0A              UXMES2  FCB $0D,$0A
0433 027C 55 70 6C 6F 61 64          FCC 'Upload Error'
0432 F287 55 70 6C 6F 61 64          FCC 'Upload Error'
          20 45 72 72 6F 72
          20 45 72 72 6F 72
0434 0288 04                         FCB 4
0433 F293 04                         FCB 4
0435 0289 0D 0A              UXMSG3  FCB $0D,$0A
0434 F294 0D 0A              UXMSG3  FCB $0D,$0A
0436 028B 44 72 69 76 65 20          FCC 'Drive Number :'
0435 F296 44 72 69 76 65 20          FCC 'Drive Number :'
          4E 75 6D 62 65 72
          4E 75 6D 62 65 72
          20 3A
          20 3A
0437 0299 04                         FCB 4
0436 F2A4 04                         FCB 4
0438 029A 0D 0A              UXMSG4  FCB $0D,$0A
0437 F2A5 0D 0A              UXMSG4  FCB $0D,$0A
0439 029C 41 72 65 20 59 6F          FCC 'Are You Sure ? (Y/N)'
0438 F2A7 41 72 65 20 59 6F          FCC 'Are You Sure ? (Y/N)'
          75 20 53 75 72 65
          75 20 53 75 72 65
          20 3F 20 28 59 2F
          20 3F 20 28 59 2F
          4E 29
          4E 29
0440 02B0 04                         FCB 4
0439 F2BB 04                         FCB 4
0441                         *
0440                         *
0442                         * Print Banner
0441                         * Print Banner
0443                         *
0442                         *
0444 02B1 8E 02 4F           UXSUB   LDX #UXMES0
0443 F2BC 8E F2 5A           UXSUB   LDX #UXMES0
0445 02B4 17 FF 91                   LBSR PDATA1
0444 F2BF 17 FF 91                   LBSR PDATA1
0446                         *
0445                         *
0447                         * Prompt for Disk drive number (0 to 3)
0446                         * Prompt for Disk drive number (0 to 3)
0448                         *
0447                         *
0449 02B7 8E 02 89                   LDX #UXMSG3
0448 F2C2 8E F2 94                   LDX #UXMSG3
0450 02BA 17 FF 8B                   LBSR PDATA1
0449 F2C5 17 FF 8B                   LBSR PDATA1
0451 02BD 17 FF 40           UXSUB1  LBSR INTER
0450 F2C8 17 FF 3C           UXSUB1  LBSR INTER
0452 02C0 29 FB                      BVS  UXSUB1
0451 F2CB 29 FB                      BVS  UXSUB1
0453 02C2 17 FF 6C                   LBSR OUTTER
0452 F2CD 17 FF 6A                   LBSR OUTTER
0454 02C5 81 30                      CMPA #'0
0453 F2D0 81 30                      CMPA #'0
0455 02C7 10 25 01 2E                LBLO UXEXIT
0454 F2D2 10 25 01 2E                LBLO UXEXIT
0456 02CB 81 33                      CMPA #'3
0455 F2D6 81 33                      CMPA #'3
0457 02CD 10 22 01 28                LBHI UXEXIT
0456 F2D8 10 22 01 28                LBHI UXEXIT
0458 02D1 80 30                      SUBA #'0
0457 F2DC 80 30                      SUBA #'0
0459 02D3 B7 01 00                   STA  DRVNUM
0458 F2DE B7 01 00                   STA  DRVNUM
0460                         *
0459                         *
0461                         * Report selected drive
0460                         * Report selected drive
0462                         *
0461                         *
0463 02D6 8E 02 89                   LDX #UXMSG3
0462 F2E1 8E F2 94                   LDX #UXMSG3
0464 02D9 17 FF 6C                   LBSR PDATA1
0463 F2E4 17 FF 6C                   LBSR PDATA1
0465 02DC B6 01 00                   LDA  DRVNUM
0464 F2E7 B6 01 00                   LDA  DRVNUM
0466 02DF 8B 30                      ADDA #'0
0465 F2EA 8B 30                      ADDA #'0
0467 02E1 17 FF 4D                   LBSR OUTTER
0466 F2EC 17 FF 4B                   LBSR OUTTER
0468                         *
0467                         *
0469                         * Ask for confirmation (Y/N)
0468                         * Ask for confirmation (Y/N)
0470                         *
0469                         *
0471 02E4 8E 02 9A                   LDX #UXMSG4
0470 F2EF 8E F2 A5                   LDX #UXMSG4
0472 02E7 17 FF 5E                   LBSR PDATA1
0471 F2F2 17 FF 5E                   LBSR PDATA1
0473 02EA 17 FF 13           UXSUB2  LBSR INTER
0472 F2F5 17 FF 0F           UXSUB2  LBSR INTER
0474 02ED 29 FB                      BVS  UXSUB2
0473 F2F8 29 FB                      BVS  UXSUB2
0475 02EF 17 FF 3F                   LBSR OUTTER
0474 F2FA 17 FF 3D                   LBSR OUTTER
0476 02F2 84 5F                      ANDA #$5F
0475 F2FD 84 5F                      ANDA #$5F
0477 02F4 81 4E                      CMPA #'N
0476 F2FF 81 4E                      CMPA #'N
0478 02F6 10 27 00 FF                LBEQ UXEXIT
0477 F301 10 27 00 FF                LBEQ UXEXIT
0479 02FA 81 59                      CMPA #'Y
0478 F305 81 59                      CMPA #'Y
0480 02FC 26 B3                      BNE  UXSUB
0479 F307 26 B3                      BNE  UXSUB
0481                         *
0480                         *
0482                         * We have confirmation ... now load the disk image
0481                         * We have confirmation ... now load the disk image
0483                         *
0482                         *
0484 02FE 17 01 B1                   LBSR INITDR
0483 F309 17 01 B1                   LBSR INITDR
0485 0301 CE 04 22                   LDU  #XSTST
0484 F30C CE F4 2D                   LDU  #XSTST
0486 0304 FF 01 06                   STU  XSTATE
0485 F30F FF 01 06                   STU  XSTATE
0487 0307 86 01                      LDA  #1
0486 F312 86 01                      LDA  #1
0488 0309 B7 01 04                   STA  BLKNUM
0487 F314 B7 01 04                   STA  BLKNUM
0489                         *
0488                         *
0490                         * Sector1
0489                         * Sector1
0491                         *
0490                         *
0492 030C 8E 02 00                   LDX  #BUFFER
0491 F317 8E 02 00                   LDX  #BUFFER
0493                         *
0492                         *
0494 030F 4F                         CLRA         TRACK 0
0493 F31A 4F                         CLRA         TRACK 0
0495 0310 C6 01                      LDB  #$01    SECTOR 1
0494 F31B C6 01                      LDB  #$01    SECTOR 1
0496 0312 B7 01 01                   STA  TRACK
0495 F31D B7 01 01                   STA  TRACK
0497 0315 F7 01 02                   STB  SECTOR
0496 F320 F7 01 02                   STB  SECTOR
0498                         *
0497                         *
0499 0318 17 00 EA                   LBSR XREAD
0498 F323 17 00 EA                   LBSR XREAD
0500 031B 10 25 00 E0                LBCS UXERR
0499 F326 10 25 00 E0                LBCS UXERR
0501 031F 17 01 87                   LBSR XACK
0500 F32A 17 01 87                   LBSR XACK
0502 0322 17 00 E0                   LBSR XREAD
0501 F32D 17 00 E0                   LBSR XREAD
0503 0325 10 25 00 D6                LBCS UXERR
0502 F330 10 25 00 D6                LBCS UXERR
0504                         *
0503                         *
0505 0329 8E 02 00                   LDX  #BUFFER
0504 F334 8E 02 00                   LDX  #BUFFER
0506 032C B6 01 01                   LDA  TRACK
0505 F337 B6 01 01                   LDA  TRACK
0507 032F F6 01 02                   LDB  SECTOR
0506 F33A F6 01 02                   LDB  SECTOR
0508 0332 17 01 D5                   LBSR WRITSC
0507 F33D 17 01 D5                   LBSR WRITSC
0509 0335 17 01 71                   LBSR XACK
0508 F340 17 01 71                   LBSR XACK
0510                         *
0509                         *
0511                         * Sector 2
0510                         * Sector 2
0512                         *
0511                         *
0513 0338 8E 02 00                   LDX  #BUFFER
0512 F343 8E 02 00                   LDX  #BUFFER
0514                         *
0513                         *
0515 033B B6 01 01                   LDA  TRACK
0514 F346 B6 01 01                   LDA  TRACK
0516 033E F6 01 02                   LDB  SECTOR
0515 F349 F6 01 02                   LDB  SECTOR
0517 0341 5C                         INCB
0516 F34C 5C                         INCB
0518 0342 B7 01 01                   STA  TRACK
0517 F34D B7 01 01                   STA  TRACK
0519 0345 F7 01 02                   STB  SECTOR
0518 F350 F7 01 02                   STB  SECTOR
0520                         *
0519                         *
0521 0348 17 00 BA                   LBSR XREAD
0520 F353 17 00 BA                   LBSR XREAD
0522 034B 10 25 00 B0                LBCS UXERR
0521 F356 10 25 00 B0                LBCS UXERR
0523 034F 17 01 57                   LBSR XACK
0522 F35A 17 01 57                   LBSR XACK
0524 0352 17 00 B0                   LBSR XREAD
0523 F35D 17 00 B0                   LBSR XREAD
0525 0355 10 25 00 A6                LBCS UXERR
0524 F360 10 25 00 A6                LBCS UXERR
0526                         *
0525                         *
0527 0359 8E 02 00                   LDX  #BUFFER
0526 F364 8E 02 00                   LDX  #BUFFER
0528 035C B6 01 01                   LDA  TRACK
0527 F367 B6 01 01                   LDA  TRACK
0529 035F F6 01 02                   LDB  SECTOR
0528 F36A F6 01 02                   LDB  SECTOR
0530 0362 17 01 A5                   LBSR WRITSC
0529 F36D 17 01 A5                   LBSR WRITSC
0531                         *
0530                         *
0532 0365 17 01 41                   LBSR XACK
0531 F370 17 01 41                   LBSR XACK
0533                         *
0532                         *
0534                         * Sector 3 - SIR
0533                         * Sector 3 - SIR
0535                         *
0534                         *
0536 0368 8E 02 00                   LDX  #BUFFER
0535 F373 8E 02 00                   LDX  #BUFFER
0537                         *
0536                         *
0538 036B B6 01 01                   LDA  TRACK
0537 F376 B6 01 01                   LDA  TRACK
0539 036E F6 01 02                   LDB  SECTOR
0538 F379 F6 01 02                   LDB  SECTOR
0540 0371 5C                         INCB
0539 F37C 5C                         INCB
0541 0372 B7 01 01                   STA  TRACK
0540 F37D B7 01 01                   STA  TRACK
0542 0375 F7 01 02                   STB  SECTOR
0541 F380 F7 01 02                   STB  SECTOR
0543                         *
0542                         *
0544 0378 17 00 8A                   LBSR XREAD
0543 F383 17 00 8A                   LBSR XREAD
0545 037B 10 25 00 80                LBCS UXERR
0544 F386 10 25 00 80                LBCS UXERR
0546 037F 17 01 27                   LBSR XACK
0545 F38A 17 01 27                   LBSR XACK
0547 0382 17 00 80                   LBSR XREAD
0546 F38D 17 00 80                   LBSR XREAD
0548 0385 10 25 00 76                LBCS UXERR
0547 F390 10 25 00 76                LBCS UXERR
0549                         *
0548                         *
0550 0389 8E 02 00                   LDX  #BUFFER
0549 F394 8E 02 00                   LDX  #BUFFER
0551 038C A6 88 26                   LDA  38,X
0550 F397 A6 88 26                   LDA  38,X
0552 038F 4C                         INCA
0551 F39A 4C                         INCA
0553 0390 B7 01 0B                   STA  MAXTRK
0552 F39B B7 01 0B                   STA  MAXTRK
0554 0393 E6 88 27                   LDB  39,X
0553 F39E E6 88 27                   LDB  39,X
0555 0396 5C                         INCB
0554 F3A1 5C                         INCB
0556 0397 F7 01 0C                   STB  MAXSEC
0555 F3A2 F7 01 0C                   STB  MAXSEC
0557 039A B6 01 01                   LDA  TRACK
0556 F3A5 B6 01 01                   LDA  TRACK
0558 039D F6 01 02                   LDB  SECTOR
0557 F3A8 F6 01 02                   LDB  SECTOR
0559 03A0 17 01 67                   LBSR WRITSC
0558 F3AB 17 01 67                   LBSR WRITSC
0560                         *
0559                         *
0561 03A3 17 01 03                   LBSR XACK
0560 F3AE 17 01 03                   LBSR XACK
0562                         *
0561                         *
0563                         * Sector 4 to Last Track & Sector
0562                         * Sector 4 to Last Track & Sector
 
0563                         *
0564                         *
0564                         *
0565                         *
0565 F3B1 B6 01 01                   LDA  TRACK
0566 03A6 B6 01 01                   LDA  TRACK
0566 F3B4 F6 01 02                   LDB  SECTOR
0567 03A9 F6 01 02                   LDB  SECTOR
0567 F3B7 5C                         INCB
0568 03AC 5C                         INCB
0568                         *
0569                         *
0569 F3B8 8E 02 00           UXLOOP  LDX  #BUFFER
0570 03AD 8E 02 00           UXLOOP  LDX  #BUFFER
0570 F3BB B7 01 01                   STA  TRACK
0571 03B0 B7 01 01                   STA  TRACK
0571 F3BE F7 01 02                   STB  SECTOR
0572 03B3 F7 01 02                   STB  SECTOR
0572                         *
0573                         *
0573 F3C1 17 00 4C                   LBSR XREAD
0574 03B6 17 00 4C                   LBSR XREAD
0574 F3C4 10 25 00 42                LBCS UXERR
0575 03B9 10 25 00 42                LBCS UXERR
0575 F3C8 17 00 E9                   LBSR XACK
0576 03BD 17 00 E9                   LBSR XACK
0576 F3CB 17 00 42                   LBSR XREAD
0577 03C0 17 00 42                   LBSR XREAD
0577 F3CE 10 25 00 38                LBCS UXERR
0578 03C3 10 25 00 38                LBCS UXERR
0578                         *
0579                         *
0579 F3D2 8E 02 00                   LDX  #BUFFER
0580 03C7 8E 02 00                   LDX  #BUFFER
0580 F3D5 B6 01 01                   LDA  TRACK
0581 03CA B6 01 01                   LDA  TRACK
0581 F3D8 F6 01 02                   LDB  SECTOR
0582 03CD F6 01 02                   LDB  SECTOR
0582 F3DB 17 01 37                   LBSR WRITSC
0583 03D0 17 01 37                   LBSR WRITSC
0583 F3DE 17 00 D3                   LBSR XACK
0584 03D3 17 00 D3                   LBSR XACK
0584                         *
0585                         *
0585 F3E1 B6 01 01                   LDA  TRACK
0586 03D6 B6 01 01                   LDA  TRACK
0586 F3E4 F6 01 02                   LDB  SECTOR
0587 03D9 F6 01 02                   LDB  SECTOR
0587 F3E7 5C                         INCB
0588 03DC 5C                         INCB
0588 F3E8 F1 01 0C                   CMPB MAXSEC
0589 03DD F1 01 0C                   CMPB MAXSEC
0589 F3EB 26 CB                      BNE  UXLOOP
0590 03E0 26 CB                      BNE  UXLOOP
0590 F3ED C6 01                      LDB  #1
0591 03E2 C6 01                      LDB  #1
0591 F3EF 4C                         INCA
0592 03E4 4C                         INCA
0592 F3F0 B1 01 0B                   CMPA MAXTRK
0593 03E5 B1 01 0B                   CMPA MAXTRK
0593 F3F3 26 C3                      BNE  UXLOOP
0594 03E8 26 C3                      BNE  UXLOOP
0594                         *
0595                         *
0595                         *
0596                         *
0596                         *  Write Boot sector
0597                         *  Write Boot sector
0597                         *
0598                         *
0598 F3F5 8E F7 00                   LDX  #BOOT
0599 03EA 8E 07 00                   LDX  #BOOT
0599 F3F8 4F                         CLRA         TRACK 0
0600 03ED 4F                         CLRA         TRACK 0
0600 F3F9 C6 01                      LDB  #$01    SECTOR 1
0601 03EE C6 01                      LDB  #$01    SECTOR 1
0601 F3FB B7 01 01                   STA  TRACK
0602 03F0 B7 01 01                   STA  TRACK
0602 F3FE F7 01 02                   STB  SECTOR
0603 03F3 F7 01 02                   STB  SECTOR
0603 F401 17 01 11                   LBSR WRITSC
0604 03F6 17 01 11                   LBSR WRITSC
0604                         *
0605                         *
0605 F404 8E F2 73           UXEXIT  LDX  #UXMES1
0606 03F9 8E 02 68           UXEXIT  LDX  #UXMES1
0606 F407 7E F2 53                   JMP  PDATA1
0607 03FC 7E 02 48                   JMP  PDATA1
0607                         *
0608                         *
0608 F40A 8E F2 85           UXERR   LDX  #UXMES2
0609 03FF 8E 02 7A           UXERR   LDX  #UXMES2
0609 F40D 16 FE 43                   LBRA PDATA1
0610 0402 16 FE 43                   LBRA PDATA1
0610                         *
0611                         *
0611                         * Get a Byte using XModem protocol
0612                         * Get a Byte using XModem protocol
0612                         * Carry clear => no errors
0613                         * Carry clear => no errors
0613                         * Carry set   => errors
0614                         * Carry set   => errors
0614                         *
0615                         *
0615 F410 34 40              XREAD   PSHS U
0616 0405 34 40              XREAD   PSHS U
0616 F412 FE 01 06                   LDU  XSTATE
0617 0407 FE 01 06                   LDU  XSTATE
0617                         *
0618                         *
0618 F415 17 FD EF           XBYTE0  LBSR INTER
0619 040A 17 FD F3           XBYTE0  LBSR INTER
0619 F418 28 0A                      BVC  XBYTE1
0620 040D 28 0A                      BVC  XBYTE1
0620 F41A 86 15                      LDA  #NAK
0621 040F 86 15                      LDA  #NAK
0621 F41C 17 FE 1B                   LBSR OUTTER
0622 0411 17 FE 1D                   LBSR OUTTER
0622 F41F CE F4 2D                   LDU  #XSTST
0623 0414 CE 04 22                   LDU  #XSTST
0623 F422 20 F1                      BRA  XBYTE0
0624 0417 20 F1                      BRA  XBYTE0
0624                         *
0625                         *
0625 F424 AD C4              XBYTE1  JSR  ,U
0626 0419 AD C4              XBYTE1  JSR  ,U
0626 F426 26 ED                      BNE  XBYTE0
0627 041B 26 ED                      BNE  XBYTE0
0627 F428 FF 01 06                   STU  XSTATE
0628 041D FF 01 06                   STU  XSTATE
0628 F42B 35 C0                      PULS U,PC
0629 0420 35 C0                      PULS U,PC
0629                         *
0630                         *
0630                         * START - LOOK FOR SOH (START OF HEADER) = $01
0631                         * START - LOOK FOR SOH (START OF HEADER) = $01
0631                         *
0632                         *
0632 F42D 81 01              XSTST   CMPA #SOH
0633 0422 81 01              XSTST   CMPA #SOH
0633 F42F 26 06                      BNE  XSTST1
0634 0424 26 06                      BNE  XSTST1
0634 F431 CE F4 4D                   LDU  #XSTBL
0635 0426 CE 04 42                   LDU  #XSTBL
0635 F434 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, no valid data (no exit)
0636 0429 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, no valid data (no exit)
0636 F436 39                         RTS
0637 042B 39                         RTS
0637                         *
0638                         *
0638 F437 81 04              XSTST1  CMPA #EOT
0639 042C 81 04              XSTST1  CMPA #EOT
0639 F439 26 08                      BNE  XSTST2
0640 042E 26 08                      BNE  XSTST2
0640 F43B 86 06                      LDA  #ACK
0641 0430 86 06                      LDA  #ACK
0641 F43D 17 FD FA                   LBSR OUTTER
0642 0432 17 FD FC                   LBSR OUTTER
0642 F440 1A 05                      ORCC  #CFLAG+ZFLAG  Set (c)=1 abort & exit
0643 0435 1A 05                      ORCC  #CFLAG+ZFLAG  Set (c)=1 abort & exit
0643 F442 39                         RTS
0644 0437 39                         RTS
0644                         *
0645                         *
0645 F443 81 18              XSTST2  CMPA #CAN
0646 0438 81 18              XSTST2  CMPA #CAN
0646 F445 26 03                      BNE  XSTST3
0647 043A 26 03                      BNE  XSTST3
0647 F447 1A 05                      ORCC  #CFLAG+ZFLAG  Set (c)=1 abort & exit
0648 043C 1A 05                      ORCC  #CFLAG+ZFLAG  Set (c)=1 abort & exit
0648 F449 39                         RTS
0649 043E 39                         RTS
0649                         *
0650                         *
0650 F44A 1C FA              XSTST3  ANDCC #$FF-CFLAG-ZFLAG
0651 043F 1C FA              XSTST3  ANDCC #$FF-CFLAG-ZFLAG
0651 F44C 39                         RTS
0652 0441 39                         RTS
0652                         *
0653                         *
0653                         * Got SOH
0654                         * Got SOH
0654                         * Now get block number
0655                         * Now get block number
0655                         *
0656                         *
0656 F44D B1 01 04           XSTBL   CMPA BLKNUM
0657 0442 B1 01 04           XSTBL   CMPA BLKNUM
0657 F450 26 06                      BNE  XSTBLE
0658 0445 26 06                      BNE  XSTBLE
0658 F452 CE F4 63                   LDU  #XSTCOM
0659 0447 CE 04 58                   LDU  #XSTCOM
0659 F455 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, No valid data (no exit)
0660 044A 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, No valid data (no exit)
0660 F457 39                         RTS
0661 044C 39                         RTS
0661                         *
0662                         *
0662                         * Error in block number
0663                         * Error in block number
0663                         *
0664                         *
0664 F458 86 15              XSTBLE  LDA  #NAK
0665 044D 86 15              XSTBLE  LDA  #NAK
0665 F45A 17 FD DD                   LBSR OUTTER
0666 044F 17 FD DF                   LBSR OUTTER
0666 F45D CE F4 2D                   LDU  #XSTST
0667 0452 CE 04 22                   LDU  #XSTST
0667 F460 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, No valid data (no exit)
0668 0455 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, No valid data (no exit)
0668 F462 39                         RTS
0669 0457 39                         RTS
0669                         *
0670                         *
0670                         * Get complement of block number
0671                         * Get complement of block number
0671                         *
0672                         *
0672 F463 43                 XSTCOM  COMA
0673 0458 43                 XSTCOM  COMA
0673 F464 B1 01 04                   CMPA BLKNUM
0674 0459 B1 01 04                   CMPA BLKNUM
0674 F467 26 EF                      BNE  XSTBLE
0675 045C 26 EF                      BNE  XSTBLE
0675 F469 7F 01 03                   CLR  CHKSUM
0676 045E 7F 01 03                   CLR  CHKSUM
0676 F46C 86 80                      LDA  #128
0677 0461 86 80                      LDA  #128
0677 F46E B7 01 05                   STA  BYTCNT
0678 0463 B7 01 05                   STA  BYTCNT
0678 F471 CE F4 77                   LDU  #XSTDA
0679 0466 CE 04 6C                   LDU  #XSTDA
0679 F474 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, No valid data (no exit)
0680 0469 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, No valid data (no exit)
0680 F476 39                         RTS
0681 046B 39                         RTS
0681                         *
0682                         *
0682                         * Get data bytes
0683                         * Get data bytes
0683                         *
0684                         *
0684 F477 34 02              XSTDA   PSHS A
0685 046C 34 02              XSTDA   PSHS A
0685 F479 BB 01 03                   ADDA CHKSUM
0686 046E BB 01 03                   ADDA CHKSUM
0686 F47C B7 01 03                   STA  CHKSUM
0687 0471 B7 01 03                   STA  CHKSUM
0687 F47F 35 02                      PULS A
0688 0474 35 02                      PULS A
0688 F481 7A 01 05                   DEC  BYTCNT
0689 0476 7A 01 05                   DEC  BYTCNT
0689 F484 26 03                      BNE  XSTDA1
0690 0479 26 03                      BNE  XSTDA1
0690 F486 CE F4 8E                   LDU  #XSTCK
0691 047B CE 04 83                   LDU  #XSTCK
0691 F489 A7 80              XSTDA1  STA  ,X+
0692 047E A7 80              XSTDA1  STA  ,X+
0692 F48B 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, no valid data (no exit)
0693 0480 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, no valid data (no exit)
0693 F48D 39                         RTS
0694 0482 39                         RTS
0694                         *
0695                         *
0695                         * Byte count reached zero
0696                         * Byte count reached zero
0696                         * Check checksum byte
0697                         * Check checksum byte
0697                         *
0698                         *
0698 F48E B1 01 03           XSTCK   CMPA CHKSUM
0699 0483 B1 01 03           XSTCK   CMPA CHKSUM
0699 F491 26 0B                      BNE  XSTCK1 retry if wrong checksum
0700 0486 26 0B                      BNE  XSTCK1 retry if wrong checksum
0700                         *
0701                         *
0701                         * Checksum OK ...
0702                         * Checksum OK ...
0702                         * increment block number
0703                         * increment block number
0703                         * Don't send ACK until data written to CF
0704                         * Don't send ACK until data written to CF
0704                         *
0705                         *
0705 F493 7C 01 04                   INC  BLKNUM
0706 0488 7C 01 04                   INC  BLKNUM
0706 F496 CE F4 2D                   LDU  #XSTST
0707 048B CE 04 22                   LDU  #XSTST
0707 F499 1C FE                      ANDCC #$FF-CFLAG No abort
0708 048E 1C FE                      ANDCC #$FF-CFLAG No abort
0708 F49B 1A 04                      ORCC #ZFLAG      Valid data (exit)
0709 0490 1A 04                      ORCC #ZFLAG      Valid data (exit)
0709 F49D 39                         RTS
0710 0492 39                         RTS
0710                         *
0711                         *
0711                         * Checksum Error detected ...
0712                         * Checksum Error detected ...
0712                         * Reset Sector counter in ACCB to last 128 byte boundary
0713                         * Reset Sector counter in ACCB to last 128 byte boundary
0713                         * and send NAK
0714                         * and send NAK
0714                         *
0715                         *
0715 F49E 34 04              XSTCK1  PSHS B
0716 0493 34 04              XSTCK1  PSHS B
0716 F4A0 1F 10                      TFR  X,D
0717 0495 1F 10                      TFR  X,D
0717 F4A2 5A                         DECB
0718 0497 5A                         DECB
0718 F4A3 C4 80                      ANDB #128
0719 0498 C4 80                      ANDB #128
0719 F4A5 1F 01                      TFR  D,X
0720 049A 1F 01                      TFR  D,X
0720 F4A7 35 04                      PULS B
0721 049C 35 04                      PULS B
0721 F4A9 86 15                      LDA  #NAK
0722 049E 86 15                      LDA  #NAK
0722 F4AB 17 FD 8C           XSTCK2  LBSR OUTTER
0723 04A0 17 FD 8E           XSTCK2  LBSR OUTTER
0723 F4AE CE F4 2D                   LDU  #XSTST
0724 04A3 CE 04 22                   LDU  #XSTST
0724 F4B1 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, no valid data (no exit)
0725 04A6 1C FA                      ANDCC #$FF-CFLAG-ZFLAG No abort, no valid data (no exit)
0725 F4B3 39                         RTS
0726 04A8 39                         RTS
0726                         *
0727                         *
0727                         * Acknowledge Data Received
0728                         * Acknowledge Data Received
0728                         *
0729                         *
0729 F4B4 34 02              XACK    PSHS A
0730 04A9 34 02              XACK    PSHS A
0730 F4B6 86 06                      LDA  #ACK
0731 04AB 86 06                      LDA  #ACK
0731 F4B8 17 FD 7F                   LBSR OUTTER
0732 04AD 17 FD 81                   LBSR OUTTER
0732 F4BB 35 82                      PULS A,PC
0733 04B0 35 82                      PULS A,PC
0733                         *
0734                         *
0734                         *
0735                         *
0735                         ** FLEX 9 IDE DISK DRIVERS
0736                         ** FLEX 9 IDE DISK DRIVERS
0736                         *
0737                         *
0737                         * FOR SYS09BUG 1.2 ON THE XSA-3S1000
0738                         * FOR SYS09BUG 1.2 ON THE XSA-3S1000
0738                         * WITH I/O MAPPED AT $XE000
0739                         * WITH I/O MAPPED AT $XE000
0739                         * AND ROM MAPPED AT $XF000
0740                         * AND ROM MAPPED AT $XF000
0740                         *
0741                         *
0741                         *
0742                         *
0742                         * INITIALIZE CF CARD FOR 8 BIT LBA MODE
0743                         * INITIALIZE CF CARD FOR 8 BIT LBA MODE
0743                         *
0744                         *
0744 F4BD CC 00 06           INITDR LDD #AUXRESET
Symbol 'AUXRESET' undefined Pass 20745 04B2 CC 00 00           INITDR LDD #AUXRESET
0745 F4C0 FD E1 1E                  STD CF_AUX
Symbol 'CF_AUX' undefined Pass 20746 04B5 FD 00 00                  STD CF_AUX
0746 F4C3 CC 00 02                  LDD #AUXRSTREL
Symbol 'AUXRSTREL' undefined Pass 20747 04B8 CC 00 00                  LDD #AUXRSTREL
0747 F4C6 FD E1 1E                  STD CF_AUX
Symbol 'CF_AUX' undefined Pass 20748 04BB FD 00 00                  STD CF_AUX
0748 F4C9 CC 00 E0                  LDD  #HEADLBA
Symbol 'HEADLBA' undefined Pass 20749 04BE CC 00 00                  LDD  #HEADLBA
0749 F4CC FD E1 0C                  STD  CF_HEAD
Symbol 'CF_HEAD' undefined Pass 20750 04C1 FD 00 00                  STD  CF_HEAD
0750 F4CF 16 02 D6                  LBRA WTRDY
0751 04C4 16 02 E1                  LBRA WTRDY
0751                         *
0752                         *
0752                         * RESTORE DISK DRIVER (SEEK TRACK 00)
0753                         * RESTORE DISK DRIVER (SEEK TRACK 00)
0753                         *
0754                         *
0754 F4D2 8D 66              RESTR1 BSR   DRVSEL
0755 04C7 8D 66              RESTR1 BSR   DRVSEL
0755 F4D4 4F                        CLRA           ; Track 0
0756 04C9 4F                        CLRA           ; Track 0
0756 F4D5 C6 01                     LDB   #$01     ; Sector 1
0757 04CA C6 01                     LDB   #$01     ; Sector 1
0757                         *
0758                         *
0758                         * Seek track and sector
0759                         * Seek track and sector
0759                         * A holds track number (0 - ??)
0760                         * A holds track number (0 - ??)
0760                         * B holds sector number (1 - ??)
0761                         * B holds sector number (1 - ??)
0761                         * Sector numbers starts from 1
0762                         * Sector numbers starts from 1
0762                         * subtract 1 to start from sector 0 on CF
0763                         * subtract 1 to start from sector 0 on CF
0763                         *
0764                         *
0764 F4D7 34 02              SEEKTS PSHS A
0765 04CC 34 02              SEEKTS PSHS A
0765 F4D9 4F                        CLRA
0766 04CE 4F                        CLRA
0766 F4DA 5A                        DECB
0767 04CF 5A                        DECB
0767 F4DB FD E1 06                  STD  CF_SECNUM
Symbol 'CF_SECNUM' undefined Pass 20768 04D0 FD 00 00                  STD  CF_SECNUM
0768 F4DE E6 E4                     LDB ,S
0769 04D3 E6 E4                     LDB ,S
0769 F4E0 FD E1 08                  STD  CF_CYLLO
Symbol 'CF_CYLLO' undefined Pass 20770 04D5 FD 00 00                  STD  CF_CYLLO
0770 F4E3 F6 01 00                  LDB  DRVNUM
0771 04D8 F6 01 00                  LDB  DRVNUM
0771 F4E6 FD E1 0A                  STD  CF_CYLHI
Symbol 'CF_CYLHI' undefined Pass 20772 04DB FD 00 00                  STD  CF_CYLHI
0772 F4E9 C6 01                     LDB  #$01
0773 04DE C6 01                     LDB  #$01
0773 F4EB FD E1 04                  STD  CF_SECCNT
Symbol 'CF_SECCNT' undefined Pass 20774 04E0 FD 00 00                  STD  CF_SECCNT
0774 F4EE 5F                        CLRB
0775 04E3 5F                        CLRB
0775 F4EF 35 82                     PULS A,PC
0776 04E4 35 82                     PULS A,PC
0776                         *
0777                         *
0777                         * READ SECTORS FROM CF
0778                         * READ SECTORS FROM CF
0778                         *
0779                         *
0779                         *
0780                         *
0780 F4F1 8D E4              READSC BSR  SEEKTS
0781 04E6 8D E4              READSC BSR  SEEKTS
0781 F4F3 CC 00 20                  LDD  #CMDREAD ; IDE READ MULTIPLE
Symbol 'CMDREAD' undefined Pass 20782 04E8 CC 00 00                  LDD  #CMDREAD ; IDE READ MULTIPLE
0782 F4F6 FD E1 0E                  STD  CF_COMAND
Symbol 'CF_COMAND' undefined Pass 20783 04EB FD 00 00                  STD  CF_COMAND
0783 F4F9 17 02 AC                  LBSR  WTRDY
0784 04EE 17 02 B7                  LBSR  WTRDY
0784                         *
0785                         *
0785                         * READ LOOP
0786                         * READ LOOP
0786                         *
0787                         *
0787 F4FC 34 20                     PSHS Y
0788 04F1 34 20                     PSHS Y
0788 F4FE 10 8E 01 00               LDY #256
0789 04F3 10 8E 01 00               LDY #256
0789 F502 17 02 B2           RDLP1  LBSR  WTDRQ
0790 04F7 17 02 BD           RDLP1  LBSR  WTDRQ
0790 F505 FC E1 00                  LDD  CF_DATA
Symbol 'CF_DATA' undefined Pass 20791 04FA FC 00 00                  LDD  CF_DATA
0791 F508 E7 80                     STB  ,X+
0792 04FD E7 80                     STB  ,X+
0792 F50A 31 3F                     LEAY -1,Y
0793 04FF 31 3F                     LEAY -1,Y
0793 F50C 26 F4                     BNE  RDLP1
0794 0501 26 F4                     BNE  RDLP1
0794 F50E 35 20                     PULS Y
0795 0503 35 20                     PULS Y
0795                         *
0796                         *
0796 F510 17 02 95                  LBSR  WTRDY
0797 0505 17 02 A0                  LBSR  WTRDY
0797 F513 5F                        CLRB
0798 0508 5F                        CLRB
0798 F514 39                        RTS
0799 0509 39                        RTS
0799                         *
0800                         *
0800                         * WRITE SECTOR TO CF
0801                         * WRITE SECTOR TO CF
0801                         *
0802                         *
0802 F515 8D C0              WRITSC BSR  SEEKTS   ; SEEK TRACK & SECTOR
0803 050A 8D C0              WRITSC BSR  SEEKTS   ; SEEK TRACK & SECTOR
0803 F517 CC 00 30                  LDD  #CMDWRITE ; IDE WRITE MULTIPLE
Symbol 'CMDWRITE' undefined Pass 20804 050C CC 00 00                  LDD  #CMDWRITE ; IDE WRITE MULTIPLE
0804 F51A FD E1 0E                  STD  CF_COMAND
Symbol 'CF_COMAND' undefined Pass 20805 050F FD 00 00                  STD  CF_COMAND
0805 F51D 17 02 88                  LBSR  WTRDY
0806 0512 17 02 93                  LBSR  WTRDY
0806                         *
0807                         *
0807                         * WRITE LOOP
0808                         * WRITE LOOP
0808                         *
0809                         *
0809 F520 34 20                     PSHS Y
0810 0515 34 20                     PSHS Y
0810 F522 10 8E 01 00               LDY #256
0811 0517 10 8E 01 00               LDY #256
0811 F526 4F                        CLRA
0812 051B 4F                        CLRA
0812 F527 17 02 8D           WRTLP1 LBSR  WTDRQ
0813 051C 17 02 98           WRTLP1 LBSR  WTDRQ
0813 F52A E6 80                     LDB  ,X+
0814 051F E6 80                     LDB  ,X+
0814 F52C FD E1 00                  STD  CF_DATA
Symbol 'CF_DATA' undefined Pass 20815 0521 FD 00 00                  STD  CF_DATA
0815 F52F 31 3F                     LEAY -1,Y
0816 0524 31 3F                     LEAY -1,Y
0816 F531 26 F4                     BNE  WRTLP1
0817 0526 26 F4                     BNE  WRTLP1
0817 F533 35 20                     PULS Y
0818 0528 35 20                     PULS Y
0818                         *
0819                         *
0819 F535 17 02 70                  LBSR  WTRDY
0820 052A 17 02 7B                  LBSR  WTRDY
0820 F538 5F                        CLRB
0821 052D 5F                        CLRB
0821 F539 39                        RTS
0822 052E 39                        RTS
0822                         *
0823                         *
0823                         * DRIVE SELECT DISK DRIVER
0824                         * DRIVE SELECT DISK DRIVER
0824                         *
0825                         *
0825 F53A A6 03              DRVSEL LDA   3,X       GET DRIVE # FROM FCB
0826 052F A6 03              DRVSEL LDA   3,X       GET DRIVE # FROM FCB
0826 F53C 81 03                     CMPA  #3
0827 0531 81 03                     CMPA  #3
0827 F53E 23 01                     BLS   DRVS2     IF > 3, SET IT TO 0
0828 0533 23 01                     BLS   DRVS2     IF > 3, SET IT TO 0
0828 F540 4F                        CLRA
0829 0535 4F                        CLRA
0829 F541 B7 01 00           DRVS2  STA   DRVNUM
0830 0536 B7 01 00           DRVS2  STA   DRVNUM
0830 F544 5F                        CLRB            ; SET Z, CLEAR C
0831 0539 5F                        CLRB            ; SET Z, CLEAR C
0831 F545 39                        RTS
0832 053A 39                        RTS
0832                         *
0833                         *
0833                         * CHECK DRIVE READY DISK DRIVER
0834                         * CHECK DRIVE READY DISK DRIVER
0834                         *
0835                         *
0835 F546 A6 03              CHKDRV LDA  3,X
0836 053B A6 03              CHKDRV LDA  3,X
0836 F548 5F                        CLRB             ; CLEAR C, SET Z
0837 053D 5F                        CLRB             ; CLEAR C, SET Z
0837 F549 39                        RTS
0838 053E 39                        RTS
0838                         *******************************************************
0839                         *******************************************************
0839                         *
0840                         *
0840                         * Bootstrap FLEX Loader
0841                         * Bootstrap FLEX Loader
0841                         *
0842                         *
0842                         * SBUG1.8 loads the bootstap loader at $C000
0843                         * SBUG1.8 loads the bootstap loader at $C000
0843                         * however the Flex adaption manual has the
0844                         * however the Flex adaption manual has the
0844                         * bootstrap loader residing at $C100
0845                         * bootstrap loader residing at $C100
0845                         * Bootstrap Loader is position independent code
0846                         * Bootstrap Loader is position independent code
0846                         *
0847                         *
0847                         ******************************************************
0848                         ******************************************************
0848                         *
0849                         *
0849                         * Equates
0850                         * Equates
0850                         *
0851                         *
0851 C0FF                    BSSTACK EQU $C0FF
0852 C0FF                    BSSTACK EQU $C0FF
0852 C300                    SCTBUF  EQU $C300
0853 C300                    SCTBUF  EQU $C300
0853                         *
0854                         *
0854                         * Start of Utility
0855                         * Start of Utility
0855                         *
0856                         *
0856 F700                            ORG MONEXT+$0700
Symbol 'MONEXT' undefined Pass 20857 0700                            ORG MONEXT+$0700
0857 F700 20 0B              BOOT    BRA BLOAD0
0858 0700 20 0B              BOOT    BRA BLOAD0
0858 F702 00 00 00                   FCB 0,0,0
0859 0702 00 00 00                   FCB 0,0,0
0859 F705 00                 TRK     FCB 0        File start track
0860 0705 00                 TRK     FCB 0        File start track
0860 F706 00                 SCT     FCB 0        File start sector
0861 0706 00                 SCT     FCB 0        File start sector
0861 F707 00                 DNS     FCB 0        Density Flag (not used)
0862 0707 00                 DNS     FCB 0        Density Flag (not used)
0862 F708 C0 00              TADR    FDB $C000    Transfer address
0863 0708 C0 00              TADR    FDB $C000    Transfer address
0863 F70A 00 00              LADR    FDB 0        Load Address
0864 070A 00 00              LADR    FDB 0        Load Address
0864 F70C 00                 DRNUM   FCB 0        Drive number 0
0865 070C 00                 DRNUM   FCB 0        Drive number 0
0865                         *
0866                         *
0866 F70D 10 CE C0 FF        BLOAD0  LDS  #BSSTACK   Set up Bootstrap stack
0867 070D 10 CE C0 FF        BLOAD0  LDS  #BSSTACK   Set up Bootstrap stack
0867 F711 EC 8C F1                   LDD  TRK,PCR    Set up start track and sector
0868 0711 EC 8C F1                   LDD  TRK,PCR    Set up start track and sector
0868 F714 FD C3 00                   STD  SCTBUF
0869 0714 FD C3 00                   STD  SCTBUF
0869 F717 10 8E C4 00                LDY  #SCTBUF+256
0870 0717 10 8E C4 00                LDY  #SCTBUF+256
0870                         *
0871                         *
0871                         * Perform actual file load
0872                         * Perform actual file load
0872                         *
0873                         *
0873 F71B 8D 35              BLOAD1  BSR GETCH    Get acharcater
0874 071B 8D 35              BLOAD1  BSR GETCH    Get acharcater
0874 F71D 81 02                      CMPA #$02    Data record hearder ?
0875 071D 81 02                      CMPA #$02    Data record hearder ?
0875 F71F 27 10                      BEQ  BLOAD2   Skip, is so
0876 071F 27 10                      BEQ  BLOAD2   Skip, is so
0876 F721 81 16                      CMPA #$16    Xfr address hearder ?
0877 0721 81 16                      CMPA #$16    Xfr address hearder ?
0877 F723 26 F6                      BNE BLOAD1    Loop if neither
0878 0723 26 F6                      BNE BLOAD1    Loop if neither
0878                         *
0879                         *
0879                         * Get transfer address
0880                         * Get transfer address
0880                         *
0881                         *
0881 F725 8D 2B                      BSR  GETCH
0882 0725 8D 2B                      BSR  GETCH
0882 F727 A7 8C DE                   STA  TADR,PCR
0883 0727 A7 8C DE                   STA  TADR,PCR
0883 F72A 8D 26                      BSR  GETCH
0884 072A 8D 26                      BSR  GETCH
0884 F72C A7 8C DA                   STA  TADR+1,PCR
0885 072C A7 8C DA                   STA  TADR+1,PCR
0885 F72F 20 EA                      BRA  BLOAD1
0886 072F 20 EA                      BRA  BLOAD1
0886                         *
0887                         *
0887                         * Load data record
0888                         * Load data record
0888                         *
0889                         *
0889 F731 8D 1F              BLOAD2 BSR  GETCH  Get load address
0890 0731 8D 1F              BLOAD2 BSR  GETCH  Get load address
0890 F733 A7 8C D4                  STA  LADR,PCR
0891 0733 A7 8C D4                  STA  LADR,PCR
0891 F736 8D 1A                     BSR  GETCH
0892 0736 8D 1A                     BSR  GETCH
0892 F738 A7 8C D0                  STA  LADR+1,PCR
0893 0738 A7 8C D0                  STA  LADR+1,PCR
0893 F73B 8D 15                     BSR  GETCH  Get Bytes count
0894 073B 8D 15                     BSR  GETCH  Get Bytes count
0894 F73D 1F 89                     TFR  A,B
0895 073D 1F 89                     TFR  A,B
0895 F73F 5D                        TSTB
0896 073F 5D                        TSTB
0896 F740 27 D9                     BEQ  BLOAD1 Loop if count = 0
0897 0740 27 D9                     BEQ  BLOAD1 Loop if count = 0
0897 F742 AE 8C C5                  LDX  LADR,PCR  Get load address
0898 0742 AE 8C C5                  LDX  LADR,PCR  Get load address
0898 F745 34 14              BLOAD3 PSHS B,X
0899 0745 34 14              BLOAD3 PSHS B,X
0899 F747 8D 09                     BSR  GETCH  Get data character
0900 0747 8D 09                     BSR  GETCH  Get data character
0900 F749 35 14                     PULS B,X
0901 0749 35 14                     PULS B,X
0901 F74B A7 80                     STA  ,X+    Store at load address
0902 074B A7 80                     STA  ,X+    Store at load address
0902 F74D 5A                        DECB
0903 074D 5A                        DECB
0903 F74E 26 F5                     BNE  BLOAD3  Loop until count = 0
0904 074E 26 F5                     BNE  BLOAD3  Loop until count = 0
0904 F750 20 C9                     BRA  BLOAD1
0905 0750 20 C9                     BRA  BLOAD1
0905                         *
0906                         *
0906                         * Get Character routine
0907                         * Get Character routine
0907                         * Reads a sector if needed
0908                         * Reads a sector if needed
0908                         *
0909                         *
0909 F752 10 8C C4 00        GETCH  CMPY #SCTBUF+256 out of data ?
0910 0752 10 8C C4 00        GETCH  CMPY #SCTBUF+256 out of data ?
0910 F756 26 0F                     BNE  GETCH4      Go read Character if not
0911 0756 26 0F                     BNE  GETCH4      Go read Character if not
0911 F758 8E C3 00           GETCH2 LDX  #SCTBUF     Point to buffer
0912 0758 8E C3 00           GETCH2 LDX  #SCTBUF     Point to buffer
0912 F75B EC 84                     LDD  0,X         Get forward Link
0913 075B EC 84                     LDD  0,X         Get forward Link
0913 F75D 27 0B                     BEQ  GOFLEX      if zero, file is loaded
0914 075D 27 0B                     BEQ  GOFLEX      if zero, file is loaded
0914 F75F 8D 26                     BSR  READ        Read next sector
0915 075F 8D 26                     BSR  READ        Read next sector
0915 F761 26 9D                     BNE  BOOT        start over if error
0916 0761 26 9D                     BNE  BOOT        start over if error
0916 F763 10 8E C3 04               LDY  #SCTBUF+4   Point past link
0917 0763 10 8E C3 04               LDY  #SCTBUF+4   Point past link
0917 F767 A6 A0              GETCH4 LDA  ,Y+         Else, get a character
0918 0767 A6 A0              GETCH4 LDA  ,Y+         Else, get a character
0918 F769 39                        RTS
0919 0769 39                        RTS
0919                         *
0920                         *
0920                         * File is loaded, Jump to it
0921                         * File is loaded, Jump to it
0921                         *
0922                         *
0922 F76A 6E 9C 9B           GOFLEX JMP  [TADR,PCR]      Jump to transfer address
0923 076A 6E 9C 9B           GOFLEX JMP  [TADR,PCR]      Jump to transfer address
0923
0924
0924                         *
0925                         *
0925                         ** FLEX 9 IDE DISK DRIVERS
0926                         ** FLEX 9 IDE DISK DRIVERS
0926                         *
0927                         *
0927                         * Seek track and sector
0928                         * Seek track and sector
0928                         * A holds track number (0 - ??)
0929                         * A holds track number (0 - ??)
0929                         * B holds sector number (1 - ??)
0930                         * B holds sector number (1 - ??)
0930                         * Sector numbers starts from 1
0931                         * Sector numbers starts from 1
0931                         * subtract 1 to start from sector 0 on CF
0932                         * subtract 1 to start from sector 0 on CF
0932                         *
0933                         *
0933 F76D 34 02              SEEK   PSHS A
0934 076D 34 02              SEEK   PSHS A
0934 F76F 4F                        CLRA
0935 076F 4F                        CLRA
0935 F770 5A                        DECB
0936 0770 5A                        DECB
0936 F771 FD E1 06                  STD  CF_SECNUM
Symbol 'CF_SECNUM' undefined Pass 20937 0771 FD 00 00                  STD  CF_SECNUM
0937 F774 E6 E4                     LDB  ,S
0938 0774 E6 E4                     LDB  ,S
0938 F776 FD E1 08                  STD  CF_CYLLO
Symbol 'CF_CYLLO' undefined Pass 20939 0776 FD 00 00                  STD  CF_CYLLO
0939 F779 E6 8C 90                  LDB  DRNUM,PCR
0940 0779 E6 8C 90                  LDB  DRNUM,PCR
0940 F77C FD E1 0A                  STD  CF_CYLHI
Symbol 'CF_CYLHI' undefined Pass 20941 077C FD 00 00                  STD  CF_CYLHI
0941 F77F C6 01                     LDB  #$01
0942 077F C6 01                     LDB  #$01
0942 F781 FD E1 04                  STD  CF_SECCNT
Symbol 'CF_SECCNT' undefined Pass 20943 0781 FD 00 00                  STD  CF_SECCNT
0943 F784 5F                        CLRB
0944 0784 5F                        CLRB
0944 F785 35 82                     PULS A,PC
0945 0785 35 82                     PULS A,PC
0945                         *
0946                         *
0946                         * READ SECTORS FROM CF
0947                         * READ SECTORS FROM CF
0947                         *
0948                         *
0948                         *
0949                         *
0949 F787 8D E4              READ   BSR  SEEK
0950 0787 8D E4              READ   BSR  SEEK
0950 F789 CC 00 20                  LDD  #CMDREAD ; IDE READ MULTIPLE
Symbol 'CMDREAD' undefined Pass 20951 0789 CC 00 00                  LDD  #CMDREAD ; IDE READ MULTIPLE
0951 F78C FD E1 0E                  STD  CF_COMAND
Symbol 'CF_COMAND' undefined Pass 20952 078C FD 00 00                  STD  CF_COMAND
0952 F78F 8D 17                     BSR  WTRDY
0953 078F 8D 17                     BSR  WTRDY
0953                         *
0954                         *
0954                         * READ LOOP
0955                         * READ LOOP
0955                         *
0956                         *
0956 F791 34 20                     PSHS Y
0957 0791 34 20                     PSHS Y
0957 F793 10 8E 01 00               LDY #256
0958 0793 10 8E 01 00               LDY #256
0958 F797 8D 1E              READ1  BSR  WTDRQ
0959 0797 8D 1E              READ1  BSR  WTDRQ
0959 F799 FC E1 00                  LDD  CF_DATA
Symbol 'CF_DATA' undefined Pass 20960 0799 FC 00 00                  LDD  CF_DATA
0960 F79C E7 80                     STB  ,X+
0961 079C E7 80                     STB  ,X+
0961 F79E 31 3F                     LEAY -1,Y
0962 079E 31 3F                     LEAY -1,Y
0962 F7A0 26 F5                     BNE  READ1
0963 07A0 26 F5                     BNE  READ1
0963 F7A2 35 20                     PULS Y
0964 07A2 35 20                     PULS Y
0964                         *
0965                         *
0965 F7A4 8D 02                     BSR  WTRDY
0966 07A4 8D 02                     BSR  WTRDY
0966 F7A6 5F                        CLRB
0967 07A6 5F                        CLRB
0967 F7A7 39                        RTS
0968 07A7 39                        RTS
0968                         *
0969                         *
0969                         * WAIT UNTIL READY
0970                         * WAIT UNTIL READY
0970                         *
0971                         *
0971 F7A8 FC E1 0E           WTRDY   LDD  CF_STATUS
Symbol 'CF_STATUS' undefined Pass 20972 07A8 FC 00 00           WTRDY   LDD  CF_STATUS
0972 F7AB C5 80                      BITB #BUSY
Symbol 'BUSY' undefined Pass 20973 07AB C5 00                      BITB #BUSY
0973 F7AD 26 F9                      BNE  WTRDY
0974 07AD 26 F9                      BNE  WTRDY
0974 F7AF FC E1 0E                   LDD  CF_STATUS
Symbol 'CF_STATUS' undefined Pass 20975 07AF FC 00 00                   LDD  CF_STATUS
0975 F7B2 C5 40                      BITB #DRDY
Symbol 'DRDY' undefined Pass 20976 07B2 C5 00                      BITB #DRDY
0976 F7B4 27 F2                      BEQ  WTRDY
0977 07B4 27 F2                      BEQ  WTRDY
0977 F7B6 39                         RTS
0978 07B6 39                         RTS
0978                         *
0979                         *
0979                         * WAIT FOR DATA REQUEST
0980                         * WAIT FOR DATA REQUEST
0980                         *
0981                         *
0981 F7B7 FC E1 0E           WTDRQ   LDD  CF_STATUS
Symbol 'CF_STATUS' undefined Pass 20982 07B7 FC 00 00           WTDRQ   LDD  CF_STATUS
0982 F7BA C5 08                      BITB #DRQ
Symbol 'DRQ' undefined Pass 20983 07BA C5 00                      BITB #DRQ
0983 F7BC 27 F9                      BEQ  WTDRQ
0984 07BC 27 F9                      BEQ  WTDRQ
0984 F7BE 39                         RTS
0985 07BE 39                         RTS
0985                         *
0986                         *
 
0004                                END
0004                                END
0000                          INCLUDE "sys09bug.asm"
0000                          INCLUDE "sys09bug.asm"
0001                         * NAM SYS09BUG12 SYSTEM09 MONITOR
0001                         * NAM SYS09BUG12 SYSTEM09 MONITOR
0002                          OPT l
0002                          OPT l
 
 
Line 1623... Line 1634...
0105 DFC8                    IRQ     RMB   2         ; INTERRUPT VECTOR
0105 DFC8                    IRQ     RMB   2         ; INTERRUPT VECTOR
0106 DFCA                    SWI     RMB   2         ; SOFTWARE INTERRUPT VECTOR
0106 DFCA                    SWI     RMB   2         ; SOFTWARE INTERRUPT VECTOR
0107 DFCC                    SVCVO   RMB   2         ; SUPERVISOR CALL VECTOR ORGIN
0107 DFCC                    SVCVO   RMB   2         ; SUPERVISOR CALL VECTOR ORGIN
0108 DFCE                    SVCVL   RMB   2         ; SUPERVISOR CALL VECTOR LIMIT
0108 DFCE                    SVCVL   RMB   2         ; SUPERVISOR CALL VECTOR LIMIT
0109                                 IFD DATOPT
0109                                 IFD DATOPT
0110                         LRARAM  RMB  16         ; LRA ADDRESSES
0110 DFD0                    LRARAM  RMB  16         ; LRA ADDRESSES
0111                                 ENDIF DATOPT
 
0111                                 ENDIF DATOPT
0111                                 ENDIF DATOPT
0112 DFD0                    CPORT   RMB   2         ; RE-VECTORABLE CONTROL PORT
0112 DFE0                    CPORT   RMB   2         ; RE-VECTORABLE CONTROL PORT
0113 DFD2                    ECHO    RMB   1         ; ECHO FLAG
0113 DFE2                    ECHO    RMB   1         ; ECHO FLAG
0114 DFD3                    BPTBL   RMB  24         ; BREAKPOINT TABLE BASE ADDR
0114 DFE3                    BPTBL   RMB  24         ; BREAKPOINT TABLE BASE ADDR
0115                                 IFD  TRAOPT
0115                                 IFD  TRAOPT
0116                         NMISAV  RMB   2         ; NMI Jump Vector Backup
0116                         NMISAV  RMB   2         ; NMI Jump Vector Backup
0117                         TRACNT  RMB   2         ; Trace Count
0117                         TRACNT  RMB   2         ; Trace Count
0118                                 ENDIF TRAOPT
0118                                 ENDIF TRAOPT
0118                                 ENDIF TRAOPT
0118                                 ENDIF TRAOPT
Line 1641... Line 1651...
0121                         **************************************************
0121                         **************************************************
0122                         *   VDU8 DISPLAY DRIVER VARIABLES                                    *
0122                         *   VDU8 DISPLAY DRIVER VARIABLES                                    *
0123                         **************************************************
0123                         **************************************************
0124                         *
0124                         *
0125                         **** ALWAYS KEEP COLADX AND ROWADX TOGETHER ******
0125                         **** ALWAYS KEEP COLADX AND ROWADX TOGETHER ******
0126                         COLADX  RMB   1         ; CURSOR COLUMN
0126 DFFB                    COLADX  RMB   1         ; CURSOR COLUMN
0127                         ROWADX  RMB   1         ; CURSOR ROW
0127 DFFC                    ROWADX  RMB   1         ; CURSOR ROW
0128                         **************************************************
0128                         **************************************************
0129                         *
0129                         *
0130                         NEWROW  RMB   1         ; NEW ROW TEMP FOR ESCAPE
0130 DFFD                    NEWROW  RMB   1         ; NEW ROW TEMP FOR ESCAPE
0131                         ESCFLG  RMB   1         ; ESCAPE SEQUENCE ACTIVE
0131 DFFE                    ESCFLG  RMB   1         ; ESCAPE SEQUENCE ACTIVE
0132                                 ENDIF VDUOPT
 
0132                                 ENDIF VDUOPT
0132                                 ENDIF VDUOPT
0133                                 IFD DG640OPT
0133                                 IFD DG640OPT
0134                         *
0134                         *
0135                         ***************************************************
0135                         ***************************************************
0136                         *   DG640 MEMORY MAPPED DISPLAY DRIVER VARIABLES  *
0136                         *   DG640 MEMORY MAPPED DISPLAY DRIVER VARIABLES  *
Line 1672... Line 1681...
0150                         *   START OF ROM                                  *
0150                         *   START OF ROM                                  *
0151                         ***************************************************
0151                         ***************************************************
0152                         *
0152                         *
0153 F800                            ORG   MONROM
0153 F800                            ORG   MONROM
0154 F800 F8 14                      FDB   MONITOR
0154 F800 F8 14                      FDB   MONITOR
0155 F802 F8 48                      FDB   NEXTCMD
0155 F802 F8 61                      FDB   NEXTCMD
0156 F804 FC 04                      FDB   INCH
0156 F804 FC A1                      FDB   INCH
0157 F806 FB FE                      FDB   INCHE
0157 F806 FC 9B                      FDB   INCHE
0158 F808 FC 13                      FDB   INCHEK
0158 F808 FC C5                      FDB   INCHEK
0159 F80A FC 21                      FDB   OUTCH
0159 F80A FC E0                      FDB   OUTCH
0160 F80C FA F6                      FDB   PDATA
0160 F80C FB 8F                      FDB   PDATA
0161 F80E FA 85                      FDB   PCRLF
0161 F80E FB 1E                      FDB   PCRLF
0162 F810 FA 81                      FDB   PSTRNG
0162 F810 FB 1A                      FDB   PSTRNG
0163 F812 FC F9                      FDB   LRA
0163 F812 FA 2E                      FDB   LRA
0164                         *
0164                         *
0165                                 IFD   ADSOPT
0165                                 IFD   ADSOPT
0166                                 FDB   PCHK     ; CHECK FOR PRINTER INPUT
0166                                 FDB   PCHK     ; CHECK FOR PRINTER INPUT
0167                                 FDB   PINIZ    ; INITIATE PRINTER
0167                                 FDB   PINIZ    ; INITIATE PRINTER
0168                                 FDB   POUTCH   ; OUTPUT CH. TO PRINTER
0168                                 FDB   POUTCH   ; OUTPUT CH. TO PRINTER
Line 1698... Line 1707...
0175                         * MONITOR
0175                         * MONITOR
0176                         *
0176                         *
0177                         * VECTOR ADDRESS STRING IS.....
0177                         * VECTOR ADDRESS STRING IS.....
0178                         * $F8A1-$F8A1-$F8A1-$F8A1-$F8A1-$FAB0-$FFFF-$FFFF
0178                         * $F8A1-$F8A1-$F8A1-$F8A1-$F8A1-$FAB0-$FFFF-$FFFF
0179                         *
0179                         *
0180 F814 8E FC 7C           MONITOR LDX   #RAMVEC  ; POINT TO VECTOR ADDR. STRING
0180 F814 8E FE 74           MONITOR LDX   #RAMVEC  ; POINT TO VECTOR ADDR. STRING
0181 F817 10 8E DF C0                LDY   #STACK   ; POINT TO RAM VECTOR LOCATION
0181 F817 10 8E DF C0                LDY   #STACK   ; POINT TO RAM VECTOR LOCATION
0182 F81B C6 10                      LDB   #$10     ; BYTES TO MOVE = 16
0182 F81B C6 10                      LDB   #$10     ; BYTES TO MOVE = 16
0183 F81D A6 80              LOOPA   LDA   ,X+      ; GET VECTOR BYTE
0183 F81D A6 80              LOOPA   LDA   ,X+      ; GET VECTOR BYTE
0184 F81F A7 A0                      STA   ,Y+      ; PUT VECTORS IN RAM / $DFC0-$DFCF
0184 F81F A7 A0                      STA   ,Y+      ; PUT VECTORS IN RAM / $DFC0-$DFCF
0185 F821 5A                         DECB           ; SUBTRACT 1 FROM NUMBER OF BYTES TO MOVE
0185 F821 5A                         DECB           ; SUBTRACT 1 FROM NUMBER OF BYTES TO MOVE
Line 1716... Line 1725...
0193                         *  $F8A1       $FE48      $DFC8     IRQ-V
0193                         *  $F8A1       $FE48      $DFC8     IRQ-V
0194                         *  $FAB0       $FE4A      $DFCA     SWI-V
0194                         *  $FAB0       $FE4A      $DFCA     SWI-V
0195                         *  $FFFF       $FE4C      $DFCC     SVC-VO
0195                         *  $FFFF       $FE4C      $DFCC     SVC-VO
0196                         *  $FFFF       $FE4E      $DFCE     SVC-VL
0196                         *  $FFFF       $FE4E      $DFCE     SVC-VL
0197                         *
0197                         *
Symbol 'ACIAS' undefined Pass 20198 F824 8E 00 00                   LDX   #ACIAS
0198 F824 8E E0 00                   LDX   #ACIAS
0199 F827 BF DF D0                   STX   CPORT    ; STORE ADDR. IN RAM
0199 F827 BF DF E0                   STX   CPORT    ; STORE ADDR. IN RAM
0200 F82A 17 01 42                   LBSR  XBKPNT   ; CLEAR OUTSTANDING BREAKPOINTS
0200 F82A 17 01 5B                   LBSR  XBKPNT   ; CLEAR OUTSTANDING BREAKPOINTS
0201 F82D C6 0C                      LDB   #12      ; CLEAR 12 BYTES ON STACK
0201 F82D C6 0C                      LDB   #12      ; CLEAR 12 BYTES ON STACK
0202 F82F 6F E2              CLRSTK  CLR   ,-S
0202 F82F 6F E2              CLRSTK  CLR   ,-S
0203 F831 5A                         DECB
0203 F831 5A                         DECB
0204 F832 26 FB                      BNE   CLRSTK
0204 F832 26 FB                      BNE   CLRSTK
0205 F834 30 8C DD                   LEAX  MONITOR,PCR  ; SET PC TO SBUG-E ENTRY
0205 F834 30 8C DD                   LEAX  MONITOR,PCR  ; SET PC TO SBUG-E ENTRY
0206 F837 AF 6A                      STX   10,S    ; ON STACK
0206 F837 AF 6A                      STX   10,S    ; ON STACK
0207 F839 86 D0                      LDA   #$D0    ; PRESET CONDITION CODES ON STACK
0207 F839 86 D0                      LDA   #$D0    ; PRESET CONDITION CODES ON STACK
0208 F83B A7 E4                      STA   ,S
0208 F83B A7 E4                      STA   ,S
0209 F83D 1F 43                      TFR   S,U
0209 F83D 1F 43                      TFR   S,U
0210 F83F 17 03 F4                   LBSR  IOINIZ  ; INITIALIZE CONTROL PORT
0210 F83F 17 04 B5                   LBSR  IOINIZ  ; INITIALIZE CONTROL PORT
0211 F842 8E FC 8C                   LDX   #MSG1   ; POINT TO MONITOR MESSAGE
0211 F842 8E FE 84                   LDX   #MSG1   ; POINT TO MONITOR MESSAGE
0212 F845 17 02 AE                   LBSR  PDATA   ; PRINT MSG
0212 F845 17 03 47                   LBSR  PDATA   ; PRINT MSG
0213                         *
0213                         *
0214                                 IFD   DATOPT
0214                                 IFD   DATOPT
0215                                 LDX   #LRARAM ; POINT TO LRA RAM STORAGE AREA
0215 F848 8E DF D0                   LDX   #LRARAM ; POINT TO LRA RAM STORAGE AREA
0216                                 CLRA  START   ; TOTAL AT ZERO
0216 F84B 4F                         CLRA  START   ; TOTAL AT ZERO
0217                                 LDB   #13     ; TOTAL UP ALL ACTIVE RAM MEMORY
0217 F84C C6 0D                      LDB   #13     ; TOTAL UP ALL ACTIVE RAM MEMORY
0218                         FNDREL  TST   B,X     ; TEST FOR RAM AT NEXT LOC.
0218 F84E 6D 85              FNDREL  TST   B,X     ; TEST FOR RAM AT NEXT LOC.
0219                                 BEQ   RELPAS  ; IF NO RAM GO TO NEXT LOC.
0219 F850 27 03                      BEQ   RELPAS  ; IF NO RAM GO TO NEXT LOC.
0220                                 ADDA  #4      ; ELSE ADD 4K TO TOTAL
0220 F852 8B 04                      ADDA  #4      ; ELSE ADD 4K TO TOTAL
0221                                 DAA           ; ADJ. TOTAL FOR DECIMAL
0221 F854 19                         DAA           ; ADJ. TOTAL FOR DECIMAL
0222                         RELPAS  DECB          ; SUB. 1 FROM LOCS. TO TEST
0222 F855 5A                 RELPAS  DECB          ; SUB. 1 FROM LOCS. TO TEST
0223                                 BPL   FNDREL  ; PRINT TOTAL OF RAM
0223 F856 2A F6                      BPL   FNDREL  ; PRINT TOTAL OF RAM
0224                                 LBSR  OUT2H   ; OUTPUT HEX BYTE AS ASCII
0224 F858 17 04 0C                   LBSR  OUT2H   ; OUTPUT HEX BYTE AS ASCII
0225                                 LDX   #MSG2   ; POINT TO MSG 'K' CR/LF + 3 NULS
0225 F85B 8E FE A3                   LDX   #MSG2   ; POINT TO MSG 'K' CR/LF + 3 NULS
0226                                 LBSR  PDATA   ; PRINT MSG
0226 F85E 17 03 2E                   LBSR  PDATA   ; PRINT MSG
0227                                 ENDIF DATOPT
 
0227                                 ENDIF DATOPT
0227                                 ENDIF DATOPT
0228                         *
0228                         *
0229                                 IFD   TRAOPT
0229                                 IFD   TRAOPT
0230                                 LBSR  TRAINZ
0230                                 LBSR  TRAINZ
0231                                 ENDIF TRAOPT
0231                                 ENDIF TRAOPT
0231                                 ENDIF TRAOPT
0231                                 ENDIF TRAOPT
0232                         *
0232                         *
0233                         ***** NEXTCMD *****
0233                         ***** NEXTCMD *****
0234                         *
0234                         *
0235 F848 8E FC AD           NEXTCMD LDX  #MSG3   ; POINT TO MSG ">"
0235 F861 8E FE AA           NEXTCMD LDX  #MSG3   ; POINT TO MSG ">"
0236 F84B 17 02 33                   LBSR PSTRNG  ; PRINT MSG
0236 F864 17 02 B3                   LBSR PSTRNG  ; PRINT MSG
0237 F84E 17 03 B3                   LBSR INCH    ; GET ONE CHAR. FROM TERMINAL
0237 F867 17 04 37                   LBSR INCH    ; GET ONE CHAR. FROM TERMINAL
0238 F851 84 7F                      ANDA #$7F    ; STRIP PARITY FROM CHAR.
0238 F86A 84 7F                      ANDA #$7F    ; STRIP PARITY FROM CHAR.
0239 F853 81 0D                      CMPA #$0D    ; IS IT CARRIAGE RETURN ?
0239 F86C 81 0D                      CMPA #$0D    ; IS IT CARRIAGE RETURN ?
0240 F855 27 F1                      BEQ  NEXTCMD ; IF CR THEN GET ANOTHER CHAR.
0240 F86E 27 F1                      BEQ  NEXTCMD ; IF CR THEN GET ANOTHER CHAR.
0241 F857 1F 89                      TFR  A,B     ; PUT CHAR. IN "B" ACCUM.
0241 F870 1F 89                      TFR  A,B     ; PUT CHAR. IN "B" ACCUM.
0242 F859 81 20                      CMPA #$20    ; IS IT CONTROL OR DATA CHAR ?
0242 F872 81 20                      CMPA #$20    ; IS IT CONTROL OR DATA CHAR ?
0243 F85B 2C 09                      BGE  PRTCMD  ; IF CMD CHAR IS DATA, PRNT IT
0243 F874 2C 09                      BGE  PRTCMD  ; IF CMD CHAR IS DATA, PRNT IT
0244 F85D 86 5E                      LDA  #'^     ; ELSE CNTRL CHAR CMD SO...
0244 F876 86 5E                      LDA  #'^     ; ELSE CNTRL CHAR CMD SO...
0245 F85F 17 03 BF                   LBSR OUTCH   ; PRINT "^"
0245 F878 17 04 65                   LBSR OUTCH   ; PRINT "^"
0246 F862 1F 98                      TFR  B,A     ; RECALL CNTRL CMD CHAR
0246 F87B 1F 98                      TFR  B,A     ; RECALL CNTRL CMD CHAR
0247 F864 8B 40                      ADDA #$40    ; CONVERT IT TO ASCII LETTER
0247 F87D 8B 40                      ADDA #$40    ; CONVERT IT TO ASCII LETTER
0248 F866 17 03 B8           PRTCMD  LBSR OUTCH   ; PRNT CMD CHAR
0248 F87F 17 04 5E           PRTCMD  LBSR OUTCH   ; PRNT CMD CHAR
0249 F869 17 03 B3                   LBSR OUT1S   ; PRNT SPACE
0249 F882 17 04 59                   LBSR OUT1S   ; PRNT SPACE
0250 F86C C1 60                      CMPB #$60
0250 F885 C1 60                      CMPB #$60
0251 F86E 2F 02                      BLE  NXTCH0
0251 F887 2F 02                      BLE  NXTCH0
0252 F870 C0 20                      SUBB #$20
0252 F889 C0 20                      SUBB #$20
0253                         *
0253                         *
0254                         ***** DO TABLE LOOKUP *****
0254                         ***** DO TABLE LOOKUP *****
0255                         *   FOR COMMAND FUNCTIONS
0255                         *   FOR COMMAND FUNCTIONS
0256                         *
0256                         *
0257 F872 8E FC 49           NXTCH0  LDX  #JMPTAB ; POINT TO JUMP TABLE
0257 F88B 8E FE 3B           NXTCH0  LDX  #JMPTAB ; POINT TO JUMP TABLE
0258 F875 E1 80              NXTCHR  CMPB ,X+     ; DOES COMMAND MATCH TABLE ENTRY ?
0258 F88E E1 80              NXTCHR  CMPB ,X+     ; DOES COMMAND MATCH TABLE ENTRY ?
0259 F877 27 0F                      BEQ  JMPCMD  ; BRANCH IF MATCH FOUND
0259 F890 27 0F                      BEQ  JMPCMD  ; BRANCH IF MATCH FOUND
0260 F879 30 02                      LEAX 2,X     ; POINT TO NEXT ENTRY IN TABLE
0260 F892 30 02                      LEAX 2,X     ; POINT TO NEXT ENTRY IN TABLE
0261 F87B 8C FC 7C                   CMPX #TABEND ; REACHED END OF TABLE YET ?
0261 F894 8C FE 74                   CMPX #TABEND ; REACHED END OF TABLE YET ?
0262 F87E 26 F5                      BNE  NXTCHR  ; IF NOT END, CHECK NEXT ENTRY
0262 F897 26 F5                      BNE  NXTCHR  ; IF NOT END, CHECK NEXT ENTRY
0263 F880 8E FC AF                   LDX  #MSG4   ; POINT TO MSG "WHAT?"
0263 F899 8E FE AC                   LDX  #MSG4   ; POINT TO MSG "WHAT?"
0264 F883 17 02 70                   LBSR PDATA   ; PRINT MSG
0264 F89C 17 02 F0                   LBSR PDATA   ; PRINT MSG
0265 F886 20 C0                      BRA  NEXTCMD ; IF NO MATCH, PRMPT FOR NEW CMD
0265 F89F 20 C0                      BRA  NEXTCMD ; IF NO MATCH, PRMPT FOR NEW CMD
0266 F888 AD 94              JMPCMD  JSR  [,X]    ; JUMP TO COMMAND ROUTINE
0266 F8A1 AD 94              JMPCMD  JSR  [,X]    ; JUMP TO COMMAND ROUTINE
0267 F88A 20 BC                      BRA  NEXTCMD ; PROMPT FOR NEW COMMAND
0267 F8A3 20 BC                      BRA  NEXTCMD ; PROMPT FOR NEW COMMAND
0268                         *
0268                         *
0269                         * "G" GO OR CONTINUE
0269                         * "G" GO OR CONTINUE
0270                         *
0270                         *
0271 F88C 1F 34              GO      TFR  U,S
0271 F8A5 1F 34              GO      TFR  U,S
0272 F88E 3B                 RTI     RTI
0272 F8A7 3B                 RTI     RTI
0273                         *
0273                         *
0274                         ***** "M" MEMORY EXAMINE AND CHANGE *****
0274                         ***** "M" MEMORY EXAMINE AND CHANGE *****
0275                         *
0275                         *
0276 F88F 17 02 EB           MEMCHG  LBSR IN1ADR  ; INPUT ADDRESS
0276 F8A8 17 03 6B           MEMCHG  LBSR IN1ADR  ; INPUT ADDRESS
0277 F892 29 2D                      BVS  CHRTN   ; IF NOT HEX, RETURN
0277 F8AB 29 2D                      BVS  CHRTN   ; IF NOT HEX, RETURN
0278 F894 1F 12                      TFR  X,Y     ; SAVE ADDR IN "Y"
0278 F8AD 1F 12                      TFR  X,Y     ; SAVE ADDR IN "Y"
0279 F896 8E FC B5           MEMC2   LDX  #MSG5   ; POINT TO MSG " - "
0279 F8AF 8E FE B2           MEMC2   LDX  #MSG5   ; POINT TO MSG " - "
0280 F899 17 01 E5                   LBSR PSTRNG  ; PRINT MSG
0280 F8B2 17 02 65                   LBSR PSTRNG  ; PRINT MSG
0281 F89C 1F 21                      TFR  Y,X     ; FETCH ADDRESS
0281 F8B5 1F 21                      TFR  Y,X     ; FETCH ADDRESS
0282 F89E 17 03 25                   LBSR OUT4H   ; PRINT ADDR IN HEX
0282 F8B7 17 03 A5                   LBSR OUT4H   ; PRINT ADDR IN HEX
0283 F8A1 17 03 7B                   LBSR OUT1S   ; OUTPUT SPACE
0283 F8BA 17 04 21                   LBSR OUT1S   ; OUTPUT SPACE
0284 F8A4 A6 A4                      LDA  ,Y      ; GET CONTENTS OF CURRENT ADDR.
0284 F8BD A6 A4                      LDA  ,Y      ; GET CONTENTS OF CURRENT ADDR.
0285 F8A6 17 03 25                   LBSR OUT2H   ; OUTPUT CONTENTS IN ASCII
0285 F8BF 17 03 A5                   LBSR OUT2H   ; OUTPUT CONTENTS IN ASCII
0286 F8A9 17 03 73                   LBSR OUT1S   ; OUTPUT SPACE
0286 F8C2 17 04 19                   LBSR OUT1S   ; OUTPUT SPACE
0287 F8AC 17 02 DE                   LBSR BYTE    ; LOOP WAITING FOR OPERATOR INPUT
0287 F8C5 17 03 5E                   LBSR BYTE    ; LOOP WAITING FOR OPERATOR INPUT
0288 F8AF 28 11                      BVC  CHANGE  ; IF VALID HEX GO CHANGE MEM. LOC.
0288 F8C8 28 11                      BVC  CHANGE  ; IF VALID HEX GO CHANGE MEM. LOC.
0289 F8B1 81 08                      CMPA #8      ; IS IT A BACKSPACE (CNTRL H)?
0289 F8CA 81 08                      CMPA #8      ; IS IT A BACKSPACE (CNTRL H)?
0290 F8B3 27 E1                      BEQ  MEMC2   ; PROMPT OPERATOR AGAIN
0290 F8CC 27 E1                      BEQ  MEMC2   ; PROMPT OPERATOR AGAIN
0291 F8B5 81 18                      CMPA #$18    ; IS IT A CANCEL (CNTRL X)?
0291 F8CE 81 18                      CMPA #$18    ; IS IT A CANCEL (CNTRL X)?
0292 F8B7 27 DD                      BEQ  MEMC2   ; PROMPT OPERATOR AGAIN
0292 F8D0 27 DD                      BEQ  MEMC2   ; PROMPT OPERATOR AGAIN
0293 F8B9 81 5E                      CMPA #'^     ; IS IT AN UP ARROW?
0293 F8D2 81 5E                      CMPA #'^     ; IS IT AN UP ARROW?
0294 F8BB 27 17                      BEQ  BACK    ; DISPLAY PREVIOUS BYTE
0294 F8D4 27 17                      BEQ  BACK    ; DISPLAY PREVIOUS BYTE
0295 F8BD 81 0D                      CMPA #$D     ; IS IT A CR?
0295 F8D6 81 0D                      CMPA #$D     ; IS IT A CR?
0296 F8BF 26 0F                      BNE  FORWRD  ; DISPLAY NEXT BYTE
0296 F8D8 26 0F                      BNE  FORWRD  ; DISPLAY NEXT BYTE
0297 F8C1 39                 CHRTN   RTS          ; EXIT ROUTINE
0297 F8DA 39                 CHRTN   RTS          ; EXIT ROUTINE
0298                         *
0298                         *
0299                         *
0299                         *
0300 F8C2 A7 A4              CHANGE  STA  ,Y      ; CHANGE BYTE IN MEMORY
0300 F8DB A7 A4              CHANGE  STA  ,Y      ; CHANGE BYTE IN MEMORY
0301 F8C4 A1 A4                      CMPA ,Y      ; DID MEMORY BYTE CHANGE?
0301 F8DD A1 A4                      CMPA ,Y      ; DID MEMORY BYTE CHANGE?
0302 F8C6 27 08                      BEQ  FORWRD  ; $F972
0302 F8DF 27 08                      BEQ  FORWRD  ; $F972
0303 F8C8 17 03 54                   LBSR OUT1S   ; OUTPUT SPACE
0303 F8E1 17 03 FA                   LBSR OUT1S   ; OUTPUT SPACE
0304 F8CB 86 3F                      LDA  #'?     ; LOAD QUESTION MARK
0304 F8E4 86 3F                      LDA  #'?     ; LOAD QUESTION MARK
0305 F8CD 17 03 51                   LBSR OUTCH   ; PRINT IT
0305 F8E6 17 03 F7                   LBSR OUTCH   ; PRINT IT
0306 F8D0 31 21              FORWRD  LEAY 1,Y     ; POINT TO NEXT HIGHER MEM LOCATION
0306 F8E9 31 21              FORWRD  LEAY 1,Y     ; POINT TO NEXT HIGHER MEM LOCATION
0307 F8D2 20 C2                      BRA  MEMC2   ; PRINT LOCATION & CONTENTS
0307 F8EB 20 C2                      BRA  MEMC2   ; PRINT LOCATION & CONTENTS
0308 F8D4 31 3F              BACK    LEAY -1,Y    ; POINT TO LAST MEM LOCATION
0308 F8ED 31 3F              BACK    LEAY -1,Y    ; POINT TO LAST MEM LOCATION
0309 F8D6 20 BE                      BRA  MEMC2   ; PRINT LOCATION & CONTENTS
0309 F8EF 20 BE                      BRA  MEMC2   ; PRINT LOCATION & CONTENTS
0310                         *
0310                         *
0311                         * "S" DISPLAY STACK
0311                         * "S" DISPLAY STACK
0312                         * HEX-ASCII DISPLAY OF CURRENT STACK CONTENTS FROM
0312                         * HEX-ASCII DISPLAY OF CURRENT STACK CONTENTS FROM
0313                         ** CURRENT STACK POINTER TO INTERNAL STACK LIMIT.
0313                         ** CURRENT STACK POINTER TO INTERNAL STACK LIMIT.
0314                         *
0314                         *
0315 F8D8 17 02 22           DISSTK  LBSR PRTSP   ; PRINT CURRENT STACK POINTER
0315 F8F1 17 02 A2           DISSTK  LBSR PRTSP   ; PRINT CURRENT STACK POINTER
0316 F8DB 1F 32                      TFR  U,Y
0316 F8F4 1F 32                      TFR  U,Y
0317 F8DD 8E DF C0                   LDX  #STACK  ; LOAD INTERNAL STACK AS UPPER LIMIT
0317 F8F6 8E DF C0                   LDX  #STACK  ; LOAD INTERNAL STACK AS UPPER LIMIT
0318 F8E0 30 1F                      LEAX -1,X    ; POINT TO CURRENT STACK
0318 F8F9 30 1F                      LEAX -1,X    ; POINT TO CURRENT STACK
0319 F8E2 20 05                      BRA  MDUMP1  ; ENTER MEMORY DUMP OF STACK CONTENTS
0319 F8FB 20 05                      BRA  MDUMP1  ; ENTER MEMORY DUMP OF STACK CONTENTS
0320                         *
0320                         *
0321                         * "E" DUMP MEMORY FOR EXAMINE IN HEX AND ASCII
0321                         * "E" DUMP MEMORY FOR EXAMINE IN HEX AND ASCII
0322                         * AFTER CALLING 'IN2ADR' LOWER ADDRESS IN Y-REG.
0322                         * AFTER CALLING 'IN2ADR' LOWER ADDRESS IN Y-REG.
0323                         *                        UPPER ADDRESS IN X-REG.
0323                         *                        UPPER ADDRESS IN X-REG.
0324                         * IF HEX ADDRESSES ARE INVALID (V)=1.
0324                         * IF HEX ADDRESSES ARE INVALID (V)=1.
0325                         *
0325                         *
0326 F8E4 17 02 8B           MEMDUMP LBSR IN2ADR  ; INPUT ADDRESS BOUNDRIES
0326 F8FD 17 03 0B           MEMDUMP LBSR IN2ADR  ; INPUT ADDRESS BOUNDRIES
0327 F8E7 29 06                      BVS  EDPRTN  ; NEW COMMAND IF ILLEGAL HEX
0327 F900 29 06                      BVS  EDPRTN  ; NEW COMMAND IF ILLEGAL HEX
0328 F8E9 34 20              MDUMP1  PSHS Y       ; COMPARE LOWER TO UPPER BOUNDS
0328 F902 34 20              MDUMP1  PSHS Y       ; COMPARE LOWER TO UPPER BOUNDS
0329 F8EB AC E1                      CMPX ,S++    ; LOWER BOUNDS > UPPER BOUNDS?
0329 F904 AC E1                      CMPX ,S++    ; LOWER BOUNDS > UPPER BOUNDS?
0330 F8ED 24 01                      BCC  AJDUMP  ; IF NOT, DUMP HEX AND ASCII
0330 F906 24 01                      BCC  AJDUMP  ; IF NOT, DUMP HEX AND ASCII
0331 F8EF 39                 EDPRTN  RTS          ;
0331 F908 39                 EDPRTN  RTS          ;
0332                         *
0332                         *
0333                         * ADJUST LOWER AND UPPER ADDRESS LIMITS
0333                         * ADJUST LOWER AND UPPER ADDRESS LIMITS
0334                         * TO EVEN 16 BYTE BOUNDRIES.
0334                         * TO EVEN 16 BYTE BOUNDRIES.
0335                         *
0335                         *
0336                         * IF LOWER ADDR = $4532
0336                         * IF LOWER ADDR = $4532
Line 1865... Line 1873...
0340                         * UPPER BOUNDS WILL BE ADJUSTED TO = $4570.
0340                         * UPPER BOUNDS WILL BE ADJUSTED TO = $4570.
0341                         *
0341                         *
0342                         * ENTER WITH LOWER ADDRESS IN X-REG.
0342                         * ENTER WITH LOWER ADDRESS IN X-REG.
0343                         *           -UPPER ADDRESS ON TOP OF STACK.
0343                         *           -UPPER ADDRESS ON TOP OF STACK.
0344                         *
0344                         *
0345 F8F0 1F 10              AJDUMP  TFR  X,D     ; GET UPPER ADDR IN D-REG
0345 F909 1F 10              AJDUMP  TFR  X,D     ; GET UPPER ADDR IN D-REG
0346 F8F2 C3 00 10                   ADDD #$10    ; ADD 16 TO UPPER ADDRESS
0346 F90B C3 00 10                   ADDD #$10    ; ADD 16 TO UPPER ADDRESS
0347 F8F5 C4 F0                      ANDB #$F0    ; MASK TO EVEN 16 BYTE BOUNDRY
0347 F90E C4 F0                      ANDB #$F0    ; MASK TO EVEN 16 BYTE BOUNDRY
0348 F8F7 34 06                      PSHS A,B     ; SAVE ON STACK AS UPPER DUMP LIMIT
0348 F910 34 06                      PSHS A,B     ; SAVE ON STACK AS UPPER DUMP LIMIT
0349 F8F9 1F 20                      TFR  Y,D     ; $F9A5 GET LOWER ADDRESS IN D-REG
0349 F912 1F 20                      TFR  Y,D     ; $F9A5 GET LOWER ADDRESS IN D-REG
0350 F8FB C4 F0                      ANDB #$F0    ; MASK TO EVEN 16 BYTE BOUNDRY
0350 F914 C4 F0                      ANDB #$F0    ; MASK TO EVEN 16 BYTE BOUNDRY
0351 F8FD 1F 01                      TFR  D,X     ; PUT IN X-REG AS LOWER DUMP LIMIT
0351 F916 1F 01                      TFR  D,X     ; PUT IN X-REG AS LOWER DUMP LIMIT
0352 F8FF AC E4              NXTLIN  CMPX ,S      ; COMPARE LOWER TO UPPER LIMIT
0352 F918 AC E4              NXTLIN  CMPX ,S      ; COMPARE LOWER TO UPPER LIMIT
0353 F901 27 05                      BEQ  SKPDMP  ; IF EQUAL SKIP HEX-ASCII DUMP
0353 F91A 27 05                      BEQ  SKPDMP  ; IF EQUAL SKIP HEX-ASCII DUMP
0354 F903 17 03 0D                   LBSR INCHEK  ; CHECK FOR INPUT FROM KEYBOARD
0354 F91C 17 03 A6                   LBSR INCHEK  ; CHECK FOR INPUT FROM KEYBOARD
0355 F906 27 03                      BEQ  EDUMP
0355 F91F 27 03                      BEQ  EDUMP
0356 F908 32 62              SKPDMP  LEAS 2,S     ; READJUST STACK IF NOT DUMPING
0356 F921 32 62              SKPDMP  LEAS 2,S     ; READJUST STACK IF NOT DUMPING
0357 F90A 39                         RTS          ;
0357 F923 39                         RTS          ;
0358                         *
0358                         *
0359                         * PRINT 16 HEX BYTES FOLLOWED BY 16 ASCII CHARACTERS
0359                         * PRINT 16 HEX BYTES FOLLOWED BY 16 ASCII CHARACTERS
0360                         * FOR EACH LINE THROUGHOUT ADDRESS LIMITS.
0360                         * FOR EACH LINE THROUGHOUT ADDRESS LIMITS.
0361                         *
0361                         *
0362 F90B 34 10              EDUMP   PSHS X       ; PUSH LOWER ADDR LIMIT ON STACK
0362 F924 34 10              EDUMP   PSHS X       ; PUSH LOWER ADDR LIMIT ON STACK
0363 F90D 8E FC B5                   LDX  #MSG5   ; POINT TO MSG " - "
0363 F926 8E FE B2                   LDX  #MSG5   ; POINT TO MSG " - "
0364 F910 17 01 6E                   LBSR PSTRNG  ; PRINT MSG
0364 F929 17 01 EE                   LBSR PSTRNG  ; PRINT MSG
0365 F913 AE E4                      LDX  ,S      ; LOAD LOWER ADDR FROM TOP OF STACK
0365 F92C AE E4                      LDX  ,S      ; LOAD LOWER ADDR FROM TOP OF STACK
0366 F915 17 02 AE                   LBSR OUT4H   ; PRINT THE ADDRESS
0366 F92E 17 03 2E                   LBSR OUT4H   ; PRINT THE ADDRESS
0367 F918 17 03 02                   LBSR OUT2S   ; 2 SPACES
0367 F931 17 03 A8                   LBSR OUT2S   ; 2 SPACES
0368 F91B C6 10                      LDB  #$10    ; LOAD COUNT OF 16 BYTES TO DUMP
0368 F934 C6 10                      LDB  #$10    ; LOAD COUNT OF 16 BYTES TO DUMP
0369 F91D A6 80              ELOOP   LDA  ,X+     ; GET FROM MEMORY HEX BYTE TO PRINT
0369 F936 A6 80              ELOOP   LDA  ,X+     ; GET FROM MEMORY HEX BYTE TO PRINT
0370 F91F 17 02 AC                   LBSR OUT2H   ; OUTPUT HEX BYTE AS ASCII
0370 F938 17 03 2C                   LBSR OUT2H   ; OUTPUT HEX BYTE AS ASCII
0371 F922 17 02 FA                   LBSR OUT1S   ; OUTPUT SPACE
0371 F93B 17 03 A0                   LBSR OUT1S   ; OUTPUT SPACE
0372 F925 5A                         DECB         ; $F9D1 DECREMENT BYTE COUNT
0372 F93E 5A                         DECB         ; $F9D1 DECREMENT BYTE COUNT
0373 F926 26 F5                      BNE  ELOOP   ; CONTINUE TIL 16 HEX BYTES PRINTED
0373 F93F 26 F5                      BNE  ELOOP   ; CONTINUE TIL 16 HEX BYTES PRINTED
0374                         *
0374                         *
0375                         * PRINT 16 ASCII CHARACTERS
0375                         * PRINT 16 ASCII CHARACTERS
0376                         * IF NOT PRINTABLE OR NOT VALID
0376                         * IF NOT PRINTABLE OR NOT VALID
0377                         * ASCII PRINT A PERIOD (.)
0377                         * ASCII PRINT A PERIOD (.)
0378 F928 17 02 F2                   LBSR OUT2S   ; 2 SPACES
0378 F941 17 03 98                   LBSR OUT2S   ; 2 SPACES
0379 F92B AE E1                      LDX  ,S++    ; GET LOW LIMIT FRM STACK - ADJ STACK
0379 F944 AE E1                      LDX  ,S++    ; GET LOW LIMIT FRM STACK - ADJ STACK
0380 F92D C6 10                      LDB  #$10    ; SET ASCII CHAR TO PRINT = 16
0380 F946 C6 10                      LDB  #$10    ; SET ASCII CHAR TO PRINT = 16
0381 F92F A6 80              EDPASC  LDA  ,X+     ; GET CHARACTER FROM MEMORY
0381 F948 A6 80              EDPASC  LDA  ,X+     ; GET CHARACTER FROM MEMORY
0382 F931 81 20                      CMPA #$20    ; IF LESS THAN $20, NON-PRINTABLE?
0382 F94A 81 20                      CMPA #$20    ; IF LESS THAN $20, NON-PRINTABLE?
0383 F933 25 04                      BCS  PERIOD  ; IF SO, PRINT PERIOD INSTEAD
0383 F94C 25 04                      BCS  PERIOD  ; IF SO, PRINT PERIOD INSTEAD
0384 F935 81 7E                      CMPA #$7E    ; IS IT VALID ASCII?
0384 F94E 81 7E                      CMPA #$7E    ; IS IT VALID ASCII?
0385 F937 23 02                      BLS  PRASC   ; IF SO PRINT IT
0385 F950 23 02                      BLS  PRASC   ; IF SO PRINT IT
0386 F939 86 2E              PERIOD  LDA  #'.     ; LOAD A PERIOD (.)
0386 F952 86 2E              PERIOD  LDA  #'.     ; LOAD A PERIOD (.)
0387 F93B 17 02 E3           PRASC   LBSR OUTCH   ; PRINT ASCII CHARACTER
0387 F954 17 03 89           PRASC   LBSR OUTCH   ; PRINT ASCII CHARACTER
0388 F93E 5A                         DECB         ; DECREMENT COUNT
0388 F957 5A                         DECB         ; DECREMENT COUNT
0389 F93F 26 EE                      BNE  EDPASC
0389 F958 26 EE                      BNE  EDPASC
0390 F941 20 BC                      BRA  NXTLIN
0390 F95A 20 BC                      BRA  NXTLIN
0391                         *
0391                         *
0392                         ***** "B" SET BREAKPOINT *****
0392                         ***** "B" SET BREAKPOINT *****
0393                         *
0393                         *
0394 F943 17 02 37           BRKPNT  LBSR IN1ADR  ; GET BREAKPOINT ADDRESS
0394 F95C 17 02 B7           BRKPNT  LBSR IN1ADR  ; GET BREAKPOINT ADDRESS
0395 F946 29 1E                      BVS  EXITBP  ; EXIT IF INVALID HEX ADDR.
0395 F95F 29 1E                      BVS  EXITBP  ; EXIT IF INVALID HEX ADDR.
0396 F948 8C DF C0                   CMPX #STACK  ; ADDRESS ILLEGAL IF >=$DFC0
0396 F961 8C DF C0                   CMPX #STACK  ; ADDRESS ILLEGAL IF >=$DFC0
0397 F94B 24 1A                      BCC  BPERR   ; IF ERROR PRINT (?), EXIT
0397 F964 24 1A                      BCC  BPERR   ; IF ERROR PRINT (?), EXIT
0398 F94D 34 10                      PSHS X       ; $FA82 PUSH BP ADDRESS ON STACK
0398 F966 34 10                      PSHS X       ; $FA82 PUSH BP ADDRESS ON STACK
0399 F94F 8E FF FF                   LDX  #$FFFF  ; LOAD DUMMY ADDR TO TEST BP TABLE
0399 F968 8E FF FF                   LDX  #$FFFF  ; LOAD DUMMY ADDR TO TEST BP TABLE
0400 F952 8D 55                      BSR BPTEST   ; TEST BP TABLE FOR FREE SPACE
0400 F96B 8D 55                      BSR BPTEST   ; TEST BP TABLE FOR FREE SPACE
0401 F954 35 10                      PULS X       ; POP BP ADDRESS FROM STACK
0401 F96D 35 10                      PULS X       ; POP BP ADDRESS FROM STACK
0402 F956 27 0F                      BEQ  BPERR   ; (Z) SET, OUT OF BP TABLE SPACE
0402 F96F 27 0F                      BEQ  BPERR   ; (Z) SET, OUT OF BP TABLE SPACE
0403 F958 A6 84                      LDA  ,X      ; GET DATA AT BREAKPOINT ADDRESS
0403 F971 A6 84                      LDA  ,X      ; GET DATA AT BREAKPOINT ADDRESS
0404 F95A 81 3F                      CMPA #$3F    ; IS IT A SWI?
0404 F973 81 3F                      CMPA #$3F    ; IS IT A SWI?
0405 F95C 27 09                      BEQ  BPERR   ; IF SWI ALREADY, INDICATE ERROR
0405 F975 27 09                      BEQ  BPERR   ; IF SWI ALREADY, INDICATE ERROR
0406 F95E A7 A0                      STA  ,Y+     ; SAVE DATA BYTE IN BP TABLE
0406 F977 A7 A0                      STA  ,Y+     ; SAVE DATA BYTE IN BP TABLE
0407 F960 AF A4                      STX  ,Y      ; SAVE BP ADDRESS IN BP TABLE
0407 F979 AF A4                      STX  ,Y      ; SAVE BP ADDRESS IN BP TABLE
0408 F962 86 3F                      LDA  #$3F    ; LOAD A SWI ($3F)
0408 F97B 86 3F                      LDA  #$3F    ; LOAD A SWI ($3F)
0409 F964 A7 84                      STA  ,X      ; SAVE SWI AT BREAKPOINT ADDRESS
0409 F97D A7 84                      STA  ,X      ; SAVE SWI AT BREAKPOINT ADDRESS
0410 F966 39                 EXITBP  RTS ;
0410 F97F 39                 EXITBP  RTS ;
0411                         *
0411                         *
0412                         *  INDICATE ERROR SETTING BREAKPOINT
0412                         *  INDICATE ERROR SETTING BREAKPOINT
0413                         *
0413                         *
0414 F967 17 02 B5           BPERR   LBSR OUT1S   ; OUTPUT SPACE
0414 F980 17 03 5B           BPERR   LBSR OUT1S   ; OUTPUT SPACE
0415 F96A 86 3F                      LDA  #'?     ; LOAD (?), INDICATE BREAKPOINT ERROR
0415 F983 86 3F                      LDA  #'?     ; LOAD (?), INDICATE BREAKPOINT ERROR
0416 F96C 16 02 B2                   LBRA OUTCH   ; PRINT "?"
0416 F985 16 03 58                   LBRA OUTCH   ; PRINT "?"
0417                         *
0417                         *
0418                         *** "X" CLEAR OUTSTANDING BREAKPOINTS ***
0418                         *** "X" CLEAR OUTSTANDING BREAKPOINTS ***
0419                         *
0419                         *
0420 F96F 10 8E DF D3        XBKPNT  LDY  #BPTBL  ; POINT TO BREAKPOINT TABLE
0420 F988 10 8E DF E3        XBKPNT  LDY  #BPTBL  ; POINT TO BREAKPOINT TABLE
0421 F973 C6 08                      LDB  #8      ; LOAD BREAKPOINT COUNTER
0421 F98C C6 08                      LDB  #8      ; LOAD BREAKPOINT COUNTER
0422 F975 8D 18              XBPLP   BSR  RPLSWI  ; REMOVE USED ENTRY IN BP TABLE
0422 F98E 8D 18              XBPLP   BSR  RPLSWI  ; REMOVE USED ENTRY IN BP TABLE
0423 F977 5A                         DECB  $FAAC  ; DECREMENT BP COUNTER
0423 F990 5A                         DECB  $FAAC  ; DECREMENT BP COUNTER
0424 F978 26 FB                      BNE  XBPLP   ; END OF BREAKPOINT TABLE?
0424 F991 26 FB                      BNE  XBPLP   ; END OF BREAKPOINT TABLE?
0425 F97A 39                         RTS
0425 F993 39                         RTS
0426                         *
0426                         *
0427                         ***** SWI ENTRY POINT *****
0427                         ***** SWI ENTRY POINT *****
0428                         *
0428                         *
0429 F97B 1F 43              SWIE    TFR  S,U     ; TRANSFER STACK TO USER POINTER
0429 F994 1F 43              SWIE    TFR  S,U     ; TRANSFER STACK TO USER POINTER
0430 F97D AE 4A                      LDX  10,U    ; LOAD PC FROM STACK INTO X-REG
0430 F996 AE 4A                      LDX  10,U    ; LOAD PC FROM STACK INTO X-REG
0431 F97F 30 1F                      LEAX -1,X    ; ADJUST ADDR DOWN 1 BYTE.
0431 F998 30 1F                      LEAX -1,X    ; ADJUST ADDR DOWN 1 BYTE.
0432 F981 8D 26                      BSR  BPTEST  ; FIND BREAKPOINT IN BP TABLE
0432 F99A 8D 26                      BSR  BPTEST  ; FIND BREAKPOINT IN BP TABLE
0433 F983 27 04                      BEQ  REGPR   ; IF FOUND, REPLACE DATA AT BP ADDR
0433 F99C 27 04                      BEQ  REGPR   ; IF FOUND, REPLACE DATA AT BP ADDR
0434 F985 AF 4A                      STX  10,U    ; SAVE BREAKPOINT ADDR IN STACK
0434 F99E AF 4A                      STX  10,U    ; SAVE BREAKPOINT ADDR IN STACK
0435 F987 8D 06                      BSR  RPLSWI  ; GO REPLACE SWI WITH ORIGINAL DATA
0435 F9A0 8D 06                      BSR  RPLSWI  ; GO REPLACE SWI WITH ORIGINAL DATA
0436 F989 17 01 C8           REGPR   LBSR REGSTR  ; GO PRINT REGISTERS
0436 F9A2 17 02 48           REGPR   LBSR REGSTR  ; GO PRINT REGISTERS
0437                         *
0437                         *
0438                                 IFD TRAOPT
0438                                 IFD TRAOPT
0439                                 LDX #0
0439                                 LDX #0
0440                                 STX TRACNT
0440                                 STX TRACNT
0441                                 ENDIF TRAOPT
0441                                 ENDIF TRAOPT
0441                                 ENDIF TRAOPT
0441                                 ENDIF TRAOPT
0442                         *
0442                         *
0443 F98C 16 FE B9                   LBRA NEXTCMD ; GET NEXT COMMAND
0443 F9A5 16 FE B9                   LBRA NEXTCMD ; GET NEXT COMMAND
0444                         *
0444                         *
0445 F98F AE 21              RPLSWI  LDX  1,Y     ; LOAD BP ADDRESS FROM BP TABLE
0445 F9A8 AE 21              RPLSWI  LDX  1,Y     ; LOAD BP ADDRESS FROM BP TABLE
0446 F991 8C DF C0                   CMPX #STACK  ; COMPARE TO TOP AVAILABLE USER MEMORY
0446 F9AA 8C DF C0                   CMPX #STACK  ; COMPARE TO TOP AVAILABLE USER MEMORY
0447 F994 24 0A                      BCC  FFSTBL  ; GO RESET TABLE ENTRY TO $FF'S
0447 F9AD 24 0A                      BCC  FFSTBL  ; GO RESET TABLE ENTRY TO $FF'S
0448 F996 A6 84                      LDA  ,X      ; GET DATA FROM BP ADDRESS
0448 F9AF A6 84                      LDA  ,X      ; GET DATA FROM BP ADDRESS
0449 F998 81 3F                      CMPA #$3F    ; IS IT SWI?
0449 F9B1 81 3F                      CMPA #$3F    ; IS IT SWI?
0450 F99A 26 04                      BNE  FFSTBL  ; IF NOT, RESET TABLE ENTRY TO $FF'S
0450 F9B3 26 04                      BNE  FFSTBL  ; IF NOT, RESET TABLE ENTRY TO $FF'S
0451 F99C A6 A4                      LDA  ,Y      ; GET ORIGINAL DATA FROM BP TABLE
0451 F9B5 A6 A4                      LDA  ,Y      ; GET ORIGINAL DATA FROM BP TABLE
0452 F99E A7 84                      STA  ,X      ; $FAD3 RESTORE DATA AT BP ADDRESS
0452 F9B7 A7 84                      STA  ,X      ; $FAD3 RESTORE DATA AT BP ADDRESS
0453 F9A0 86 FF              FFSTBL  LDA  #$FF    ; LOAD $FF IN A-ACC
0453 F9B9 86 FF              FFSTBL  LDA  #$FF    ; LOAD $FF IN A-ACC
0454 F9A2 A7 A0                      STA  ,Y+     ; RESET BREAKPOINT TABLE DATA TO $FF'S
0454 F9BB A7 A0                      STA  ,Y+     ; RESET BREAKPOINT TABLE DATA TO $FF'S
0455 F9A4 A7 A0                      STA  ,Y+     ; RESET BREAKPOINT TABLE ADDR TO $FF'S
0455 F9BD A7 A0                      STA  ,Y+     ; RESET BREAKPOINT TABLE ADDR TO $FF'S
0456 F9A6 A7 A0                      STA  ,Y+
0456 F9BF A7 A0                      STA  ,Y+
0457 F9A8 39                         RTS
0457 F9C1 39                         RTS
0458                         *
0458                         *
0459                         ** SEARCH BREAKPOINT TABLE FOR MATCH **
0459                         ** SEARCH BREAKPOINT TABLE FOR MATCH **
0460                         *
0460                         *
0461 F9A9 10 8E DF D3        BPTEST  LDY  #BPTBL  ; POINT TO BREAKPOINT TABLE
0461 F9C2 10 8E DF E3        BPTEST  LDY  #BPTBL  ; POINT TO BREAKPOINT TABLE
0462 F9AD C6 08                      LDB  #8      ; LOAD BREAKPOINT COUNTER
0462 F9C6 C6 08                      LDB  #8      ; LOAD BREAKPOINT COUNTER
0463 F9AF A6 A0              FNDBP   LDA  ,Y+     ; LOAD DATA BYTE
0463 F9C8 A6 A0              FNDBP   LDA  ,Y+     ; LOAD DATA BYTE
0464 F9B1 AC A1                      CMPX ,Y++    ; COMPARE ADDRESS, IS IT SAME?
0464 F9CA AC A1                      CMPX ,Y++    ; COMPARE ADDRESS, IS IT SAME?
0465 F9B3 27 04                      BEQ  BPADJ   ; IF SO, ADJUST POINTER FOR TABLE ENTRY
0465 F9CC 27 04                      BEQ  BPADJ   ; IF SO, ADJUST POINTER FOR TABLE ENTRY
0466 F9B5 5A                         DECB         ; IF NOT, DECREMENT BREAKPOINT COUNTER
0466 F9CE 5A                         DECB         ; IF NOT, DECREMENT BREAKPOINT COUNTER
0467 F9B6 26 F7                      BNE  FNDBP   ; AND LOOK FOR NEXT POSSIBLE MATCH
0467 F9CF 26 F7                      BNE  FNDBP   ; AND LOOK FOR NEXT POSSIBLE MATCH
0468 F9B8 39                         RTS          ;
0468 F9D1 39                         RTS          ;
0469                         *
0469                         *
0470                         *
0470                         *
0471 F9B9 31 3D              BPADJ   LEAY -3,Y    ; MOVE POINTER TO BEGIN OF BP ENTRY
0471 F9D2 31 3D              BPADJ   LEAY -3,Y    ; MOVE POINTER TO BEGIN OF BP ENTRY
0472 F9BB 39                         RTS
0472 F9D4 39                         RTS
0473                         *
0473                         *
0474                                 IFD TRAOPT
0474                                 IFD TRAOPT
0475                         *
0475                         *
0476                         ** TRACE from address AAAA BB bytes
0476                         ** TRACE from address AAAA BB bytes
0477                         *
0477                         *
Line 2281... Line 2289...
0751                         *
0751                         *
0752                                 IFD IDEOPT
0752                                 IFD IDEOPT
0753                         *
0753                         *
0754                         * XESS 16 BIT IDE BOOT
0754                         * XESS 16 BIT IDE BOOT
0755                         *
0755                         *
0756                         IDEBOOT LDD  #AUXRESET
0756 F9D5 CC 00 06           IDEBOOT LDD  #AUXRESET
0757                                 STD  CF_AUX
0757 F9D8 FD E1 1E                   STD  CF_AUX
0758                                 LDD #AUXRSTREL
0758 F9DB CC 00 02                   LDD #AUXRSTREL
0759                                 STD CF_AUX
0759 F9DE FD E1 1E                   STD CF_AUX
0760                                 LDD  #HEADLBA
0760 F9E1 CC 00 E0                   LDD  #HEADLBA
0761                                 STD  CF_HEAD
0761 F9E4 FD E1 0C                   STD  CF_HEAD
0762                                 BSR  WAITRDY
0762 F9E7 8D 2E                      BSR  WAITRDY
0763                         *
0763                         *
0764                         * READ SECTORS FROM CF
0764                         * READ SECTORS FROM CF
0765                         *
0765                         *
0766                                 LDD  #$01
0766 F9E9 CC 00 01                   LDD  #$01
0767                                 STD  CF_SECCNT
0767 F9EC FD E1 04                   STD  CF_SECCNT
0768                                 CLRB
0768 F9EF 5F                         CLRB
0769                                 STD  CF_SECNUM
0769 F9F0 FD E1 06                   STD  CF_SECNUM
0770                                 STD  CF_CYLLO
0770 F9F3 FD E1 08                   STD  CF_CYLLO
0771                                 STD  CF_CYLHI
0771 F9F6 FD E1 0A                   STD  CF_CYLHI
0772                         *
0772                         *
0773                                 LDB  #CMDREAD ; IDE READ MULTIPLE
0773 F9F9 C6 20                      LDB  #CMDREAD ; IDE READ MULTIPLE
0774                                 STD  CF_COMAND
0774 F9FB FD E1 0E                   STD  CF_COMAND
0775                                 BSR  WAITRDY
0775 F9FE 8D 17                      BSR  WAITRDY
0776                                 LDX  #$C000
0776 FA00 8E C0 00                   LDX  #$C000
0777                         *
0777                         *
0778                         * READ LOOP
0778                         * READ LOOP
0779                         *
0779                         *
0780                         RDLOOP  BSR  WAITDRQ
0780 FA03 8D 21              RDLOOP  BSR  WAITDRQ
0781                                 LDD  CF_DATA
0781 FA05 FC E1 00                   LDD  CF_DATA
0782                                 STB  ,X+
0782 FA08 E7 80                      STB  ,X+
0783                                 CMPX #$C100
0783 FA0A 8C C1 00                   CMPX #$C100
0784                                 BNE  RDLOOP
0784 FA0D 26 F4                      BNE  RDLOOP
0785                         *
0785                         *
0786                                 LDX  #$C000
0786 FA0F 8E C0 00                   LDX  #$C000
0787                                 STX  $0A,U
0787 FA12 AF 4A                      STX  $0A,U
0788                                 TFR  U,S
0788 FA14 1F 34                      TFR  U,S
0789                                 RTI
0789 FA16 3B                         RTI
0790                         *
0790                         *
0791                         * WAIT UNTIL READY
0791                         * WAIT UNTIL READY
0792                         *
0792                         *
0793                         WAITRDY LDD  CF_STATUS
0793 FA17 FC E1 0E           WAITRDY LDD  CF_STATUS
0794                                 BITB #BUSY
0794 FA1A C5 80                      BITB #BUSY
0795                                 BNE  WAITRDY
0795 FA1C 26 F9                      BNE  WAITRDY
0796                                 LDD  CF_STATUS
0796 FA1E FC E1 0E                   LDD  CF_STATUS
0797                                 BITB #DRDY
0797 FA21 C5 40                      BITB #DRDY
0798                                 BEQ  WAITRDY
0798 FA23 27 F2                      BEQ  WAITRDY
0799                                 RTS
0799 FA25 39                         RTS
0800                         *
0800                         *
0801                         * WAIT FOR DATA REQUEST
0801                         * WAIT FOR DATA REQUEST
0802                         *
0802                         *
0803                         WAITDRQ LDD  CF_STATUS
0803 FA26 FC E1 0E           WAITDRQ LDD  CF_STATUS
0804                                 BITB #DRQ
0804 FA29 C5 08                      BITB #DRQ
0805                                 BEQ  WAITDRQ
0805 FA2B 27 F9                      BEQ  WAITDRQ
0806                                 RTS
0806 FA2D 39                         RTS
0807                                 ENDIF IDEOPT
 
0807                                 ENDIF IDEOPT
0807                                 ENDIF IDEOPT
0808                         *
0808                         *
0809                                 IFD RTCOPT
0809                                 IFD RTCOPT
0810                         *
0810                         *
0811                         * CLOCK INTER FACE UTILITY
0811                         * CLOCK INTER FACE UTILITY
Line 2413... Line 2420...
0881                         * THIS ROUTINE IS REQUIRED SINCE THE
0881                         * THIS ROUTINE IS REQUIRED SINCE THE
0882                         * DMAF1 AND DMAF2 DISK CONTROLLERS MUST
0882                         * DMAF1 AND DMAF2 DISK CONTROLLERS MUST
0883                         * PRESENT PHYSICAL ADDRESSES ON THE
0883                         * PRESENT PHYSICAL ADDRESSES ON THE
0884                         * SYSTEM BUS.
0884                         * SYSTEM BUS.
0885                         *
0885                         *
0886                         LRA     PSHS A,B,X,Y  ; PUSH REGISTERS ON STACK
0886 FA2E 34 36              LRA     PSHS A,B,X,Y  ; PUSH REGISTERS ON STACK
0887                                 LDA  2,S      ; GET MSB LOGICAL ADDR FRM X REG ON STACK
0887 FA30 A6 62                      LDA  2,S      ; GET MSB LOGICAL ADDR FRM X REG ON STACK
0888                                 LSRA          ;
0888 FA32 44                         LSRA          ;
0889                                 LSRA          ; ADJ FOR INDEXED INTO
0889 FA33 44                         LSRA          ; ADJ FOR INDEXED INTO
0890                                 LSRA          ; CORRESPONDING LOCATION
0890 FA34 44                         LSRA          ; CORRESPONDING LOCATION
0891                                 LSRA          ; IN LRA TABLE
0891 FA35 44                         LSRA          ; IN LRA TABLE
0892                                 LDY  #LRARAM  ; LOAD LRA TABLE BASE ADDRESS
0892 FA36 10 8E DF D0                LDY  #LRARAM  ; LOAD LRA TABLE BASE ADDRESS
0893                                 LDB  A,Y      ; GET PHYSICAL ADDR. DATA FROM LRA TABLE
0893 FA3A E6 A6                      LDB  A,Y      ; GET PHYSICAL ADDR. DATA FROM LRA TABLE
0894                                 LSRB          ; ADJ. REAL ADDR. TO REFLECT EXTENDED
0894 FA3C 54                         LSRB          ; ADJ. REAL ADDR. TO REFLECT EXTENDED
0895                                 LSRB          ; PHYSICAL ADDRESS.
0895 FA3D 54                         LSRB          ; PHYSICAL ADDRESS.
0896                                 LSRB          ; EXTENDED MS 4-BITS ARE RETURNED
0896 FA3E 54                         LSRB          ; EXTENDED MS 4-BITS ARE RETURNED
0897                                 LSRB          ; IN THE "A" ACCUMULATOR
0897 FA3F 54                         LSRB          ; IN THE "A" ACCUMULATOR
0898                                 STB  ,S       ; MS 4 BITS IN A ACCUM. STORED ON STACK
0898 FA40 E7 E4                      STB  ,S       ; MS 4 BITS IN A ACCUM. STORED ON STACK
0899                                 LDB  A,Y      ; LOAD REAL ADDRESS DATA FROM LRA TABLE
0899 FA42 E6 A6                      LDB  A,Y      ; LOAD REAL ADDRESS DATA FROM LRA TABLE
0900                                 COMB          ; COMP TO ADJ FOR PHYSICAL ADDR. IN X REG
0900 FA44 53                         COMB          ; COMP TO ADJ FOR PHYSICAL ADDR. IN X REG
0901                                 ASLB          ; ADJ DATA FOR RELOCATION IN X REG
0901 FA45 58                         ASLB          ; ADJ DATA FOR RELOCATION IN X REG
0902                                 ASLB          ;
0902 FA46 58                         ASLB          ;
0903                                 ASLB          ; $FB97
0903 FA47 58                         ASLB          ; $FB97
0904                                 ASLB          ;
0904 FA48 58                         ASLB          ;
0905                                 LDA  2,S      ; GET MS BYTE OF LOGICAL ADDR.
0905 FA49 A6 62                      LDA  2,S      ; GET MS BYTE OF LOGICAL ADDR.
0906                                 ANDA #$0F     ; MASK MS NIBBLE OF LOGICAL ADDRESS
0906 FA4B 84 0F                      ANDA #$0F     ; MASK MS NIBBLE OF LOGICAL ADDRESS
0907                                 STA  2,S      ; SAVE IT IN X REG ON STACK
0907 FA4D A7 62                      STA  2,S      ; SAVE IT IN X REG ON STACK
0908                                 ORB  2,S      ; SET MS BYTE IN X REG TO ADJ PHY ADDR.
0908 FA4F EA 62                      ORB  2,S      ; SET MS BYTE IN X REG TO ADJ PHY ADDR.
0909                         *
0909                         *
0910                         * PLUS LS NIBBLE OF LOGICAL ADDRESS
0910                         * PLUS LS NIBBLE OF LOGICAL ADDRESS
0911                         *
0911                         *
0912                                 STB  2,S      ; SAVE AS LS 16 BITS OF PHY ADDR IN X REG ON STACK
0912 FA51 E7 62                      STB  2,S      ; SAVE AS LS 16 BITS OF PHY ADDR IN X REG ON STACK
0913                                 PULS A,B,X,Y,PC ; POP REGS. FROM STACK
0913 FA53 35 B6                      PULS A,B,X,Y,PC ; POP REGS. FROM STACK
0914                                 ENDIF DATOPT
 
0914                                 ENDIF DATOPT
0914                                 ENDIF DATOPT
0915                         *
0915                         *
0916                         * DELAY LOOP
0916                         * DELAY LOOP
0917                         *
0917                         *
0918 F9BC 34 04              DLY     PSHS B        ; SAVE CONTENTS OF "B"
0918 FA55 34 04              DLY     PSHS B        ; SAVE CONTENTS OF "B"
0919 F9BE C6 20                      LDB  #$20     ; GET LOOP DELAY VALUE
0919 FA57 C6 20                      LDB  #$20     ; GET LOOP DELAY VALUE
0920 F9C0 5A                 SUB1    DECB          ; SUBTRACT ONE FROM VALUE
0920 FA59 5A                 SUB1    DECB          ; SUBTRACT ONE FROM VALUE
0921 F9C1 26 FD                      BNE  SUB1     ; LOOP UNTIL ZERO
0921 FA5A 26 FD                      BNE  SUB1     ; LOOP UNTIL ZERO
0922 F9C3 35 84                      PULS B,PC     ; RESTORE CONTENTS OF "B"
0922 FA5C 35 84                      PULS B,PC     ; RESTORE CONTENTS OF "B"
0923                         * RTS  ;
0923                         * RTS  ;
0924                         *
0924                         *
0925                         ***** "L" LOAD MIKBUG TAPE *****
0925                         ***** "L" LOAD MIKBUG TAPE *****
0926                         *
0926                         *
0927 F9C5 BD FC 36           LOAD    JSR  ACINIZ
0927 FA5E BD FC F9           LOAD    JSR  ACINIZ
0928 F9C8 86 11                      LDA  #$11     ; LOAD 'DC1' CASS. READ ON CODE
0928 FA61 86 11                      LDA  #$11     ; LOAD 'DC1' CASS. READ ON CODE
0929 F9CA 17 02 54                   LBSR OUTCH    ; OUTPUT IT TO TERMINAL PORT
0929 FA63 17 02 7A                   LBSR OUTCH    ; OUTPUT IT TO TERMINAL PORT
0930 F9CD 7F DF D2                   CLR  ECHO     ; TURN OFF ECHO FLAG
0930 FA66 7F DF E2                   CLR  ECHO     ; TURN OFF ECHO FLAG
0931 F9D0 17 02 26           LOAD1   LBSR ECHON    ; INPUT 8 BIT BYTE WITH NO ECHO
0931 FA69 17 02 2A           LOAD1   LBSR ECHON    ; INPUT 8 BIT BYTE WITH NO ECHO
0932 F9D3 81 53              LOAD2   CMPA #'S      ; IS IT AN "S", START CHARACTER ?
0932 FA6C 81 53              LOAD2   CMPA #'S      ; IS IT AN "S", START CHARACTER ?
0933 F9D5 26 F9                      BNE  LOAD1    ; IF NOT, DISCARD AND GET NEXT CHAR.
0933 FA6E 26 F9                      BNE  LOAD1    ; IF NOT, DISCARD AND GET NEXT CHAR.
0934 F9D7 17 02 1F                   LBSR ECHON
0934 FA70 17 02 23                   LBSR ECHON
0935 F9DA 81 39                      CMPA #'9      ; IS IT A "9" , END OF FILE CHAR ?
0935 FA73 81 39                      CMPA #'9      ; IS IT A "9" , END OF FILE CHAR ?
0936 F9DC 27 3D                      BEQ  LOAD21   ; IF SO, EXIT LOAD
0936 FA75 27 3D                      BEQ  LOAD21   ; IF SO, EXIT LOAD
0937 F9DE 81 31                      CMPA #'1      ; IS IT A "1" , FILE LOAD CHAR ?
0937 FA77 81 31                      CMPA #'1      ; IS IT A "1" , FILE LOAD CHAR ?
0938 F9E0 26 F1                      BNE  LOAD2    ; IF NOT, LOOK FOR START CHAR.
0938 FA79 26 F1                      BNE  LOAD2    ; IF NOT, LOOK FOR START CHAR.
0939 F9E2 17 01 A8                   LBSR BYTE     ; INPUT BYTE COUNT
0939 FA7B 17 01 A8                   LBSR BYTE     ; INPUT BYTE COUNT
0940 F9E5 34 02                      PSHS A        ; PUSH COUNT ON STACK
0940 FA7E 34 02                      PSHS A        ; PUSH COUNT ON STACK
0941 F9E7 29 26                      BVS  LODERR   ; (V) C-CODE SET, ILLEGAL HEX
0941 FA80 29 26                      BVS  LODERR   ; (V) C-CODE SET, ILLEGAL HEX
0942 F9E9 17 01 91                   LBSR IN1ADR   ; INPUT LOAD ADDRESS
0942 FA82 17 01 91                   LBSR IN1ADR   ; INPUT LOAD ADDRESS
0943 F9EC 29 21                      BVS  LODERR   ; (V) C-CODE SET, ADDR NOT HEX
0943 FA85 29 21                      BVS  LODERR   ; (V) C-CODE SET, ADDR NOT HEX
0944 F9EE 34 10                      PSHS X        ; PUSH ADDR ON STACK
0944 FA87 34 10                      PSHS X        ; PUSH ADDR ON STACK
0945 F9F0 E6 E0                      LDB  ,S+      ; LOAD MSB OF ADDR AS CHECKSUM BYTE
0945 FA89 E6 E0                      LDB  ,S+      ; LOAD MSB OF ADDR AS CHECKSUM BYTE
0946 F9F2 EB E0                      ADDB ,S+      ; ADD LSB OF ADDR TO CHECKSUM
0946 FA8B EB E0                      ADDB ,S+      ; ADD LSB OF ADDR TO CHECKSUM
0947 F9F4 EB E4                      ADDB ,S       ; ADD BYTE COUNT BYTE TO CHECKSUM
0947 FA8D EB E4                      ADDB ,S       ; ADD BYTE COUNT BYTE TO CHECKSUM
0948 F9F6 6A E4                      DEC  ,S       ; $FC37 DECREMENT BYTE COUNT 2 TO BYPASS
0948 FA8F 6A E4                      DEC  ,S       ; $FC37 DECREMENT BYTE COUNT 2 TO BYPASS
0949 F9F8 6A E4                      DEC  ,S       ; ADDRESS BYTES.
0949 FA91 6A E4                      DEC  ,S       ; ADDRESS BYTES.
0950 F9FA 34 04              LOAD10  PSHS B        ; PUSH CHECKSUM ON STACK
0950 FA93 34 04              LOAD10  PSHS B        ; PUSH CHECKSUM ON STACK
0951 F9FC 17 01 8E                   LBSR BYTE     ; INPUT DATA BYTE (2 HEX CHAR)
0951 FA95 17 01 8E                   LBSR BYTE     ; INPUT DATA BYTE (2 HEX CHAR)
0952 F9FF 35 04                      PULS B        ; POP CHECKSUM FROM STACK
0952 FA98 35 04                      PULS B        ; POP CHECKSUM FROM STACK
0953 FA01 29 0C                      BVS  LODERR   ; (V) SET, DATA BYTE NOT HEX
0953 FA9A 29 0C                      BVS  LODERR   ; (V) SET, DATA BYTE NOT HEX
0954 FA03 34 02                      PSHS A        ; PUSH DATA BYTE ON STACK
0954 FA9C 34 02                      PSHS A        ; PUSH DATA BYTE ON STACK
0955 FA05 EB E0                      ADDB ,S+      ; ADD DATA TO CHECKSUM, AUTO INC STACK
0955 FA9E EB E0                      ADDB ,S+      ; ADD DATA TO CHECKSUM, AUTO INC STACK
0956 FA07 6A E4                      DEC  ,S       ; DECREMENT BYTE COUNT 1
0956 FAA0 6A E4                      DEC  ,S       ; DECREMENT BYTE COUNT 1
0957 FA09 27 05                      BEQ  LOAD16   ; IF BYTE COUNT ZERO, TEST CHECKSUM
0957 FAA2 27 05                      BEQ  LOAD16   ; IF BYTE COUNT ZERO, TEST CHECKSUM
0958 FA0B A7 80                      STA  ,X+      ; SAVE DATA BYTE IN MEMORY
0958 FAA4 A7 80                      STA  ,X+      ; SAVE DATA BYTE IN MEMORY
0959 FA0D 20 EB                      BRA  LOAD10   ; GET NEXT DATA BYTE
0959 FAA6 20 EB                      BRA  LOAD10   ; GET NEXT DATA BYTE
0960 FA0F 5F                 LODERR  CLRB          ; ERROR CONDITION, ZERO CHECKSUM  ;
0960 FAA8 5F                 LODERR  CLRB          ; ERROR CONDITION, ZERO CHECKSUM  ;
0961 FA10 35 02              LOAD16  PULS A        ; ADJUST STACK (REMOVE BYTE COUNT)
0961 FAA9 35 02              LOAD16  PULS A        ; ADJUST STACK (REMOVE BYTE COUNT)
0962 FA12 C1 FF                      CMPB #$FF     ; CHECKSUM OK?
0962 FAAB C1 FF                      CMPB #$FF     ; CHECKSUM OK?
0963 FA14 27 BA                      BEQ  LOAD1    ; IF SO, LOAD NEXT LINE
0963 FAAD 27 BA                      BEQ  LOAD1    ; IF SO, LOAD NEXT LINE
0964 FA16 86 3F                      LDA  #'?      ; LOAD (?) ERROR INDICATOR
0964 FAAF 86 3F                      LDA  #'?      ; LOAD (?) ERROR INDICATOR
0965 FA18 17 02 06                   LBSR OUTCH    ; OUTPUT IT TO TERMINAL
0965 FAB1 17 02 2C                   LBSR OUTCH    ; OUTPUT IT TO TERMINAL
0966 FA1B 73 DF D2           LOAD21  COM  ECHO     ; TURN ECHO ON
0966 FAB4 73 DF E2           LOAD21  COM  ECHO     ; TURN ECHO ON
0967 FA1E 86 13                      LDA  #$13     ; $FC5F LOAD 'DC3' CASS. READ OFF CODE
0967 FAB7 86 13                      LDA  #$13     ; $FC5F LOAD 'DC3' CASS. READ OFF CODE
0968 FA20 16 01 FE                   LBRA OUTCH    ; OUTPUT IT
0968 FAB9 16 02 24                   LBRA OUTCH    ; OUTPUT IT
0969                         *
0969                         *
0970                         ***** "P" PUNCH MIKBUG TAPE *****
0970                         ***** "P" PUNCH MIKBUG TAPE *****
0971                         *
0971                         *
0972 FA23 6F E2              PUNCH   CLR  ,-S      ; CLEAR RESERVED BYTE ON STACK
0972 FABC 6F E2              PUNCH   CLR  ,-S      ; CLEAR RESERVED BYTE ON STACK
0973 FA25 17 01 4A                   LBSR IN2ADR   ; GET BEGIN AND END ADDRESS
0973 FABE 17 01 4A                   LBSR IN2ADR   ; GET BEGIN AND END ADDRESS
0974 FA28 34 30                      PSHS X,Y      ; SAVE ADDRESSES ON STACK
0974 FAC1 34 30                      PSHS X,Y      ; SAVE ADDRESSES ON STACK
0975 FA2A 29 4D                      BVS  PUNEXT   ; (V) C-CODE SET, EXIT PUNCH
0975 FAC3 29 4D                      BVS  PUNEXT   ; (V) C-CODE SET, EXIT PUNCH
0976 FA2C AC 62                      CMPX 2,S      ; COMPARE BEGIN TO END ADDR
0976 FAC5 AC 62                      CMPX 2,S      ; COMPARE BEGIN TO END ADDR
0977 FA2E 25 49                      BCS  PUNEXT   ; IF BEGIN GREATER THAN END, EXIT PUNCH
0977 FAC7 25 49                      BCS  PUNEXT   ; IF BEGIN GREATER THAN END, EXIT PUNCH
0978 FA30 30 01                      LEAX 1,X      ; INCREMENT END ADDRESS
0978 FAC9 30 01                      LEAX 1,X      ; INCREMENT END ADDRESS
0979 FA32 AF E4                      STX  ,S       ; STORE END ADDR ON STACK
0979 FACB AF E4                      STX  ,S       ; STORE END ADDR ON STACK
0980 FA34 BD FC 36                   JSR  ACINIZ
0980 FACD BD FC F9                   JSR  ACINIZ
0981 FA37 86 12                      LDA  #$12     ; LOAD 'DC2' PUNCH ON CODE
0981 FAD0 86 12                      LDA  #$12     ; LOAD 'DC2' PUNCH ON CODE
0982 FA39 17 01 E5                   LBSR OUTCH    ; OUTPUT IT TO TERMINAL
0982 FAD2 17 02 0B                   LBSR OUTCH    ; OUTPUT IT TO TERMINAL
0983 FA3C EC E4              PUNCH2  LDD  ,S       ; LOAD END ADDR IN D-ACC
0983 FAD5 EC E4              PUNCH2  LDD  ,S       ; LOAD END ADDR IN D-ACC
0984 FA3E A3 62                      SUBD 2,S      ; SUBTRACT BEGIN FROM END
0984 FAD7 A3 62                      SUBD 2,S      ; SUBTRACT BEGIN FROM END
0985 FA40 27 06                      BEQ  PUNCH3   ; SAME, PUNCH 32 BYTES DEFAULT
0985 FAD9 27 06                      BEQ  PUNCH3   ; SAME, PUNCH 32 BYTES DEFAULT
0986 FA42 10 83 00 20                CMPD #$20     ; LESS THAN 32 BYTES?
0986 FADB 10 83 00 20                CMPD #$20     ; LESS THAN 32 BYTES?
0987 FA46 23 02                      BLS  PUNCH4   ; PUNCH THAT MANY BYTES
0987 FADF 23 02                      BLS  PUNCH4   ; PUNCH THAT MANY BYTES
0988 FA48 C6 20              PUNCH3  LDB  #$20     ; LOAD BYTE COUNT OF 32.
0988 FAE1 C6 20              PUNCH3  LDB  #$20     ; LOAD BYTE COUNT OF 32.
0989 FA4A E7 64              PUNCH4  STB  4,S      ; STORE ON STACK AS BYTE COUNT
0989 FAE3 E7 64              PUNCH4  STB  4,S      ; STORE ON STACK AS BYTE COUNT
0990 FA4C 8E FC F6                   LDX  #MSG20   ; POINT TO MSG "S1"
0990 FAE5 8E FE F3                   LDX  #MSG20   ; POINT TO MSG "S1"
0991 FA4F 17 00 2F                   LBSR PSTRNG   ; PRINT MSG
0991 FAE8 17 00 2F                   LBSR PSTRNG   ; PRINT MSG
0992 FA52 CB 03                      ADDB #3       ; ADD 3 BYTES TO BYTE COUNT
0992 FAEB CB 03                      ADDB #3       ; ADD 3 BYTES TO BYTE COUNT
0993 FA54 1F 98                      TFR  B,A      ; GET BYTE COUNT IN A-ACC TO PUNCH
0993 FAED 1F 98                      TFR  B,A      ; GET BYTE COUNT IN A-ACC TO PUNCH
0994 FA56 17 01 75                   LBSR OUT2H    ; OUTPUT BYTE COUNT
0994 FAEF 17 01 75                   LBSR OUT2H    ; OUTPUT BYTE COUNT
0995 FA59 AE 62                      LDX  2,S      ; LOAD BEGIN ADDRESS
0995 FAF2 AE 62                      LDX  2,S      ; LOAD BEGIN ADDRESS
0996 FA5B 17 01 68                   LBSR OUT4H    ; PUNCH ADDRESS
0996 FAF4 17 01 68                   LBSR OUT4H    ; PUNCH ADDRESS
0997 FA5E EB 62                      ADDB 2,S      ; ADD ADDR MSB TO CHECKSUM
0997 FAF7 EB 62                      ADDB 2,S      ; ADD ADDR MSB TO CHECKSUM
0998 FA60 EB 63                      ADDB 3,S      ; ADD ADDR LSB TO CHECKSUM
0998 FAF9 EB 63                      ADDB 3,S      ; ADD ADDR LSB TO CHECKSUM
0999 FA62 EB 84              PUNCHL  ADDB ,X       ; ADD DATA BYTE TO CHECKSUM
0999 FAFB EB 84              PUNCHL  ADDB ,X       ; ADD DATA BYTE TO CHECKSUM
1000 FA64 A6 80                      LDA  ,X+      ; LOAD DATA BYTE TO PUNCH
1000 FAFD A6 80                      LDA  ,X+      ; LOAD DATA BYTE TO PUNCH
1001 FA66 17 01 65                   LBSR OUT2H    ; OUTPUT DATA BYTE
1001 FAFF 17 01 65                   LBSR OUT2H    ; OUTPUT DATA BYTE
1002 FA69 6A 64                      DEC  4,S      ; DECREMENT BYTE COUNT
1002 FB02 6A 64                      DEC  4,S      ; DECREMENT BYTE COUNT
1003 FA6B 26 F5                      BNE  PUNCHL   ; NOT DONE, PUNCH NEXT BYTE
1003 FB04 26 F5                      BNE  PUNCHL   ; NOT DONE, PUNCH NEXT BYTE
1004 FA6D 53                         COMB  1's     ; COMPLIMENT CHECKSUM BYTE
1004 FB06 53                         COMB  1's     ; COMPLIMENT CHECKSUM BYTE
1005 FA6E 1F 98                      TFR  B,A      ; GET IT IN A-ACC TO PUNCH
1005 FB07 1F 98                      TFR  B,A      ; GET IT IN A-ACC TO PUNCH
1006 FA70 17 01 5B                   LBSR OUT2H    ; OUTPUT CHECKSUM BYTE
1006 FB09 17 01 5B                   LBSR OUT2H    ; OUTPUT CHECKSUM BYTE
1007 FA73 AF 62                      STX  2,S      ; SAVE X-REG IN STACK AS NEW PUNCH ADDR
1007 FB0C AF 62                      STX  2,S      ; SAVE X-REG IN STACK AS NEW PUNCH ADDR
1008 FA75 AC E4                      CMPX ,S       ; COMPARE IT TO END ADDR
1008 FB0E AC E4                      CMPX ,S       ; COMPARE IT TO END ADDR
1009 FA77 26 C3                      BNE  PUNCH2   ; $FCB5 PUNCH NOT DONE, CONT.
1009 FB10 26 C3                      BNE  PUNCH2   ; $FCB5 PUNCH NOT DONE, CONT.
1010 FA79 86 14              PUNEXT  LDA  #$14     ; LOAD 'DC4' PUNCH OFF CODE
1010 FB12 86 14              PUNEXT  LDA  #$14     ; LOAD 'DC4' PUNCH OFF CODE
1011 FA7B 17 01 A3                   LBSR OUTCH    ; OUTPUT IT
1011 FB14 17 01 C9                   LBSR OUTCH    ; OUTPUT IT
1012 FA7E 32 65                      LEAS 5,S      ; READJUST STACK POINTER
1012 FB17 32 65                      LEAS 5,S      ; READJUST STACK POINTER
1013 FA80 39                         RTS  ;
1013 FB19 39                         RTS  ;
1014                         *
1014                         *
1015                         * PRINT STRING PRECEEDED BY A CR & LF.
1015                         * PRINT STRING PRECEEDED BY A CR & LF.
1016                         *
1016                         *
1017 FA81 8D 02              PSTRNG  BSR  PCRLF    ; PRINT CR/LF
1017 FB1A 8D 02              PSTRNG  BSR  PCRLF    ; PRINT CR/LF
1018 FA83 20 71                      BRA  PDATA    ; PRINT STRING POINTED TO BY IX
1018 FB1C 20 71                      BRA  PDATA    ; PRINT STRING POINTED TO BY IX
1019                         *
1019                         *
1020                         * PCRLF
1020                         * PCRLF
1021                         *
1021                         *
1022 FA85 34 10              PCRLF   PSHS X        ; SAVE IX
1022 FB1E 34 10              PCRLF   PSHS X        ; SAVE IX
1023 FA87 8E FC A7                   LDX  #MSG2+1  ; POINT TO MSG CR/LF + 3 NULS
1023 FB20 8E FE A4                   LDX  #MSG2+1  ; POINT TO MSG CR/LF + 3 NULS
1024 FA8A 17 00 69                   LBSR PDATA    ; PRINT MSG
1024 FB23 17 00 69                   LBSR PDATA    ; PRINT MSG
1025 FA8D 35 90                      PULS X,PC     ; RESTORE IX & RETURN
1025 FB26 35 90                      PULS X,PC     ; RESTORE IX & RETURN
1026                         *
1026                         *
1027                         * LONG BRANCHES TO COMMON ROUTINES
1027                         * LONG BRANCHES TO COMMON ROUTINES
1028                         *
1028                         *
1029 FA8F 16 01 8D           JOUT1S  LBRA OUT1S
1029 FB28 16 01 B3           JOUT1S  LBRA OUT1S
1030 FA92 16 00 F8           JBYTE   LBRA BYTE
1030 FB2B 16 00 F8           JBYTE   LBRA BYTE
1031 FA95 16 00 E5           JIN1ADR LBRA IN1ADR
1031 FB2E 16 00 E5           JIN1ADR LBRA IN1ADR
1032                         *
1032                         *
1033                         * ALTER "PC" PROGRAM COUNTER
1033                         * ALTER "PC" PROGRAM COUNTER
1034                         *
1034                         *
1035 FA98 17 00 91           ALTRPC  LBSR  PRTPC   ; $FCF5 PRINT MSG " PC = "
1035 FB31 17 00 91           ALTRPC  LBSR  PRTPC   ; $FCF5 PRINT MSG " PC = "
1036 FA9B 8D F2              ALTPC1  BSR  JOUT1S   ; OUTPUT SPACE
1036 FB34 8D F2              ALTPC1  BSR  JOUT1S   ; OUTPUT SPACE
1037 FA9D 8D F6                      BSR  JIN1ADR  ; GET NEW CONTENTS FOR "PC"
1037 FB36 8D F6                      BSR  JIN1ADR  ; GET NEW CONTENTS FOR "PC"
1038 FA9F 29 02                      BVS  ALTPCD   ; EXIT IF INVALID HEX
1038 FB38 29 02                      BVS  ALTPCD   ; EXIT IF INVALID HEX
1039 FAA1 AF 4A                      STX  10,U     ; POKE IN NEW CONTENTS
1039 FB3A AF 4A                      STX  10,U     ; POKE IN NEW CONTENTS
1040 FAA3 39                 ALTPCD  RTS           ;
1040 FB3C 39                 ALTPCD  RTS           ;
1041                         *
1041                         *
1042                         * ALTER "U" USER STACK POINTER
1042                         * ALTER "U" USER STACK POINTER
1043                         *
1043                         *
1044 FAA4 8D 61              ALTRU   BSR  PRTUS    ; $FCCA PRINT MSG " US = "
1044 FB3D 8D 61              ALTRU   BSR  PRTUS    ; $FCCA PRINT MSG " US = "
1045 FAA6 8D E7                      BSR  JOUT1S   ; OUTPUT SPACE
1045 FB3F 8D E7                      BSR  JOUT1S   ; OUTPUT SPACE
1046 FAA8 8D EB                      BSR  JIN1ADR  ; GET NEW CONTENTS FOR "US"
1046 FB41 8D EB                      BSR  JIN1ADR  ; GET NEW CONTENTS FOR "US"
1047 FAAA 29 02                      BVS  ALTUD    ; EXIT IF INVALID HEX
1047 FB43 29 02                      BVS  ALTUD    ; EXIT IF INVALID HEX
1048 FAAC AF 48                      STX  8,U      ; POKE IN NEW CONTENTS
1048 FB45 AF 48                      STX  8,U      ; POKE IN NEW CONTENTS
1049 FAAE 39                 ALTUD   RTS           ;
1049 FB47 39                 ALTUD   RTS           ;
1050                         *
1050                         *
1051                         * ALTER "Y" INDEX REGISTER
1051                         * ALTER "Y" INDEX REGISTER
1052                         *
1052                         *
1053 FAAF 8D 72              ALTRY   BSR  PRTIY    ; PRINT MSG " IY = "
1053 FB48 8D 72              ALTRY   BSR  PRTIY    ; PRINT MSG " IY = "
1054 FAB1 8D DC                      BSR  JOUT1S   ; OUTPUT SPACE
1054 FB4A 8D DC                      BSR  JOUT1S   ; OUTPUT SPACE
1055 FAB3 8D E0                      BSR  JIN1ADR  ; GET NEW CONTENTS FOR "IY"
1055 FB4C 8D E0                      BSR  JIN1ADR  ; GET NEW CONTENTS FOR "IY"
1056 FAB5 29 02                      BVS  ALTYD    ; EXIT IF INVALID HEX
1056 FB4E 29 02                      BVS  ALTYD    ; EXIT IF INVALID HEX
1057 FAB7 AF 46                      STX  6,U      ; $F8F0 POKE IN NEW CONTENTS
1057 FB50 AF 46                      STX  6,U      ; $F8F0 POKE IN NEW CONTENTS
1058 FAB9 39                 ALTYD   RTS           ;
1058 FB52 39                 ALTYD   RTS           ;
1059                         *
1059                         *
1060                         * ALTER "X" INDEX REGISTER
1060                         * ALTER "X" INDEX REGISTER
1061                         *
1061                         *
1062 FABA 8D 5E              ALTRX   BSR  PRTIX    ; $FCE0 PRINT MSG " IX = "
1062 FB53 8D 5E              ALTRX   BSR  PRTIX    ; $FCE0 PRINT MSG " IX = "
1063 FABC 8D D1                      BSR  JOUT1S   ; OUTPUT SPACE
1063 FB55 8D D1                      BSR  JOUT1S   ; OUTPUT SPACE
1064 FABE 8D D5                      BSR  JIN1ADR
1064 FB57 8D D5                      BSR  JIN1ADR
1065 FAC0 29 02                      BVS  ALTXD
1065 FB59 29 02                      BVS  ALTXD
1066 FAC2 AF 44                      STX  4,U
1066 FB5B AF 44                      STX  4,U
1067 FAC4 39                 ALTXD   RTS ;
1067 FB5D 39                 ALTXD   RTS ;
1068                         *
1068                         *
1069                         * ALTER "DP" DIRECT PAGE REGISTER
1069                         * ALTER "DP" DIRECT PAGE REGISTER
1070                         *
1070                         *
1071 FAC5 8D 49              ALTRDP  BSR  PRTDP    ; $FCD5 PRINT MSG " DP = "
1071 FB5E 8D 49              ALTRDP  BSR  PRTDP    ; $FCD5 PRINT MSG " DP = "
1072 FAC7 8D C6                      BSR  JOUT1S   ; OUTPUT SPACE
1072 FB60 8D C6                      BSR  JOUT1S   ; OUTPUT SPACE
1073 FAC9 8D C7                      BSR  JBYTE    ; INPUT BYTE (2 HEX CHAR)
1073 FB62 8D C7                      BSR  JBYTE    ; INPUT BYTE (2 HEX CHAR)
1074 FACB 29 02                      BVS  ALTDPD
1074 FB64 29 02                      BVS  ALTDPD
1075 FACD A7 43                      STA  3,U
1075 FB66 A7 43                      STA  3,U
1076 FACF 39                 ALTDPD  RTS ;
1076 FB68 39                 ALTDPD  RTS ;
1077                         *
1077                         *
1078                         * ALTER "B" ACCUMULATOR
1078                         * ALTER "B" ACCUMULATOR
1079                         *
1079                         *
1080 FAD0 8D 6C              ALTRB   BSR  PRTB     ; $FD09 PRINT MSG " B = "
1080 FB69 8D 6C              ALTRB   BSR  PRTB     ; $FD09 PRINT MSG " B = "
1081 FAD2 8D BB                      BSR  JOUT1S   ; OUTPUT SPACE
1081 FB6B 8D BB                      BSR  JOUT1S   ; OUTPUT SPACE
1082 FAD4 8D BC                      BSR  JBYTE    ; INPUT BYTE (2 HEX CHAR)
1082 FB6D 8D BC                      BSR  JBYTE    ; INPUT BYTE (2 HEX CHAR)
1083 FAD6 29 02                      BVS  ALTBD
1083 FB6F 29 02                      BVS  ALTBD
1084 FAD8 A7 42                      STA  2,U
1084 FB71 A7 42                      STA  2,U
1085 FADA 39                 ALTBD   RTS           ; $F91C
1085 FB73 39                 ALTBD   RTS           ; $F91C
1086                         *
1086                         *
1087                         * ALTER "A" ACCUMULATOR
1087                         * ALTER "A" ACCUMULATOR
1088                         *
1088                         *
1089 FADB 8D 58              ALTRA   BSR  PRTA     ; $FCFF RINT MSG " A = "
1089 FB74 8D 58              ALTRA   BSR  PRTA     ; $FCFF RINT MSG " A = "
1090 FADD 8D B0                      BSR  JOUT1S   ; OUTPUT SPACE
1090 FB76 8D B0                      BSR  JOUT1S   ; OUTPUT SPACE
1091 FADF 8D B1                      BSR  JBYTE    ; INPUT BYTE (2 HEX CHAR)
1091 FB78 8D B1                      BSR  JBYTE    ; INPUT BYTE (2 HEX CHAR)
1092 FAE1 29 02                      BVS  ALTAD
1092 FB7A 29 02                      BVS  ALTAD
1093 FAE3 A7 41                      STA  1,U
1093 FB7C A7 41                      STA  1,U
1094 FAE5 39                 ALTAD   RTS ;
1094 FB7E 39                 ALTAD   RTS ;
1095                         *
1095                         *
1096                         * ALTER "CC" REGISTER
1096                         * ALTER "CC" REGISTER
1097                         *
1097                         *
1098 FAE6 8D 5F              ALTRCC  BSR  PRTCC    ; $FD13 PRINT MSG " CC: "
1098 FB7F 8D 5F              ALTRCC  BSR  PRTCC    ; $FD13 PRINT MSG " CC: "
1099 FAE8 8D A5                      BSR  JOUT1S   ; OUTPUT SPACE
1099 FB81 8D A5                      BSR  JOUT1S   ; OUTPUT SPACE
1100 FAEA 8D A6                      BSR  JBYTE    ; INPUT BYTE (2 HEX CHAR)
1100 FB83 8D A6                      BSR  JBYTE    ; INPUT BYTE (2 HEX CHAR)
1101 FAEC 29 04                      BVS  ALTCCD
1101 FB85 29 04                      BVS  ALTCCD
1102 FAEE 8A 80                      ORA  #$80     ; SETS "E" FLAG IN PRINT LIST
1102 FB87 8A 80                      ORA  #$80     ; SETS "E" FLAG IN PRINT LIST
1103 FAF0 A7 C4                      STA  ,U
1103 FB89 A7 C4                      STA  ,U
1104 FAF2 39                 ALTCCD  RTS ;
1104 FB8B 39                 ALTCCD  RTS ;
1105                         *
1105                         *
1106                         * PDATA
1106                         * PDATA
1107                         *
1107                         *
1108 FAF3 17 01 2B           PRINT   LBSR OUTCH
1108 FB8C 17 01 51           PRINT   LBSR OUTCH
1109 FAF6 A6 80              PDATA   LDA  ,X+      ; GET 1st CHAR. TO PRINT
1109 FB8F A6 80              PDATA   LDA  ,X+      ; GET 1st CHAR. TO PRINT
1110 FAF8 81 04                      CMPA #4       ; IS IT EOT?
1110 FB91 81 04                      CMPA #4       ; IS IT EOT?
1111 FAFA 26 F7                      BNE  PRINT    ; IF NOT EOT PRINT IT
1111 FB93 26 F7                      BNE  PRINT    ; IF NOT EOT PRINT IT
1112 FAFC 39                         RTS  ;
1112 FB95 39                         RTS  ;
1113                         *
1113                         *
1114                         * PRINT REGISTERS
1114                         * PRINT REGISTERS
1115                         *
1115                         *
1116 FAFD 8E FC B9           PRTSP   LDX  #MSG10   ; POINT TO MSG "SP="
1116 FB96 8E FE B6           PRTSP   LDX  #MSG10   ; POINT TO MSG "SP="
1117 FB00 8D F4                      BSR  PDATA    ; PRINT MSG
1117 FB99 8D F4                      BSR  PDATA    ; PRINT MSG
1118 FB02 1F 31                      TFR  U,X
1118 FB9B 1F 31                      TFR  U,X
1119 FB04 16 00 BF           JOUT4H  LBRA OUT4H
1119 FB9D 16 00 BF           JOUT4H  LBRA OUT4H
1120                         *
1120                         *
1121 FB07 8E FC C5           PRTUS   LDX  #MSG12   ; POINT TO MSG "US="
1121 FBA0 8E FE C2           PRTUS   LDX  #MSG12   ; POINT TO MSG "US="
1122 FB0A 8D EA                      BSR  PDATA    ; PRINT MSG
1122 FBA3 8D EA                      BSR  PDATA    ; PRINT MSG
1123 FB0C AE 48                      LDX  8,U
1123 FBA5 AE 48                      LDX  8,U
1124 FB0E 20 F4                      BRA  JOUT4H
1124 FBA7 20 F4                      BRA  JOUT4H
1125                         *
1125                         *
1126 FB10 8E FC D7           PRTDP   LDX   #MSG15  ; POINT TO MSG "DP="
1126 FBA9 8E FE D4           PRTDP   LDX   #MSG15  ; POINT TO MSG "DP="
1127 FB13 8D E1                      BSR  PDATA    ; PRINT MSG
1127 FBAC 8D E1                      BSR  PDATA    ; PRINT MSG
1128 FB15 A6 43                      LDA  3,U
1128 FBAE A6 43                      LDA  3,U
1129 FB17 16 00 B4           JOUT2H  LBRA OUT2H    ; OUTPUT HEX BYTE AS ASCII
1129 FBB0 16 00 B4           JOUT2H  LBRA OUT2H    ; OUTPUT HEX BYTE AS ASCII
1130                         *
1130                         *
1131 FB1A 8E FC D1           PRTIX   LDX  #MSG14   ; POINT TO MSG "IX="
1131 FBB3 8E FE CE           PRTIX   LDX  #MSG14   ; POINT TO MSG "IX="
1132 FB1D 8D D7                      BSR  PDATA    ; PRINT MSG
1132 FBB6 8D D7                      BSR  PDATA    ; PRINT MSG
1133 FB1F AE 44                      LDX  4,U      ; $FCE6
1133 FBB8 AE 44                      LDX  4,U      ; $FCE6
1134 FB21 20 E1                      BRA  JOUT4H
1134 FBBA 20 E1                      BRA  JOUT4H
1135                         *
1135                         *
1136 FB23 8E FC CB           PRTIY   LDX  #MSG13   ; POINT TO MSG "IY="
1136 FBBC 8E FE C8           PRTIY   LDX  #MSG13   ; POINT TO MSG "IY="
1137 FB26 8D CE                      BSR  PDATA    ; PRINT MSG
1137 FBBF 8D CE                      BSR  PDATA    ; PRINT MSG
1138 FB28 AE 46                      LDX  6,U
1138 FBC1 AE 46                      LDX  6,U
1139 FB2A 20 D8                      BRA  JOUT4H
1139 FBC3 20 D8                      BRA  JOUT4H
1140                         *
1140                         *
1141 FB2C 8E FC BF           PRTPC   LDX  #MSG11   ; POINT TO MSG "PC="
1141 FBC5 8E FE BC           PRTPC   LDX  #MSG11   ; POINT TO MSG "PC="
1142 FB2F 8D C5                      BSR  PDATA    ; PRINT MSG
1142 FBC8 8D C5                      BSR  PDATA    ; PRINT MSG
1143 FB31 AE 4A                      LDX  10,U
1143 FBCA AE 4A                      LDX  10,U
1144 FB33 20 CF                      BRA  JOUT4H
1144 FBCC 20 CF                      BRA  JOUT4H
1145                         *
1145                         *
1146 FB35 8E FC DD           PRTA    LDX  #MSG16   ; POINT TO MSG "A="
1146 FBCE 8E FE DA           PRTA    LDX  #MSG16   ; POINT TO MSG "A="
1147 FB38 8D BC                      BSR  PDATA    ; PRINT MSG
1147 FBD1 8D BC                      BSR  PDATA    ; PRINT MSG
1148 FB3A A6 41                      LDA  1,U
1148 FBD3 A6 41                      LDA  1,U
1149 FB3C 20 D9                      BRA  JOUT2H   ; OUTPUT HEX BYTE AS ASCII
1149 FBD5 20 D9                      BRA  JOUT2H   ; OUTPUT HEX BYTE AS ASCII
1150                         *
1150                         *
1151 FB3E 8E FC E2           PRTB    LDX  #MSG17   ; POINT TO MSG "B="
1151 FBD7 8E FE DF           PRTB    LDX  #MSG17   ; POINT TO MSG "B="
1152 FB41 8D B3                      BSR  PDATA    ; PRINT MSG
1152 FBDA 8D B3                      BSR  PDATA    ; PRINT MSG
1153 FB43 A6 42                      LDA  2,U
1153 FBDC A6 42                      LDA  2,U
1154 FB45 20 D0                      BRA  JOUT2H   ; OUTPUT HEX BYTE AS ASCII
1154 FBDE 20 D0                      BRA  JOUT2H   ; OUTPUT HEX BYTE AS ASCII
1155                         *
1155                         *
1156 FB47 8E FC E7           PRTCC   LDX  #MSG18   ; POINT TO MSG "CC:"
1156 FBE0 8E FE E4           PRTCC   LDX  #MSG18   ; POINT TO MSG "CC:"
1157 FB4A 8D AA                      BSR  PDATA    ; PRINT MSG
1157 FBE3 8D AA                      BSR  PDATA    ; PRINT MSG
1158 FB4C A6 C4                      LDA  ,U
1158 FBE5 A6 C4                      LDA  ,U
1159 FB4E 8E FC EE                   LDX  #MSG19   ; POINT TO MSG "EFHINZVC"
1159 FBE7 8E FE EB                   LDX  #MSG19   ; POINT TO MSG "EFHINZVC"
1160 FB51 16 00 90                   LBRA BIASCI   ; OUTPUT IN BINARY/ASCII FORMAT
1160 FBEA 16 00 90                   LBRA BIASCI   ; OUTPUT IN BINARY/ASCII FORMAT
1161                         *
1161                         *
1162                         * "R" DISPLAY REGISTERS
1162                         * "R" DISPLAY REGISTERS
1163                         *
1163                         *
1164 FB54 8E FC B5           REGSTR  LDX  #MSG5    ; POINT TO MSG " - "
1164 FBED 8E FE B2           REGSTR  LDX  #MSG5    ; POINT TO MSG " - "
1165 FB57 17 FF 27                   LBSR PSTRNG   ; PRINT MSG
1165 FBF0 17 FF 27                   LBSR PSTRNG   ; PRINT MSG
1166 FB5A 8D A1                      BSR  PRTSP    ; $FCBF
1166 FBF3 8D A1                      BSR  PRTSP    ; $FCBF
1167 FB5C 8D A9                      BSR  PRTUS    ; $FCCA
1167 FBF5 8D A9                      BSR  PRTUS    ; $FCCA
1168 FB5E 8D B0                      BSR  PRTDP    ; $FCD5
1168 FBF7 8D B0                      BSR  PRTDP    ; $FCD5
1169 FB60 8D B8                      BSR  PRTIX    ; $FCE0
1169 FBF9 8D B8                      BSR  PRTIX    ; $FCE0
1170 FB62 8D BF                      BSR  PRTIY    ; $FCEB
1170 FBFB 8D BF                      BSR  PRTIY    ; $FCEB
1171 FB64 8E FC B5                   LDX  #MSG5    ; POINT TO MSG " - "
1171 FBFD 8E FE B2                   LDX  #MSG5    ; POINT TO MSG " - "
1172 FB67 17 FF 17                   LBSR PSTRNG   ; PRINT MSG
1172 FC00 17 FF 17                   LBSR PSTRNG   ; PRINT MSG
1173 FB6A 8D C0                      BSR  PRTPC    ; $FCF5
1173 FC03 8D C0                      BSR  PRTPC    ; $FCF5
1174 FB6C 8D C7                      BSR  PRTA     ; $FCFF
1174 FC05 8D C7                      BSR  PRTA     ; $FCFF
1175 FB6E 8D CE                      BSR  PRTB     ; $FD09
1175 FC07 8D CE                      BSR  PRTB     ; $FD09
1176 FB70 20 D5                      BRA  PRTCC    ; $FD13
1176 FC09 20 D5                      BRA  PRTCC    ; $FD13
1177                         *
1177                         *
1178                         * THE FOLLOWING ROUTINE LOOPS WAITING FOR THE
1178                         * THE FOLLOWING ROUTINE LOOPS WAITING FOR THE
1179                         * OPERATOR TO INPUT TWO VALID HEX ADDRESSES.
1179                         * OPERATOR TO INPUT TWO VALID HEX ADDRESSES.
1180                         * THE FIRST ADDRESS INPUT IS RETURNED IN "IY".
1180                         * THE FIRST ADDRESS INPUT IS RETURNED IN "IY".
1181                         * THE SECOND IS RETURNED IN "IX". THE "V" BIT
1181                         * THE SECOND IS RETURNED IN "IX". THE "V" BIT
1182                         * IN THE C-CODE REG. IS SET IF AN INVALID HEX
1182                         * IN THE C-CODE REG. IS SET IF AN INVALID HEX
1183                         * ADDRESS IS INPUT.
1183                         * ADDRESS IS INPUT.
1184                         *
1184                         *
1185 FB72 8D 09              IN2ADR  BSR  IN1ADR   ; GET FIRST ADDRESS
1185 FC0B 8D 09              IN2ADR  BSR  IN1ADR   ; GET FIRST ADDRESS
1186 FB74 29 4D                      BVS  NOTHEX   ; EXIT IF NOT VALID HEX
1186 FC0D 29 4D                      BVS  NOTHEX   ; EXIT IF NOT VALID HEX
1187 FB76 1F 12                      TFR  X,Y      ; SAVE FIRST ADDR. IN "IY"
1187 FC0F 1F 12                      TFR  X,Y      ; SAVE FIRST ADDR. IN "IY"
1188 FB78 86 2D                      LDA  #'-
1188 FC11 86 2D                      LDA  #'-
1189 FB7A 17 00 A4                   LBSR OUTCH    ; PRINT " - "
1189 FC13 17 00 CA                   LBSR OUTCH    ; PRINT " - "
1190                         *
1190                         *
1191                         * THE FOLLOWING ROUTINE LOOPS WAITING FOR THE
1191                         * THE FOLLOWING ROUTINE LOOPS WAITING FOR THE
1192                         * OPERATOR TO INPUT ONE VALID HEX ADDRESS. THE
1192                         * OPERATOR TO INPUT ONE VALID HEX ADDRESS. THE
1193                         * ADDRESS IS RETURNED IN THE "X" REGISTER.
1193                         * ADDRESS IS RETURNED IN THE "X" REGISTER.
1194                         *
1194                         *
1195 FB7D 8D 0E              IN1ADR  BSR  BYTE     ; INPUT BYTE (2 HEX CHAR)
1195 FC16 8D 0E              IN1ADR  BSR  BYTE     ; INPUT BYTE (2 HEX CHAR)
1196 FB7F 29 42                      BVS  NOTHEX   ; EXIT IF NOT VALID HEX
1196 FC18 29 42                      BVS  NOTHEX   ; EXIT IF NOT VALID HEX
1197 FB81 1F 01                      TFR  D,X
1197 FC1A 1F 01                      TFR  D,X
1198 FB83 8D 08                      BSR  BYTE     ; INPUT BYTE (2 HEX CHAR)
1198 FC1C 8D 08                      BSR  BYTE     ; INPUT BYTE (2 HEX CHAR)
1199 FB85 29 3C                      BVS  NOTHEX
1199 FC1E 29 3C                      BVS  NOTHEX
1200 FB87 34 10                      PSHS X
1200 FC20 34 10                      PSHS X
1201 FB89 A7 61                      STA  1,S
1201 FC22 A7 61                      STA  1,S
1202 FB8B 35 90                      PULS X,PC
1202 FC24 35 90                      PULS X,PC
1203                         *
1203                         *
1204                         ***** INPUT BYTE (2 HEX CHAR.) *****
1204                         ***** INPUT BYTE (2 HEX CHAR.) *****
1205                         *
1205                         *
1206 FB8D 8D 11              BYTE    BSR  INHEX    ; GET HEX LEFT
1206 FC26 8D 11              BYTE    BSR  INHEX    ; GET HEX LEFT
1207 FB8F 29 32                      BVS  NOTHEX   ; EXIT IF NOT VALID HEX
1207 FC28 29 32                      BVS  NOTHEX   ; EXIT IF NOT VALID HEX
1208 FB91 48                         ASLA          ;
1208 FC2A 48                         ASLA          ;
1209 FB92 48                         ASLA          ;
1209 FC2B 48                         ASLA          ;
1210 FB93 48                         ASLA          ; SHIFT INTO LEFT NIBBLE
1210 FC2C 48                         ASLA          ; SHIFT INTO LEFT NIBBLE
1211 FB94 48                         ASLA          ;
1211 FC2D 48                         ASLA          ;
1212 FB95 1F 89                      TFR  A,B      ; PUT HEXL IN "B"
1212 FC2E 1F 89                      TFR  A,B      ; PUT HEXL IN "B"
1213 FB97 8D 07                      BSR  INHEX    ; GET HEX RIGHT
1213 FC30 8D 07                      BSR  INHEX    ; GET HEX RIGHT
1214 FB99 29 28                      BVS  NOTHEX   ; EXIT IF NOT VALID HEX
1214 FC32 29 28                      BVS  NOTHEX   ; EXIT IF NOT VALID HEX
1215 FB9B 34 04                      PSHS B        ; PUSH HEXL ON STACK
1215 FC34 34 04                      PSHS B        ; PUSH HEXL ON STACK
1216 FB9D AB E0                      ADDA ,S+      ; ADD HEXL TO HEXR AND ADJ. STK
1216 FC36 AB E0                      ADDA ,S+      ; ADD HEXL TO HEXR AND ADJ. STK
1217 FB9F 39                         RTS           ; RETURN WITH HEX L&R IN "A"
1217 FC38 39                         RTS           ; RETURN WITH HEX L&R IN "A"
1218                         *
1218                         *
1219                         *
1219                         *
1220 FBA0 8D 57              INHEX   BSR  ECHON    ; INPUT ASCII CHAR.
1220 FC39 8D 5B              INHEX   BSR  ECHON    ; INPUT ASCII CHAR.
1221 FBA2 81 30                      CMPA #'0      ; IS IT > OR = "0" ?
1221 FC3B 81 30                      CMPA #'0      ; IS IT > OR = "0" ?
1222 FBA4 25 1D                      BCS  NOTHEX   ; IF LESS IT AIN'T HEX
1222 FC3D 25 1D                      BCS  NOTHEX   ; IF LESS IT AIN'T HEX
1223 FBA6 81 39                      CMPA #'9      ; IS IT < OR = "9" ?
1223 FC3F 81 39                      CMPA #'9      ; IS IT < OR = "9" ?
1224 FBA8 22 03                      BHI  INHEXA   ; IF > MAYBE IT'S ALPHA
1224 FC41 22 03                      BHI  INHEXA   ; IF > MAYBE IT'S ALPHA
1225 FBAA 80 30                      SUBA #$30     ; ASCII ADJ. NUMERIC
1225 FC43 80 30                      SUBA #$30     ; ASCII ADJ. NUMERIC
1226 FBAC 39                         RTS           ;
1226 FC45 39                         RTS           ;
1227                         *
1227                         *
1228                         *
1228                         *
1229 FBAD 81 41              INHEXA  CMPA #'A      ; IS IT > OR = "A"
1229 FC46 81 41              INHEXA  CMPA #'A      ; IS IT > OR = "A"
1230 FBAF 25 12                      BCS  NOTHEX   ; IF LESS IT AIN'T HEX
1230 FC48 25 12                      BCS  NOTHEX   ; IF LESS IT AIN'T HEX
1231 FBB1 81 46                      CMPA #'F      ; IS IT < OR = "F" ?
1231 FC4A 81 46                      CMPA #'F      ; IS IT < OR = "F" ?
1232 FBB3 22 03                      BHI  INHEXL   ; IF > IT AIN'T HEX
1232 FC4C 22 03                      BHI  INHEXL   ; IF > IT AIN'T HEX
1233 FBB5 80 37                      SUBA #'A-10   ; ($37) ASCII ADJ. ALPHA
1233 FC4E 80 37                      SUBA #'A-10   ; ($37) ASCII ADJ. ALPHA
1234 FBB7 39                         RTS           ;
1234 FC50 39                         RTS           ;
1235                         *
1235                         *
1236 FBB8 81 61              INHEXL  CMPA #'a      ; IS IT > OR = "a"
1236 FC51 81 61              INHEXL  CMPA #'a      ; IS IT > OR = "a"
1237 FBBA 25 07                      BCS  NOTHEX   ; IF LESS IT AIN'T HEX
1237 FC53 25 07                      BCS  NOTHEX   ; IF LESS IT AIN'T HEX
1238 FBBC 81 66                      CMPA #'f      ; IS IT < "f"
1238 FC55 81 66                      CMPA #'f      ; IS IT < "f"
1239 FBBE 22 03                      BHI  NOTHEX   ; IF > IT AIN'T HEX
1239 FC57 22 03                      BHI  NOTHEX   ; IF > IT AIN'T HEX
1240 FBC0 80 57                      SUBA #'a-10   ; ($57) ADJUST TO LOWER CASE
1240 FC59 80 57                      SUBA #'a-10   ; ($57) ADJUST TO LOWER CASE
1241 FBC2 39                         RTS           ;
1241 FC5B 39                         RTS           ;
1242                         *
1242                         *
1243                         *
1243                         *
1244 FBC3 1A 02              NOTHEX  ORCC #2       ; SET (V) FLAG IN C-CODES REGISTER
1244 FC5C 1A 02              NOTHEX  ORCC #2       ; SET (V) FLAG IN C-CODES REGISTER
1245 FBC5 39                         RTS           ;
1245 FC5E 39                         RTS           ;
1246                         *
1246                         *
1247                         *
1247                         *
1248 FBC6 34 10              OUT4H   PSHS X        ; PUSH X-REG. ON THE STACK
1248 FC5F 34 10              OUT4H   PSHS X        ; PUSH X-REG. ON THE STACK
1249 FBC8 35 02                      PULS A        ; POP MS BYTE OF X-REG INTO A-ACC.
1249 FC61 35 02                      PULS A        ; POP MS BYTE OF X-REG INTO A-ACC.
1250 FBCA 8D 02                      BSR  OUTHL    ; OUTPUT HEX LEFT
1250 FC63 8D 02                      BSR  OUTHL    ; OUTPUT HEX LEFT
1251 FBCC 35 02                      PULS A        ; POP LS BYTE OF X-REG INTO A-ACC.
1251 FC65 35 02                      PULS A        ; POP LS BYTE OF X-REG INTO A-ACC.
1252 FBCE                    OUTHL   EQU *
1252 FC67                    OUTHL   EQU *
1253 FBCE 34 02              OUT2H   PSHS A        ; SAVE IT BACK ON STACK
1253 FC67 34 02              OUT2H   PSHS A        ; SAVE IT BACK ON STACK
1254 FBD0 44                         LSRA          ; CONVERT UPPER HEX NIBBLE TO ASCII
1254 FC69 44                         LSRA          ; CONVERT UPPER HEX NIBBLE TO ASCII
1255 FBD1 44                         LSRA          ;
1255 FC6A 44                         LSRA          ;
1256 FBD2 44                         LSRA          ;
1256 FC6B 44                         LSRA          ;
1257 FBD3 44                         LSRA          ;
1257 FC6C 44                         LSRA          ;
1258 FBD4 8D 04                      BSR  XASCII   ; PRINT HEX NIBBLE AS ASCII
1258 FC6D 8D 04                      BSR  XASCII   ; PRINT HEX NIBBLE AS ASCII
1259 FBD6 35 02              OUTHR   PULS A        ; CONVERT LOWER HEX NIBBLE TO ASCII
1259 FC6F 35 02              OUTHR   PULS A        ; CONVERT LOWER HEX NIBBLE TO ASCII
1260 FBD8 84 0F                      ANDA #$0F     ; STRIP LEFT NIBBLE
1260 FC71 84 0F                      ANDA #$0F     ; STRIP LEFT NIBBLE
1261 FBDA 8B 30              XASCII  ADDA #$30     ; ASCII ADJ
1261 FC73 8B 30              XASCII  ADDA #$30     ; ASCII ADJ
1262 FBDC 81 39                      CMPA #$39     ; IS IT < OR = "9" ?
1262 FC75 81 39                      CMPA #$39     ; IS IT < OR = "9" ?
1263 FBDE 2F 02                      BLE  OUTC     ; IF LESS, OUTPUT IT
1263 FC77 2F 02                      BLE  OUTC     ; IF LESS, OUTPUT IT
1264 FBE0 8B 07                      ADDA #7       ; IF > MAKE ASCII LETTER
1264 FC79 8B 07                      ADDA #7       ; IF > MAKE ASCII LETTER
1265 FBE2 20 3D              OUTC    BRA  OUTCH    ; OUTPUT CHAR
1265 FC7B 20 63              OUTC    BRA  OUTCH    ; OUTPUT CHAR
1266                         *
1266                         *
1267                         * BINARY / ASCII --- THIS ROUTINE
1267                         * BINARY / ASCII --- THIS ROUTINE
1268                         * OUTPUTS A BYTE IN ENHANCED
1268                         * OUTPUTS A BYTE IN ENHANCED
1269                         * BINARY FORMAT. THE ENHANCEMENT
1269                         * BINARY FORMAT. THE ENHANCEMENT
1270                         * IS DONE BY SUBSTITUTING ASCII
1270                         * IS DONE BY SUBSTITUTING ASCII
1271                         * LETTERS FOR THE ONES IN THE BYTE.
1271                         * LETTERS FOR THE ONES IN THE BYTE.
1272                         * THE ASCII ENHANCEMENT LETTERS
1272                         * THE ASCII ENHANCEMENT LETTERS
1273                         * ARE OBTAINED FROM THE STRING
1273                         * ARE OBTAINED FROM THE STRING
1274                         * POINTED TO BY THE INDEX REG. "X".
1274                         * POINTED TO BY THE INDEX REG. "X".
1275                         *
1275                         *
1276 FBE4 34 02              BIASCI  PSHS A        ; SAVE "A" ON STACK
1276 FC7D 34 02              BIASCI  PSHS A        ; SAVE "A" ON STACK
1277 FBE6 C6 08                      LDB  #8       ; PRESET LOOP# TO BITS PER BYTE
1277 FC7F C6 08                      LDB  #8       ; PRESET LOOP# TO BITS PER BYTE
1278 FBE8 A6 80              OUTBA   LDA  ,X+      ; GET LETTER FROM STRING
1278 FC81 A6 80              OUTBA   LDA  ,X+      ; GET LETTER FROM STRING
1279 FBEA 68 E4                      ASL  ,S       ; TEST BYTE FOR "1" IN B7
1279 FC83 68 E4                      ASL  ,S       ; TEST BYTE FOR "1" IN B7
1280 FBEC 25 02                      BCS  PRTBA    ; IF ONE PRINT LETTER
1280 FC85 25 02                      BCS  PRTBA    ; IF ONE PRINT LETTER
1281 FBEE 86 2D                      LDA  #'-      ; IF ZERO PRINT "-"
1281 FC87 86 2D                      LDA  #'-      ; IF ZERO PRINT "-"
1282 FBF0 8D 2F              PRTBA   BSR  OUTCH    ; PRINT IT
1282 FC89 8D 55              PRTBA   BSR  OUTCH    ; PRINT IT
1283 FBF2 8D 2B                      BSR  OUT1S    ; PRINT SPACE
1283 FC8B 8D 51                      BSR  OUT1S    ; PRINT SPACE
1284 FBF4 5A                         DECB          ; SUB 1 FROM #BITS YET TO PRINT
1284 FC8D 5A                         DECB          ; SUB 1 FROM #BITS YET TO PRINT
1285 FBF5 26 F1                      BNE  OUTBA
1285 FC8E 26 F1                      BNE  OUTBA
1286 FBF7 35 82                      PULS A,PC
1286 FC90 35 82                      PULS A,PC
1287                         *
1287                         *
1288                                 IFD EXTOPT
1288                                 IFD EXTOPT
1289                         *
1289                         *
1290                         * EXTENDED USER COMMANDS
1290                         * EXTENDED USER COMMANDS
1291                         *
1291                         *
1292                         USRCMD  JMP [MONEXT+EXTCMD]
1292 FC92 6E 9F F0 00        USRCMD  JMP [MONEXT+EXTCMD]
1293                                 ENDIF EXTOPT
 
1293                                 ENDIF EXTOPT
1293                                 ENDIF EXTOPT
1294                         *
1294                         *
1295                         *
1295                         *
1296 FBF9 7D DF D2           ECHON   TST  ECHO     ; IS ECHO REQUIRED ?
1296 FC96 7D DF E2           ECHON   TST  ECHO     ; IS ECHO REQUIRED ?
1297 FBFC 27 06                      BEQ  INCH     ; ECHO NOT REQ. IF CLEAR
1297 FC99 27 06                      BEQ  INCH     ; ECHO NOT REQ. IF CLEAR
1298                         *
1298                         *
1299                         * INCHE
1299                         * INCHE
1300                         *
1300                         *
1301                         * GETS CHARACTER FROM TERMINAL AND
1301                         * GETS CHARACTER FROM TERMINAL AND
1302                         * ECHOS SAME. THE CHARACTER IS RETURNED
1302                         * ECHOS SAME. THE CHARACTER IS RETURNED
1303                         * IN THE "A" ACCUMULATOR WITH THE PARITY
1303                         * IN THE "A" ACCUMULATOR WITH THE PARITY
1304                         * BIT MASKED OFF. ALL OTHER REGISTERS
1304                         * BIT MASKED OFF. ALL OTHER REGISTERS
1305                         * ARE PRESERVED.
1305                         * ARE PRESERVED.
1306                         *
1306                         *
1307 FBFE 8D 04              INCHE   BSR  INCH     ; GET CHAR FROM TERMINAL
1307 FC9B 8D 04              INCHE   BSR  INCH     ; GET CHAR FROM TERMINAL
1308 FC00 84 7F                      ANDA #$7F     ; STRIP PARITY FROM CHAR.
1308 FC9D 84 7F                      ANDA #$7F     ; STRIP PARITY FROM CHAR.
1309 FC02 20 1D                      BRA  OUTCH    ; ECHO CHAR TO TERMINAL
1309 FC9F 20 3F                      BRA  OUTCH    ; ECHO CHAR TO TERMINAL
1310                         *
1310                         *
1311                         * INCH
1311                         * INCH
1312                         *
1312                         *
1313                         * GET CHARACTER FROM TERMINAL. RETURN
1313                         * GET CHARACTER FROM TERMINAL. RETURN
1314                         * CHARACTER IN "A" ACCUMULATOR AND PRESERVE
1314                         * CHARACTER IN "A" ACCUMULATOR AND PRESERVE
1315                         * ALL OTHER REGISTERS. THE INPUT CHARACTER
1315                         * ALL OTHER REGISTERS. THE INPUT CHARACTER
1316                         * IS 8 BITS AND IS NOT ECHOED.
1316                         * IS 8 BITS AND IS NOT ECHOED.
1317                         *
1317                         *
1318                         *
1318                         *
1319 FC04 34 10              INCH    PSHS X        ; SAVE IX
1319 FCA1 34 10              INCH    PSHS X        ; SAVE IX
1320                                 IFD  HFCOPT
1320                                 IFD  HFCOPT
1321                                 LDA  #$11     ; SET RTS* LOW, REQUEST FAR END TO TX
1321 FCA3 86 11                      LDA  #$11     ; SET RTS* LOW, REQUEST FAR END TO TX
1322                                 STA  [CPORT]
1322 FCA5 A7 9F DF E0                STA  [CPORT]
1323                                 ENDIF HFCOPT
1323                                 ENDIF HFCOPT
1323                                 ENDIF HFCOPT
1324 FCA9 BE DF E0           GETSTA  LDX  CPORT    ; POINT TO TERMINAL PORT
1324 FC06 BE DF D0           GETSTA  LDX  CPORT    ; POINT TO TERMINAL PORT
1325 FCAC A6 84                      LDA  ,X       ; FETCH PORT STATUS
1325 FC09 A6 84                      LDA  ,X       ; FETCH PORT STATUS
1326 FCAE 85 01                      BITA #1       ; TEST READY BIT, RDRF ?
1326 FC0B 85 01                      BITA #1       ; TEST READY BIT, RDRF ?
 
1327                                 IFD  PS2OPT
1327                                 IFD  PS2OPT
1328                                 BNE  GETST1
1328 FCB0 26 09                      BNE  GETST1
1329                                 LDX  #PS2KBD
1329 FCB2 8E E0 20                   LDX  #PS2KBD
1330                                 LDA  ,X
1330 FCB5 A6 84                      LDA  ,X
1331                                 BITA #1
1331 FCB7 85 01                      BITA #1
1332                                 ENDIF PS2OPT
 
1332                                 ENDIF PS2OPT
1332                                 ENDIF PS2OPT
1333 FC0D 27 F7                      BEQ  GETSTA   ; IF NOT RDY, THEN TRY AGAIN
1333 FCB9 27 EE                      BEQ  GETSTA   ; IF NOT RDY, THEN TRY AGAIN
1334 FC0F                    GETST1  EQU  *
1334 FCBB                    GETST1  EQU  *
1335                                 IFD  HFCOPT
1335                                 IFD  HFCOPT
1336                                 LDA  #$51     ; SET RTS* HIGH, STOP FAR END FROM TXING, UNTIL NEXT INPUT
1336 FCBB 86 51                      LDA  #$51     ; SET RTS* HIGH, STOP FAR END FROM TXING, UNTIL NEXT INPUT
1337                                 STA  [CPORT]
1337 FCBD A7 9F DF E0                STA  [CPORT]
1338                                 ENDIF HFCOPT
1338                                 ENDIF HFCOPT
1338                                 ENDIF HFCOPT
1339 FCC1 A6 01                      LDA  1,X      ; FETCH CHAR
1339 FC0F A6 01                      LDA  1,X      ; FETCH CHAR
1340 FCC3 35 90                      PULS X,PC     ; RESTORE IX
1340 FC11 35 90                      PULS X,PC     ; RESTORE IX
 
1341                         *
1341                         *
1342                         * INCHEK
1342                         * INCHEK
1343                         *
1343                         *
1344                         * CHECK FOR A CHARACTER AVAILABLE FROM
1344                         * CHECK FOR A CHARACTER AVAILABLE FROM
1345                         * THE TERMINAL. THE SERIAL PORT IS CHECKED
1345                         * THE TERMINAL. THE SERIAL PORT IS CHECKED
1346                         * FOR READ READY. ALL REGISTERS ARE
1346                         * FOR READ READY. ALL REGISTERS ARE
1347                         * PRESERVED, AND THE "Z" BIT WILL BE
1347                         * PRESERVED, AND THE "Z" BIT WILL BE
1348                         * CLEAR IF A CHARACTER CAN BE READ.
1348                         * CLEAR IF A CHARACTER CAN BE READ.
1349                         *
1349                         *
1350                         *
1350                         *
1351 FC13 34 02              INCHEK  PSHS A        ; SAVE A ACCUM
1351 FCC5 34 02              INCHEK  PSHS A        ; SAVE A ACCUM
1352                                 IFD  HFCOPT
1352                                 IFD  HFCOPT
1353                                 LDA  #$11     ; SET RTS* LOW, REQUEST FAR END TO TX
1353 FCC7 86 11                      LDA  #$11     ; SET RTS* LOW, REQUEST FAR END TO TX
1354                                 STA  [CPORT]
1354 FCC9 A7 9F DF E0                STA  [CPORT]
1355                                 ENDIF HFCOPT
 
1355                                 ENDIF HFCOPT
1355                                 ENDIF HFCOPT
1356 FC15 A6 9F DF D0                LDA  [CPORT]  ; FETCH PORT STATUS
1356 FCCD A6 9F DF E0                LDA  [CPORT]  ; FETCH PORT STATUS
1357 FC19 85 01                      BITA #1       ; TEST READY BIT, RDRF ?
1357 FCD1 85 01                      BITA #1       ; TEST READY BIT, RDRF ?
1358                                 IFD  PS2OPT
1358                                 IFD  PS2OPT
1359                                 BNE  INCHEK1
1359 FCD3 26 05                      BNE  INCHEK1
1360                                 LDA  PS2KBD
1360 FCD5 B6 E0 20                   LDA  PS2KBD
1361                                 BITA #1       ; TEST READY BIT< RDRF ?
1361 FCD8 85 01                      BITA #1       ; TEST READY BIT< RDRF ?
1362                                 ENDIF PS2OPT
 
1362                                 ENDIF PS2OPT
1362                                 ENDIF PS2OPT
1363 FC1B 35 82              INCHEK1 PULS A,PC     ; RESTORE A ACCUM.
1363 FCDA 35 82              INCHEK1 PULS A,PC     ; RESTORE A ACCUM.
1364                         *
1364                         *
1365 FC1D 8D 00              OUT2S   BSR  OUT1S    ; OUTPUT 2 SPACES
1365 FCDC 8D 00              OUT2S   BSR  OUT1S    ; OUTPUT 2 SPACES
1366 FC1F 86 20              OUT1S   LDA  #$20     ; OUTPUT 1 SPACE
1366 FCDE 86 20              OUT1S   LDA  #$20     ; OUTPUT 1 SPACE
1367                         *
1367                         *
1368                         *
1368                         *
1369                         * OUTCH
1369                         * OUTCH
1370                         *
1370                         *
1371                         * OUTPUT CHARACTER TO TERMINAL.
1371                         * OUTPUT CHARACTER TO TERMINAL.
1372                         * THE CHAR. TO BE OUTPUT IS
1372                         * THE CHAR. TO BE OUTPUT IS
1373                         * PASSED IN THE A REGISTER.
1373                         * PASSED IN THE A REGISTER.
1374                         * ALL REGISTERS ARE PRESERVED.
1374                         * ALL REGISTERS ARE PRESERVED.
1375                         *
1375                         *
1376                         OUTCH   IFD   VDUOPT
1376                         OUTCH   IFD   VDUOPT
1377                                 BSR   VOUTCH
1377 FCE0 8D 49                      BSR   VOUTCH
1378                                 ENDIF VDUOPT
 
1378                                 ENDIF VDUOPT
1378                                 ENDIF VDUOPT
1379                                 IFD   DG640OPT
1379                                 IFD   DG640OPT
1380                                 BSR   VOUTCH
1380                                 BSR   VOUTCH
1381                                 ENDIF DG640OPT
1381                                 ENDIF DG640OPT
1381                                 ENDIF DG640OPT
1381                                 ENDIF DG640OPT
1382 FC21 34 12              AOUTCH  PSHS A,X      ; SAVE A ACCUM AND IX
1382 FCE2 34 12              AOUTCH  PSHS A,X      ; SAVE A ACCUM AND IX
1383 FC23 BE DF D0                   LDX  CPORT    ; GET ADDR. OF TERMINAL
1383 FCE4 BE DF E0                   LDX  CPORT    ; GET ADDR. OF TERMINAL
1384 FC26 A6 84              FETSTA  LDA  ,X       ; FETCH PORT STATUS
1384 FCE7 A6 84              FETSTA  LDA  ,X       ; FETCH PORT STATUS
1385 FC28 85 02                      BITA #2       ; TEST TDRE, OK TO XMIT ?
1385 FCE9 85 02                      BITA #2       ; TEST TDRE, OK TO XMIT ?
1386 FC2A 27 FA                      BEQ  FETSTA   ; IF NOT LOOP UNTIL RDY
1386 FCEB 27 FA                      BEQ  FETSTA   ; IF NOT LOOP UNTIL RDY
1387 FC2C 85 08                      BITA #8       ; CLEAR TO SEND ?
1387 FCED 85 08                      BITA #8       ; CLEAR TO SEND ?
1388 FC2E 26 F6                      BNE  FETSTA   ; NO, LOOP UNTIL CLEAR
1388 FCEF 26 F6                      BNE  FETSTA   ; NO, LOOP UNTIL CLEAR
1389 FC30 35 02                      PULS A        ; GET CHAR. FOR XMIT
1389 FCF1 35 02                      PULS A        ; GET CHAR. FOR XMIT
1390 FC32 A7 01                      STA  1,X      ; XMIT CHAR.
1390 FCF3 A7 01                      STA  1,X      ; XMIT CHAR.
1391 FC34 35 90                      PULS X,PC     ; RESTORE IX
1391 FCF5 35 90                      PULS X,PC     ; RESTORE IX
1392                         *
1392                         *
1393                         * IO INITIALIZATION
1393                         * IO INITIALIZATION
1394                         *
1394                         *
1395 FC36                    IOINIZ  EQU  *
1395 FCF7                    IOINIZ  EQU  *
1396                                 IFD  VDUOPT
1396                                 IFD  VDUOPT
1397                                 BSR  VINIZ
1397 FCF7 8D 13                      BSR  VINIZ
1398                                 ENDIF VDUOPT
 
1398                                 ENDIF VDUOPT
1398                                 ENDIF VDUOPT
1399                                 IFD  DG640OPT
1399                                 IFD  DG640OPT
1400                                 BSR  VINIZ
1400                                 BSR  VINIZ
1401                                 ENDIF DG640OPT
1401                                 ENDIF DG640OPT
1401                                 ENDIF DG640OPT
1401                                 ENDIF DG640OPT
1402 FC36 BE DF D0           ACINIZ  LDX  CPORT    ; POINT TO CONTROL PORT ADDRESS
1402 FCF9 BE DF E0           ACINIZ  LDX  CPORT    ; POINT TO CONTROL PORT ADDRESS
1403 FC39 86 03                      LDA  #3       ; RESET ACIA PORT CODE
1403 FCFC 86 03                      LDA  #3       ; RESET ACIA PORT CODE
1404 FC3B A7 84                      STA  ,X       ; STORE IN CONTROL REGISTER
1404 FCFE A7 84                      STA  ,X       ; STORE IN CONTROL REGISTER
1405 FC3D 86 51                      LDA  #$51     ; SET 8 DATA, 2 STOP AN 0 PARITY RTS* HIGH
1405 FD00 86 51                      LDA  #$51     ; SET 8 DATA, 2 STOP AN 0 PARITY RTS* HIGH
1406 FC3F A7 84                      STA  ,X       ; STORE IN CONTROL REGISTER
1406 FD02 A7 84                      STA  ,X       ; STORE IN CONTROL REGISTER
1407 FC41 6D 01                      TST  1,X      ; ANYTHING IN DATA REGISTER?
1407 FD04 6D 01                      TST  1,X      ; ANYTHING IN DATA REGISTER?
1408 FC43 86 FF                      LDA  #$FF     ; TURN ON ECHO FLAG
1408 FD06 86 FF                      LDA  #$FF     ; TURN ON ECHO FLAG
1409 FC45 B7 DF D2                   STA  ECHO
1409 FD08 B7 DF E2                   STA  ECHO
1410 FC48 39                         RTS
1410 FD0B 39                         RTS
1411                         *
1411                         *
1412                                 IFD VDUOPT
1412                                 IFD VDUOPT
1413                         *
1413                         *
1414                         ***************************************************
1414                         ***************************************************
1415                         *      VDU8 ADM3A REGISTER-MAPPED EMULATOR        *
1415                         *      VDU8 ADM3A REGISTER-MAPPED EMULATOR        *
Line 2963... Line 2961...
1420                         *
1420                         *
1421                         ***************************************************
1421                         ***************************************************
1422                         *               INITIALIZE EMULATOR               *
1422                         *               INITIALIZE EMULATOR               *
1423                         ***************************************************
1423                         ***************************************************
1424                         *
1424                         *
1425                         VINIZ   LDX  #VDU
1425 FD0C 8E E0 30           VINIZ   LDX  #VDU
1426                                 LDD  #0
1426 FD0F CC 00 00                   LDD  #0
1427                                 STD  COLADX   ; AND ROWADX
1427 FD12 FD DF FB                   STD  COLADX   ; AND ROWADX
1428                                 STA  VDUCOL,X
1428 FD15 A7 02                      STA  VDUCOL,X
1429                                 STB  VDUROW,X
1429 FD17 E7 03                      STB  VDUROW,X
1430                                 STB  VDUOFF,X
1430 FD19 E7 04                      STB  VDUOFF,X
1431                                 STD  NEWROW   ; AND ESCFLG
1431 FD1B FD DF FD                   STD  NEWROW   ; AND ESCFLG
1432                                 LDB  #$02
1432 FD1E C6 02                      LDB  #$02
1433                                 STB  VDUATT,X
1433 FD20 E7 01                      STB  VDUATT,X
1434                                 CLR  ESCFLG
1434 FD22 7F DF FE                   CLR  ESCFLG
1435                                 LDA  #$1B     ; SEND ESCAPE
1435 FD25 86 1B                      LDA  #$1B     ; SEND ESCAPE
1436                                 BSR  VOUTCH
1436 FD27 8D 02                      BSR  VOUTCH
1437                                 LDA  #'Y      ; CLEAR TO END OF SCREEN
1437 FD29 86 59                      LDA  #'Y      ; CLEAR TO END OF SCREEN
1438                         *
1438                         *
1439                         ** VIDEO OUTPUT ROUTINE
1439                         ** VIDEO OUTPUT ROUTINE
1440                         *
1440                         *
1441                         VOUTCH  PSHS A,B,X    ; SAVE REGISTERS
1441 FD2B 34 16              VOUTCH  PSHS A,B,X    ; SAVE REGISTERS
1442                                 LDX  #VDU     ; POINT TO VDU REGISTERS
1442 FD2D 8E E0 30                   LDX  #VDU     ; POINT TO VDU REGISTERS
1443                         *
1443                         *
1444                         ** CHECK FOR ESCAPE SEQUENCE
1444                         ** CHECK FOR ESCAPE SEQUENCE
1445                         *
1445                         *
1446                                 TST  ESCFLG   ; ESCAPE ACTIVE?
1446 FD30 7D DF FE                   TST  ESCFLG   ; ESCAPE ACTIVE?
1447                                 BEQ  SOROU1   ; BRANCH IF NOT
1447 FD33 27 04                      BEQ  SOROU1   ; BRANCH IF NOT
1448                                 BSR  ESCAPE   ; ELSE DO ESCAPE
1448 FD35 8D 60                      BSR  ESCAPE   ; ELSE DO ESCAPE
1449                                 BRA  RETURN   ; AND RETURN
1449 FD37 20 0D                      BRA  RETURN   ; AND RETURN
1450                         *
1450                         *
1451                         ** CHECK FOR CONTROL CHARACTERS
1451                         ** CHECK FOR CONTROL CHARACTERS
1452                         *
1452                         *
1453                         SOROU1  CMPA #$20     ; CONTROL CODES?
1453 FD39 81 20              SOROU1  CMPA #$20     ; CONTROL CODES?
1454                                 BHS  SOROU2
1454 FD3B 24 04                      BHS  SOROU2
1455                                 BSR  CONTRL   ; BRANCH IF SO
1455 FD3D 8D 09                      BSR  CONTRL   ; BRANCH IF SO
1456                                 BRA  RETURN
1456 FD3F 20 05                      BRA  RETURN
1457                         *
1457                         *
1458                         ** OUTPUT TEXT CHARACTER
1458                         ** OUTPUT TEXT CHARACTER
1459                         *
1459                         *
1460                         SOROU2  STA  VDUCHR,X ; DISPLAY CHARACTER
1460 FD41 A7 84              SOROU2  STA  VDUCHR,X ; DISPLAY CHARACTER
1461                                 LBSR NEWCOL   ; UPDATE COLUMN
1461 FD43 17 00 AF                   LBSR NEWCOL   ; UPDATE COLUMN
1462                         *
1462                         *
1463                         ** DISPLAY CURSOR AND RETURN
1463                         ** DISPLAY CURSOR AND RETURN
1464                         *
1464                         *
1465                         RETURN  PULS A,B,X,PC ; RESTORE REGISTERS AND RETURN
1465 FD46 35 96              RETURN  PULS A,B,X,PC ; RESTORE REGISTERS AND RETURN
1466                         *
1466                         *
1467                         ***************************************************
1467                         ***************************************************
1468                         *              CONTROL CODE HANDLERS              *
1468                         *              CONTROL CODE HANDLERS              *
1469                         ***************************************************
1469                         ***************************************************
1470                         *
1470                         *
1471                         CONTRL  CMPA #$08     ; CTRL H - BACKSPACE ?
1471 FD48 81 08              CONTRL  CMPA #$08     ; CTRL H - BACKSPACE ?
1472                                 BEQ  BACKSP
1472 FD4A 27 34                      BEQ  BACKSP
1473                                 CMPA #$1B     ; ESCAPE SEQUENCE?
1473 FD4C 81 1B                      CMPA #$1B     ; ESCAPE SEQUENCE?
1474                                 BEQ  SETESC
1474 FD4E 27 5A                      BEQ  SETESC
1475                                 CMPA #$1A     ; CTRL Z - Clear Screen
1475 FD50 81 1A                      CMPA #$1A     ; CTRL Z - Clear Screen
1476                                 LBEQ CLRSCR
1476 FD52 10 27 00 7C                LBEQ CLRSCR
1477                                 CMPA #$16     ; CTRL ^ - Home
1477 FD56 81 16                      CMPA #$16     ; CTRL ^ - Home
1478                                 BEQ  HOME
1478 FD58 27 38                      BEQ  HOME
1479                                 CMPA #$0D     ; CTRL M - RETURN?
1479 FD5A 81 0D                      CMPA #$0D     ; CTRL M - RETURN?
1480                                 LBEQ CRETN
1480 FD5C 10 27 00 89                LBEQ CRETN
1481                                 CMPA #$0C     ; CTRL L - CHAR RIGHT
1481 FD60 81 0C                      CMPA #$0C     ; CTRL L - CHAR RIGHT
1482                                 BEQ  CHRIGHT
1482 FD62 27 24                      BEQ  CHRIGHT
1483                                 CMPA #$0B     ; CTRL K - MOVE UP ONE LINE
1483 FD64 81 0B                      CMPA #$0B     ; CTRL K - MOVE UP ONE LINE
1484                                 BEQ  LINEUP
1484 FD66 27 0F                      BEQ  LINEUP
1485                                 CMPA #$0A     ; CTRL J - LINE FEED
1485 FD68 81 0A                      CMPA #$0A     ; CTRL J - LINE FEED
1486                                 BNE  RETESC   ; NONE OF THESE, RETURN
1486 FD6A 26 45                      BNE  RETESC   ; NONE OF THESE, RETURN
1487                         *
1487                         *
1488                         ***************************************** LINE FEED
1488                         ***************************************** LINE FEED
1489                         *
1489                         *
1490                         LINEFD  LDD  COLADX   ; GET CURRENT COLUMN AND ROW
1490 FD6C FC DF FB           LINEFD  LDD  COLADX   ; GET CURRENT COLUMN AND ROW
1491                                 INCB          ; BUMP ROW
1491 FD6F 5C                         INCB          ; BUMP ROW
1492                                 CMPB #NUMLIN  ; SCROLL TIME?
1492 FD70 C1 19                      CMPB #NUMLIN  ; SCROLL TIME?
1493                                 BNE  NEWCUR   ; POSITION CURSOR IF NOT
1493 FD72 26 79                      BNE  NEWCUR   ; POSITION CURSOR IF NOT
1494                                 LBRA SCROLL   ; ELSE SCROLL IT
1494 FD74 16 00 8F                   LBRA SCROLL   ; ELSE SCROLL IT
1495                         *
1495                         *
1496                         ***************************************** LINE FEED
1496                         ***************************************** LINE FEED
1497                         *
1497                         *
1498                         LINEUP  LDD  COLADX   ; GET CURRENT COLUMN AND ROW
1498 FD77 FC DF FB           LINEUP  LDD  COLADX   ; GET CURRENT COLUMN AND ROW
1499                                 TSTB          ; AT TOP OF SCREEN ?
1499 FD7A 5D                         TSTB          ; AT TOP OF SCREEN ?
1500                                 BEQ  RETESC   ; Yes, Ignore
1500 FD7B 27 34                      BEQ  RETESC   ; Yes, Ignore
1501                                 DECB          ; No, Decrement ROW
1501 FD7D 5A                         DECB          ; No, Decrement ROW
1502                                 BRA  NEWCUR   ; POSITION CURSOR
1502 FD7E 20 6D                      BRA  NEWCUR   ; POSITION CURSOR
1503                         *
1503                         *
1504                         *********************************** BACK SPACE
1504                         *********************************** BACK SPACE
1505                         *
1505                         *
1506                         BACKSP  LDA  COLADX
1506 FD80 B6 DF FB           BACKSP  LDA  COLADX
1507                                 BEQ  RETESC   ; RETURN
1507 FD83 27 2C                      BEQ  RETESC   ; RETURN
1508                                 DECA
1508 FD85 4A                         DECA
1509                                 BRA  POSCOL   ; POSITION CURSOR
1509 FD86 20 62                      BRA  POSCOL   ; POSITION CURSOR
1510                         *
1510                         *
1511                         *********************************** CURSOR RIGHT
1511                         *********************************** CURSOR RIGHT
1512                         *
1512                         *
1513                         CHRIGHT LDA  COLADX
1513 FD88 B6 DF FB           CHRIGHT LDA  COLADX
1514                                 INCA
1514 FD8B 4C                         INCA
1515                                 CMPA #LINLEN
1515 FD8C 81 50                      CMPA #LINLEN
1516                                 BEQ  RETESC
1516 FD8E 27 21                      BEQ  RETESC
1517                                 BRA  POSCOL
1517 FD90 20 58                      BRA  POSCOL
1518                         *
1518                         *
1519                         *********************************** CURSOR RIGHT
1519                         *********************************** CURSOR RIGHT
1520                         *
1520                         *
1521                         HOME    LDD  #0       ; HOME - POSITION TOP OF SCREEN
1521 FD92 CC 00 00           HOME    LDD  #0       ; HOME - POSITION TOP OF SCREEN
1522                                 BRA  NEWCUR
1522 FD95 20 56                      BRA  NEWCUR
1523                         *
1523                         *
1524                         ***************************************************
1524                         ***************************************************
1525                         *                 ESCAPE HANDLERS                 *
1525                         *                 ESCAPE HANDLERS                 *
1526                         ***************************************************
1526                         ***************************************************
1527                         *
1527                         *
1528                         ESCAPE  LDB  ESCFLG   ; GET FLAG
1528 FD97 F6 DF FE           ESCAPE  LDB  ESCFLG   ; GET FLAG
1529                                 CMPB #'=      ; SETTING CURSOR?
1529 FD9A C1 3D                      CMPB #'=      ; SETTING CURSOR?
1530                                 BEQ  ESCCUR   ; BRANCH IF SO
1530 FD9C 27 14                      BEQ  ESCCUR   ; BRANCH IF SO
1531                                 CMPA #'Y      ; CLEAR TO END OF SCREEN?
1531 FD9E 81 59                      CMPA #'Y      ; CLEAR TO END OF SCREEN?
1532                                 BEQ  ESCCLS
1532 FDA0 27 6E                      BEQ  ESCCLS
1533                                 CMPA #'T      ; CLEAR TO END OF LINE?
1533 FDA2 81 54                      CMPA #'T      ; CLEAR TO END OF LINE?
1534                                 BEQ  ESCCLL
1534 FDA4 27 31                      BEQ  ESCCLL
1535                                 CMPA #'=      ; STARTING CURSOR SET?
1535 FDA6 81 3D                      CMPA #'=      ; STARTING CURSOR SET?
1536                                 BNE  CLRESC   ; BRANCH IF NOT
1536 FDA8 26 04                      BNE  CLRESC   ; BRANCH IF NOT
1537                         *
1537                         *
1538                         ***************************** START ESCAPE SEQUENCE
1538                         ***************************** START ESCAPE SEQUENCE
1539                         *
1539                         *
1540                         SETESC  STA  ESCFLG   ; ELSE START CURSORING
1540 FDAA B7 DF FE           SETESC  STA  ESCFLG   ; ELSE START CURSORING
1541                                 RTS           ; AND RETURN
1541 FDAD 39                         RTS           ; AND RETURN
1542                         *
1542                         *
1543                         CLRESC  CLR  ESCFLG   ; NO OTHERS SUPPORTED
1543 FDAE 7F DF FE           CLRESC  CLR  ESCFLG   ; NO OTHERS SUPPORTED
1544                         RETESC  RTS           ; SO RETURN
1544 FDB1 39                 RETESC  RTS           ; SO RETURN
1545                         *
1545                         *
1546                         ********************************* SET SCREEN CURSOR
1546                         ********************************* SET SCREEN CURSOR
1547                         *
1547                         *
1548                         ESCCUR  TST  NEWROW   ; ROW SET?
1548 FDB2 7D DF FD           ESCCUR  TST  NEWROW   ; ROW SET?
1549                                 BNE  ESCCU1   ; BRANCH IF SO
1549 FDB5 26 04                      BNE  ESCCU1   ; BRANCH IF SO
1550                                 STA  NEWROW   ; ELSE SET NEW ROW
1550 FDB7 B7 DF FD                   STA  NEWROW   ; ELSE SET NEW ROW
1551                                 RTS           ; AND RETURN
1551 FDBA 39                         RTS           ; AND RETURN
1552                         *
1552                         *
1553                         ESCCU1  CLR  ESCFLG
1553 FDBB 7F DF FE           ESCCU1  CLR  ESCFLG
1554                                 SUBA #$20     ; ADJUST COLUMN ADDRESS
1554 FDBE 80 20                      SUBA #$20     ; ADJUST COLUMN ADDRESS
1555                                 CMPA #LINLEN-1 ;CHECK FOR ACCEPTABLE COLUM
1555 FDC0 81 4F                      CMPA #LINLEN-1 ;CHECK FOR ACCEPTABLE COLUM
1556                                 BHI  RETESC   ; NOT OK, DO NOTHING
1556 FDC2 22 ED                      BHI  RETESC   ; NOT OK, DO NOTHING
1557                         *
1557                         *
1558                         ESCCU2  LDB  NEWROW
1558 FDC4 F6 DF FD           ESCCU2  LDB  NEWROW
1559                                 CLR  NEWROW
1559 FDC7 7F DF FD                   CLR  NEWROW
1560                                 SUBB #$20     ; ADJUST TO ROW ADDRESS
1560 FDCA C0 20                      SUBB #$20     ; ADJUST TO ROW ADDRESS
1561                                 CMPB #NUMLIN-1 ; CHECK FOR ACCEPTABLE ROW
1561 FDCC C1 18                      CMPB #NUMLIN-1 ; CHECK FOR ACCEPTABLE ROW
1562                                 BHI  RETESC   ; ELSE RETURN DOING NOTHING
1562 FDCE 22 E1                      BHI  RETESC   ; ELSE RETURN DOING NOTHING
1563                                 BRA  NEWCUR   ; GO SET NEW CURSOR IF SO
1563 FDD0 20 1B                      BRA  NEWCUR   ; GO SET NEW CURSOR IF SO
1564                         *
1564                         *
1565                         ****************** CLEAR FROM CURSOR TO END OF LINE
1565                         ****************** CLEAR FROM CURSOR TO END OF LINE
1566                         *
1566                         *
1567                         CLRSCR  LDD  #0       ; CLEAR FROM TOP OF SCREEN
1567 FDD2 CC 00 00           CLRSCR  LDD  #0       ; CLEAR FROM TOP OF SCREEN
1568                                 BSR  NEWCUR
1568 FDD5 8D 16                      BSR  NEWCUR
1569                         ESCCLL  LDA  COLADX
1569 FDD7 B6 DF FB           ESCCLL  LDA  COLADX
1570                                 LDB  #$20     ; AND CLEAR CHAR
1570 FDDA C6 20                      LDB  #$20     ; AND CLEAR CHAR
1571                         ESCCL1  STB  VDUCHR,X ; DISPLAY TEXT
1571 FDDC E7 84              ESCCL1  STB  VDUCHR,X ; DISPLAY TEXT
1572                                 INCA
1572 FDDE 4C                         INCA
1573                            STA  VDUCOL,X
1573 FDDF A7 02                 STA  VDUCOL,X
1574                                 CMPA #LINLEN  ; UNTIL END OF LINE
1574 FDE1 81 50                      CMPA #LINLEN  ; UNTIL END OF LINE
1575                                 BNE  ESCCL1
1575 FDE3 26 F7                      BNE  ESCCL1
1576                                 CLR  ESCFLG
1576 FDE5 7F DF FE                   CLR  ESCFLG
1577                                 RTS
1577 FDE8 39                         RTS
1578                         *
1578                         *
1579                         *********************************** CARRIAGE RETURN
1579                         *********************************** CARRIAGE RETURN
1580                         *
1580                         *
1581                         CRETN   CLRA          ; SET COLUMN ZERO
1581 FDE9 4F                 CRETN   CLRA          ; SET COLUMN ZERO
1582                         POSCOL  LDB  ROWADX   ; GET CURRENT ROW
1582 FDEA F6 DF FC           POSCOL  LDB  ROWADX   ; GET CURRENT ROW
1583                         *
1583                         *
1584                         *********** GENERATE NEW CURSOR POSITION AND RETURN
1584                         *********** GENERATE NEW CURSOR POSITION AND RETURN
1585                         *
1585                         *
1586                         NEWCUR  STD  COLADX   ; SAVE NEW ROW AND COLUMN
1586 FDED FD DF FB           NEWCUR  STD  COLADX   ; SAVE NEW ROW AND COLUMN
1587                            STA  VDUCOL,X ; SET NEW COLUMN
1587 FDF0 A7 02                 STA  VDUCOL,X ; SET NEW COLUMN
1588                                 STB  VDUROW,X ; SET NEW ROW
1588 FDF2 E7 03                      STB  VDUROW,X ; SET NEW ROW
1589                                 RTS           ; AND RETURN
1589 FDF4 39                         RTS           ; AND RETURN
1590                         *
1590                         *
1591                         ********************* UPDATE CURRENT COLUMN AND ROW
1591                         ********************* UPDATE CURRENT COLUMN AND ROW
1592                         *
1592                         *
1593                         NEWCOL  LDD  COLADX   ; GET ROW AND COLUMN
1593 FDF5 FC DF FB           NEWCOL  LDD  COLADX   ; GET ROW AND COLUMN
1594                                 INCA          ; BUMP COLUMN
1594 FDF8 4C                         INCA          ; BUMP COLUMN
1595                                 CMPA #LINLEN  ; ROLL?
1595 FDF9 81 50                      CMPA #LINLEN  ; ROLL?
1596                                 BNE  NEWCUR   ; BRANCH IF NOT
1596 FDFB 26 F0                      BNE  NEWCUR   ; BRANCH IF NOT
1597                                 CLRA          ; ELSE RESET TO ZERO
1597 FDFD 4F                         CLRA          ; ELSE RESET TO ZERO
1598                                 INCB          ; AND BUMP ROW
1598 FDFE 5C                         INCB          ; AND BUMP ROW
1599                                 CMPB #NUMLIN
1599 FDFF C1 19                      CMPB #NUMLIN
1600                                 BNE  NEWCUR
1600 FE01 26 EA                      BNE  NEWCUR
1601                                 DECB          ; BOTTOM ROW
1601 FE03 5A                         DECB          ; BOTTOM ROW
1602                                 BSR  NEWCUR
1602 FE04 8D E7                      BSR  NEWCUR
1603                         *
1603                         *
1604                         ********************************* SCROLL THE SCREEN
1604                         ********************************* SCROLL THE SCREEN
1605                         *
1605                         *
1606                         SCROLL  LDB  VDUOFF,X
1606 FE06 E6 04              SCROLL  LDB  VDUOFF,X
1607                                 INCB
1607 FE08 5C                         INCB
1608                                 CMPB #NUMLIN
1608 FE09 C1 19                      CMPB #NUMLIN
1609                                 BLO  SCROL1
1609 FE0B 25 01                      BLO  SCROL1
1610                                 CLRB
1610 FE0D 5F                         CLRB
1611                         SCROL1  STB  VDUOFF,X
1611 FE0E E7 04              SCROL1  STB  VDUOFF,X
1612                         *
1612                         *
1613                         **************** CLEAR FROM CURSOR TO END OF SCREEN
1613                         **************** CLEAR FROM CURSOR TO END OF SCREEN
1614                         *
1614                         *
1615                         ESCCLS  LDB  COLADX   ; GET CURSOR
1615 FE10 F6 DF FB           ESCCLS  LDB  COLADX   ; GET CURSOR
1616                                 LDA  #$20     ; GET A SPACE
1616 FE13 86 20                      LDA  #$20     ; GET A SPACE
1617                         ESCCLS1    STB  COLADX
1617 FE15 F7 DF FB           ESCCLS1    STB  COLADX
1618                                 STB  VDUCOL,X
1618 FE18 E7 02                      STB  VDUCOL,X
1619                                 STA  VDUCHR,X
1619 FE1A A7 84                      STA  VDUCHR,X
1620                                 INCB
1620 FE1C 5C                         INCB
1621                                 CMPB #LINLEN
1621 FE1D C1 50                      CMPB #LINLEN
1622                                 BNE  ESCCLS1
1622 FE1F 26 F4                      BNE  ESCCLS1
1623                         *
1623                         *
1624                                 LDB  ROWADX
1624 FE21 F6 DF FC                   LDB  ROWADX
1625                                 INCB
1625 FE24 5C                         INCB
1626                                 CMPB #NUMLIN
1626 FE25 C1 19                      CMPB #NUMLIN
1627                                 BEQ  ESCCLS2
1627 FE27 27 08                      BEQ  ESCCLS2
1628                                 STB  ROWADX
1628 FE29 F7 DF FC                   STB  ROWADX
1629                                 STB  VDUROW,X
1629 FE2C E7 03                      STB  VDUROW,X
1630                                 CLRB
1630 FE2E 5F                         CLRB
1631                                 BRA  ESCCLS1
1631 FE2F 20 E4                      BRA  ESCCLS1
1632                         *
1632                         *
1633                         ESCCLS2 CLRB
1633 FE31 5F                 ESCCLS2 CLRB
1634                                 STB  COLADX
1634 FE32 F7 DF FB                   STB  COLADX
1635                                 STB  VDUCOL,X
1635 FE35 E7 02                      STB  VDUCOL,X
1636                                 STB  ESCFLG
1636 FE37 F7 DF FE                   STB  ESCFLG
1637                                 RTS
1637 FE3A 39                         RTS
1638                                 ENDIF VDUOPT
 
1638                                 ENDIF VDUOPT
1638                                 ENDIF VDUOPT
1639                         *
1639                         *
1640                                 IFD DG640OPT
1640                                 IFD DG640OPT
1641                         ***************************************************
1641                         ***************************************************
1642                         *      TELEVIDEO-TYPE MEMORY-MAPPED EMULATOR      *
1642                         *      TELEVIDEO-TYPE MEMORY-MAPPED EMULATOR      *
Line 3493... Line 3490...
1947                         *
1947                         *
1948                         * MONITOR KEYBOARD COMMAND JUMP TABLE
1948                         * MONITOR KEYBOARD COMMAND JUMP TABLE
1949                         *
1949                         *
1950                         *************************************
1950                         *************************************
1951                         *
1951                         *
1952 FC49                    JMPTAB  EQU *
1952 FE3B                    JMPTAB  EQU *
1953 FC49 01                         FCB 1 " ^A "
1953 FE3B 01                         FCB 1 " ^A "
1954 FC4A FA DB                      FDB ALTRA
1954 FE3C FB 74                      FDB ALTRA
1955 FC4C 02                         FCB 2 " ^B "
1955 FE3E 02                         FCB 2 " ^B "
1956 FC4D FA D0                      FDB ALTRB
1956 FE3F FB 69                      FDB ALTRB
1957 FC4F 03                         FCB 3 " ^C "
1957 FE41 03                         FCB 3 " ^C "
1958 FC50 FA E6                      FDB ALTRCC
1958 FE42 FB 7F                      FDB ALTRCC
1959 FC52 04                         FCB 4 " ^D "
1959 FE44 04                         FCB 4 " ^D "
1960 FC53 FA C5                      FDB ALTRDP
1960 FE45 FB 5E                      FDB ALTRDP
1961 FC55 10                         FCB $10 " ^P "
1961 FE47 10                         FCB $10 " ^P "
1962 FC56 FA 98                      FDB ALTRPC
1962 FE48 FB 31                      FDB ALTRPC
1963 FC58 15                         FCB $15 " ^U "
1963 FE4A 15                         FCB $15 " ^U "
1964 FC59 FA A4                      FDB ALTRU
1964 FE4B FB 3D                      FDB ALTRU
1965 FC5B 18                         FCB $18 " ^X "
1965 FE4D 18                         FCB $18 " ^X "
1966 FC5C FA BA                      FDB ALTRX
1966 FE4E FB 53                      FDB ALTRX
1967 FC5E 19                         FCB $19 " ^Y "
1967 FE50 19                         FCB $19 " ^Y "
1968 FC5F FA AF                      FDB ALTRY
1968 FE51 FB 48                      FDB ALTRY
1969                         *
1969                         *
1970 FC61 42                         FCC 'B'
1970 FE53 42                         FCC 'B'
1971 FC62 F9 43                      FDB BRKPNT
1971 FE54 F9 5C                      FDB BRKPNT
1972 FC64 45                         FCC 'E'
1972 FE56 45                         FCC 'E'
1973 FC65 F8 E4                      FDB MEMDUMP
1973 FE57 F8 FD                      FDB MEMDUMP
1974 FC67 47                         FCC 'G'
1974 FE59 47                         FCC 'G'
1975 FC68 F8 8C                      FDB GO
1975 FE5A F8 A5                      FDB GO
1976 FC6A 4C                         FCC 'L'
1976 FE5C 4C                         FCC 'L'
1977 FC6B F9 C5                      FDB LOAD
1977 FE5D FA 5E                      FDB LOAD
1978 FC6D 50                         FCC 'P'
1978 FE5F 50                         FCC 'P'
1979 FC6E FA 23                      FDB PUNCH
1979 FE60 FA BC                      FDB PUNCH
1980 FC70 4D                         FCC 'M'
1980 FE62 4D                         FCC 'M'
1981 FC71 F8 8F                      FDB MEMCHG
1981 FE63 F8 A8                      FDB MEMCHG
1982 FC73 52                         FCC 'R'
1982 FE65 52                         FCC 'R'
1983 FC74 FB 54                      FDB REGSTR
1983 FE66 FB ED                      FDB REGSTR
1984 FC76 53                         FCC 'S'
1984 FE68 53                         FCC 'S'
1985 FC77 F8 D8                      FDB DISSTK
1985 FE69 F8 F1                      FDB DISSTK
1986 FC79 58                         FCC 'X'
1986 FE6B 58                         FCC 'X'
1987 FC7A F9 6F                      FDB XBKPNT
1987 FE6C F9 88                      FDB XBKPNT
1988                                 IFD MFDCOPT
1988                                 IFD MFDCOPT
1989                                 FCC 'D'        ; *** SWTPC USES 'U' FOR MINIBOOT
1989                                 FCC 'D'        ; *** SWTPC USES 'U' FOR MINIBOOT
1990                                 FDB MINBOOT
1990                                 FDB MINBOOT
1991                                 ENDIF MFDCOPT
1991                                 ENDIF MFDCOPT
1991                                 ENDIF MFDCOPT
1991                                 ENDIF MFDCOPT
Line 3540... Line 3537...
1993                                 FCC 'D'        ; *** FPGA 8 BIT USES 'D' FOR CFBOOT
1993                                 FCC 'D'        ; *** FPGA 8 BIT USES 'D' FOR CFBOOT
1994                                 FDB CFBOOT
1994                                 FDB CFBOOT
1995                                 ENDIF CF8OPT
1995                                 ENDIF CF8OPT
1995                                 ENDIF CF8OPT
1995                                 ENDIF CF8OPT
1996                                 IFD IDEOPT
1996                                 IFD IDEOPT
1997                                 FCC 'D'        ; *** XESS FPGA 16 BIT IDE USES 'D' FOR IDEBOOT
1997 FE6E 44                         FCC 'D'        ; *** XESS FPGA 16 BIT IDE USES 'D' FOR IDEBOOT
1998                                 FDB IDEBOOT
1998 FE6F F9 D5                      FDB IDEBOOT
1999                                 ENDIF IDEOPT
 
1999                                 ENDIF IDEOPT
1999                                 ENDIF IDEOPT
2000                                 IFD DMAFOPT
2000                                 IFD DMAFOPT
2001                                 FCC 'U'        ; *** SWTPC USES 'D' FOR DMAF2 BOOT
2001                                 FCC 'U'        ; *** SWTPC USES 'D' FOR DMAF2 BOOT
2002                                 FDB DBOOT
2002                                 FDB DBOOT
2003                                 ENDIF DMAFOPT
2003                                 ENDIF DMAFOPT
2003                                 ENDIF DMAFOPT
2003                                 ENDIF DMAFOPT
2004                                 IFD EXTOPT
2004                                 IFD EXTOPT
2005                                 FCC 'U'        ; *** IF FPGA, 'U' IS FOR USER
2005 FE71 55                         FCC 'U'        ; *** IF FPGA, 'U' IS FOR USER
2006                                 FDB USRCMD
2006 FE72 FC 92                      FDB USRCMD
2007                                 ENDIF EXTOPT
 
2007                                 ENDIF EXTOPT
2007                                 ENDIF EXTOPT
2008                                 IFD RTCOPT
2008                                 IFD RTCOPT
2009                                 FCC 'T'
2009                                 FCC 'T'
2010                                 FDB TIMSET
2010                                 FDB TIMSET
2011                                 ENDIF RTCOPT
2011                                 ENDIF RTCOPT
Line 3565... Line 3560...
2013                                 FCC "T"
2013                                 FCC "T"
2014                                 FDB TRACE
2014                                 FDB TRACE
2015                                 ENDIF TRAOPT
2015                                 ENDIF TRAOPT
2015                                 ENDIF TRAOPT
2015                                 ENDIF TRAOPT
2016                         *
2016                         *
2017 FC7C                    TABEND  EQU *
2017 FE74                    TABEND  EQU *
2018                         *
2018                         *
2019                         * ** 6809 VECTOR ADDRESSES **
2019                         * ** 6809 VECTOR ADDRESSES **
2020                         *
2020                         *
2021                         * FOLLOWING ARE THE ADDRESSES OF THE VECTOR ROUTINES
2021                         * FOLLOWING ARE THE ADDRESSES OF THE VECTOR ROUTINES
2022                         * FOR THE 6809 PROCESSOR. DURING INITIALIZATION THEY
2022                         * FOR THE 6809 PROCESSOR. DURING INITIALIZATION THEY
2023                         * ARE RELOCATED TO RAM FROM $DFC0 TO $DFCF. THEY ARE
2023                         * ARE RELOCATED TO RAM FROM $DFC0 TO $DFCF. THEY ARE
2024                         * RELOCATED TO RAM SO THAT THE USER MAY REVECTOR TO
2024                         * RELOCATED TO RAM SO THAT THE USER MAY REVECTOR TO
2025                         * HIS OWN ROUTINES IF HE SO DESIRES.
2025                         * HIS OWN ROUTINES IF HE SO DESIRES.
2026                         *
2026                         *
2027                         *
2027                         *
2028 FC7C F9 7B              RAMVEC  FDB SWIE       ; USER-V
2028 FE74 F9 94              RAMVEC  FDB SWIE       ; USER-V
2029 FC7E F8 8E                      FDB RTI        ; SWI3-V
2029 FE76 F8 A7                      FDB RTI        ; SWI3-V
2030 FC80 F8 8E                      FDB RTI        ; SWI2-V
2030 FE78 F8 A7                      FDB RTI        ; SWI2-V
2031 FC82 F8 8E                      FDB RTI        ; FIRQ-V
2031 FE7A F8 A7                      FDB RTI        ; FIRQ-V
2032 FC84 F8 8E                      FDB RTI        ; IRQ-V
2032 FE7C F8 A7                      FDB RTI        ; IRQ-V
2033 FC86 F9 7B                      FDB SWIE       ; SWI-V
2033 FE7E F9 94                      FDB SWIE       ; SWI-V
2034 FC88 FF FF                      FDB $FFFF      ; SVC-VO
2034 FE80 FF FF                      FDB $FFFF      ; SVC-VO
2035 FC8A FF FF                      FDB $FFFF      ; SVC-VL
2035 FE82 FF FF                      FDB $FFFF      ; SVC-VL
2036                         *
2036                         *
2037                         * PRINTABLE MESSAGE STRINGS
2037                         * PRINTABLE MESSAGE STRINGS
2038                         *
2038                         *
2039 FC8C 0D 0A 00 00 00     MSG1    FCB  $D,$A,$0,$0,$0 * 0, CR/LF, 0
2039 FE84 0D 0A 00 00 00     MSG1    FCB  $D,$A,$0,$0,$0 * 0, CR/LF, 0
2040 FC91 53 79 73 30 39 42          FCC  'Sys09Bug 1.7 FOR '
2040 FE89 53 79 73 30 39 42          FCC  'Sys09Bug 1.7 FOR '
          75 67 20 31 2E 37
          75 67 20 31 2E 37
          20 46 4F 52 20
          20 46 4F 52 20
2041                                 IFD  SWTOPT
2041                                 IFD  SWTOPT
2042                                 FCC  'SWTPC'
2042                                 FCC  'SWTPC'
2043                                 ENDIF SWTOPT
2043                                 ENDIF SWTOPT
Line 3619... Line 3614...
2058                                 ENDIF S3EOPT
2058                                 ENDIF S3EOPT
2059                                 IFD  XESOPT
2059                                 IFD  XESOPT
2060                                 FCC  'XESS'
2060                                 FCC  'XESS'
2061                                 ENDIF XESOPT
2061                                 ENDIF XESOPT
2061                                 ENDIF XESOPT
2061                                 ENDIF XESOPT
2062                                 IFD  ATLYSOPT
2062                                 IFD  ATLOPT
2063                                 FCC  'Atlys'
2063 FE9A 41 74 6C 79 73             FCC  'Atlys'
2064                                 ENDIF ATLYSOPT
2064                                 ENDIF ATLOPT
2064                                 ENDIF ATLYSOPT
 
2065                                 IFD  DE270OPT
2065                                 IFD  DE270OPT
2066                                 FCC  'DE2-70'
2066                                 FCC  'DE2-70'
2067                                 ENDIF DE270OPT
2067                                 ENDIF DE270OPT
2067                                 ENDIF DE270OPT
2067                                 ENDIF DE270OPT
2068 FCA2 20 2D 20                   FCC ' - '
2068 FE9F 20 2D 20                   FCC ' - '
2069 FCA5 04                         FCB 4
2069 FEA2 04                         FCB 4
2070 FCA6 4B 0D 0A 00 00 00  MSG2    FCB 'K,$0D,$0A,$00,$00,$00,$04 ; K,,,3 NULS,
2070 FEA3 4B 0D 0A 00 00 00  MSG2    FCB 'K,$0D,$0A,$00,$00,$00,$04 ; K,,,3 NULS,
          04
          04
2071 FCAD 3E                 MSG3    FCC '>'
2071 FEAA 3E                 MSG3    FCC '>'
2072 FCAE 04                         FCB 4
2072 FEAB 04                         FCB 4
2073 FCAF 57 48 41 54 3F     MSG4    FCC 'WHAT?'
2073 FEAC 57 48 41 54 3F     MSG4    FCC 'WHAT?'
2074 FCB4 04                         FCB 4
2074 FEB1 04                         FCB 4
2075 FCB5 20 2D 20           MSG5    FCC ' - '
2075 FEB2 20 2D 20           MSG5    FCC ' - '
2076 FCB8 04                         FCB 4'
2076 FEB5 04                         FCB 4'
2077 FCB9 20 20 53 50 3D     MSG10   FCC '  SP='
2077 FEB6 20 20 53 50 3D     MSG10   FCC '  SP='
2078 FCBE 04                         FCB 4
2078 FEBB 04                         FCB 4
2079 FCBF 20 20 50 43 3D     MSG11   FCC '  PC='
2079 FEBC 20 20 50 43 3D     MSG11   FCC '  PC='
2080 FCC4 04                         FCB 4
2080 FEC1 04                         FCB 4
2081 FCC5 20 20 55 53 3D     MSG12   FCC '  US='
2081 FEC2 20 20 55 53 3D     MSG12   FCC '  US='
2082 FCCA 04                         FCB 4
2082 FEC7 04                         FCB 4
2083 FCCB 20 20 49 59 3D     MSG13   FCC '  IY='
2083 FEC8 20 20 49 59 3D     MSG13   FCC '  IY='
2084 FCD0 04                         FCB 4
2084 FECD 04                         FCB 4
2085 FCD1 20 20 49 58 3D     MSG14   FCC '  IX='
2085 FECE 20 20 49 58 3D     MSG14   FCC '  IX='
2086 FCD6 04                         FCB 4
2086 FED3 04                         FCB 4
2087 FCD7 20 20 44 50 3D     MSG15   FCC '  DP='
2087 FED4 20 20 44 50 3D     MSG15   FCC '  DP='
2088 FCDC 04                         FCB 4
2088 FED9 04                         FCB 4
2089 FCDD 20 20 41 3D        MSG16   FCC '  A='
2089 FEDA 20 20 41 3D        MSG16   FCC '  A='
2090 FCE1 04                         FCB 4
2090 FEDE 04                         FCB 4
2091 FCE2 20 20 42 3D        MSG17   FCC '  B='
2091 FEDF 20 20 42 3D        MSG17   FCC '  B='
2092 FCE6 04                         FCB 4
2092 FEE3 04                         FCB 4
2093 FCE7 20 20 43 43 3A 20  MSG18   FCC '  CC: '
2093 FEE4 20 20 43 43 3A 20  MSG18   FCC '  CC: '
2094 FCED 04                         FCB 4
2094 FEEA 04                         FCB 4
2095 FCEE 45 46 48 49 4E 5A  MSG19   FCC 'EFHINZVC'
2095 FEEB 45 46 48 49 4E 5A  MSG19   FCC 'EFHINZVC'
          56 43
          56 43
2096 FCF6 53 31              MSG20   FCC 'S1'
2096 FEF3 53 31              MSG20   FCC 'S1'
2097 FCF8 04                         FCB 4
2097 FEF5 04                         FCB 4
2098                                 IFD DATOPT
2098                                 IFD DATOPT
2099                         *
2099                         *
2100                         * POWER UP/ RESET/ NMI ENTRY POINT
2100                         * POWER UP/ RESET/ NMI ENTRY POINT
2101                         *
2101                         *
2102                                 ORG $FF00
2102 FF00                            ORG $FF00
2103                         *
2103                         *
2104                         *
2104                         *
2105                         START   LDX  #IC11    ; POINT TO DAT RAM IC11
2105 FF00 8E FF F0           START   LDX  #IC11    ; POINT TO DAT RAM IC11
2106                                 LDA  #$0F     ; GET COMPLIMENT OF ZERO
2106 FF03 86 0F                      LDA  #$0F     ; GET COMPLIMENT OF ZERO
2107                         *
2107                         *
2108                         *
2108                         *
2109                         * INITIALIZE DAT RAM --- LOADS $F-$0 IN LOCATIONS $0-$F
2109                         * INITIALIZE DAT RAM --- LOADS $F-$0 IN LOCATIONS $0-$F
2110                         * OF DAT RAM, THUS STORING COMPLEMENT OF MSB OF ADDRESS
2110                         * OF DAT RAM, THUS STORING COMPLEMENT OF MSB OF ADDRESS
2111                         * IN THE DAT RAM. THE COMPLEMENT IS REQUIRED BECAUSE THE
2111                         * IN THE DAT RAM. THE COMPLEMENT IS REQUIRED BECAUSE THE
2112                         * OUTPUT OF IC11, A 74S189, IS THE INVERSE OF THE DATA
2112                         * OUTPUT OF IC11, A 74S189, IS THE INVERSE OF THE DATA
2113                         * STORED IN IT.
2113                         * STORED IN IT.
2114                         *
2114                         *
2115                         *
2115                         *
2116                         DATLP   STA  ,X+       ; STORE & POINT TO NEXT RAM LOCATION
2116 FF05 A7 80              DATLP   STA  ,X+       ; STORE & POINT TO NEXT RAM LOCATION
2117                                 DECA           ; GET COMP. VALUE FOR NEXT LOCATION
2117 FF07 4A                         DECA           ; GET COMP. VALUE FOR NEXT LOCATION
2118                                 BNE  DATLP     ; ALL 16 LOCATIONS INITIALIZED ?
2118 FF08 26 FB                      BNE  DATLP     ; ALL 16 LOCATIONS INITIALIZED ?
2119                         *
2119                         *
2120                         * NOTE: IX NOW CONTAINS $0000, DAT RAM IS NO LONGER
2120                         * NOTE: IX NOW CONTAINS $0000, DAT RAM IS NO LONGER
2121                         *       ADDRESSED, AND LOGICAL ADDRESSES NOW EQUAL
2121                         *       ADDRESSED, AND LOGICAL ADDRESSES NOW EQUAL
2122                         *       PHYSICAL ADDRESSES.
2122                         *       PHYSICAL ADDRESSES.
2123                         *
2123                         *
2124                                 LDA  #$F0
2124 FF0A 86 F0                      LDA  #$F0
2125                                 STA  ,X        ; STORE $F0 AT $FFFF
2125 FF0C A7 84                      STA  ,X        ; STORE $F0 AT $FFFF
2126                                 LDX  #$D0A0    ; ASSUME RAM TO BE AT $D000-$DFFF
2126 FF0E 8E D0 A0                   LDX  #$D0A0    ; ASSUME RAM TO BE AT $D000-$DFFF
2127                                 LDY  #TSTPAT   ; LOAD TEST DATA PATTERN INTO "Y"
2127 FF11 10 8E 55 AA                LDY  #TSTPAT   ; LOAD TEST DATA PATTERN INTO "Y"
2128                         TSTRAM  LDU  ,X        ; SAVE DATA FROM TEST LOCATION
2128 FF15 EE 84              TSTRAM  LDU  ,X        ; SAVE DATA FROM TEST LOCATION
2129                                 STY  ,X        ; STORE TEST PATTERN AT $D0A0
2129 FF17 10 AF 84                   STY  ,X        ; STORE TEST PATTERN AT $D0A0
2130                                 CMPY ,X        ; IS THERE RAM AT THIS LOCATION ?
2130 FF1A 10 AC 84                   CMPY ,X        ; IS THERE RAM AT THIS LOCATION ?
2131                                 BEQ  CNVADR    ; IF MATCH THERE'S RAM, SO SKIP
2131 FF1D 27 0B                      BEQ  CNVADR    ; IF MATCH THERE'S RAM, SO SKIP
2132                                 LEAX -$1000,X  ; ELSE POINT 4K LOWER
2132 FF1F 30 89 F0 00                LEAX -$1000,X  ; ELSE POINT 4K LOWER
2133                                 CMPX #$F0A0    ; DECREMENTED PAST ZER0 YET ?
2133 FF23 8C F0 A0                   CMPX #$F0A0    ; DECREMENTED PAST ZER0 YET ?
2134                                 BNE  TSTRAM    ; IF NOT CONTINUE TESTING FOR RAM
2134 FF26 26 ED                      BNE  TSTRAM    ; IF NOT CONTINUE TESTING FOR RAM
2135                                 BRA  START     ; ELSE START ALL OVER AGAIN
2135 FF28 20 D6                      BRA  START     ; ELSE START ALL OVER AGAIN
2136                         *
2136                         *
2137                         *
2137                         *
2138                         * THE FOLLOWING CODE STORES THE COMPLEMENT OF
2138                         * THE FOLLOWING CODE STORES THE COMPLEMENT OF
2139                         * THE MS CHARACTER OF THE FOUR CHARACTER HEX
2139                         * THE MS CHARACTER OF THE FOUR CHARACTER HEX
2140                         * ADDRESS OF THE FIRST 4K BLOCK OF RAM LOCATED
2140                         * ADDRESS OF THE FIRST 4K BLOCK OF RAM LOCATED
Line 3721... Line 3715...
2155                         * IS AT $D--- SINCE THAT IS THE ADDRESS THE
2155                         * IS AT $D--- SINCE THAT IS THE ADDRESS THE
2156                         * 6809 WILL BE OUTPUTING WHEN THAT 4K BLOCK
2156                         * 6809 WILL BE OUTPUTING WHEN THAT 4K BLOCK
2157                         * OF RAM RESPONDS.
2157                         * OF RAM RESPONDS.
2158                         *
2158                         *
2159                         *
2159                         *
2160                         CNVADR  STU  ,X        ; RESTORE DATA AT TEST LOCATION
2160 FF2A EF 84              CNVADR  STU  ,X        ; RESTORE DATA AT TEST LOCATION
2161                                 TFR  X,D       ; PUT ADDR. OF PRESENT 4K BLOCK IN D
2161 FF2C 1F 10                      TFR  X,D       ; PUT ADDR. OF PRESENT 4K BLOCK IN D
2162                                 COMA           ; COMPLEMENT MSB OF THAT ADDRESS
2162 FF2E 43                         COMA           ; COMPLEMENT MSB OF THAT ADDRESS
2163                                 LSRA           ; PUT MS 4 BITS OF ADDRESS IN
2163 FF2F 44                         LSRA           ; PUT MS 4 BITS OF ADDRESS IN
2164                                 LSRA           ; LOCATION D0-D3 TO ALLOW STORING
2164 FF30 44                         LSRA           ; LOCATION D0-D3 TO ALLOW STORING
2165                                 LSRA           ; IT IN THE DYNAMIC ADDRESS
2165 FF31 44                         LSRA           ; IT IN THE DYNAMIC ADDRESS
2166                                 LSRA           ; TRANSLATION RAM.
2166 FF32 44                         LSRA           ; TRANSLATION RAM.
2167                                 STA  $FFFD     ; STORE XLATION FACTOR IN DAT "D"
2167 FF33 B7 FF FD                   STA  $FFFD     ; STORE XLATION FACTOR IN DAT "D"
2168                         *
2168                         *
2169                                 LDS  #STACK    ; INITIALIZE STACK POINTER
2169 FF36 10 CE DF C0                LDS  #STACK    ; INITIALIZE STACK POINTER
2170                         *
2170                         *
2171                         *
2171                         *
2172                         * THE FOLLOWING CHECKS TO FIND THE REAL PHYSICAL ADDRESSES
2172                         * THE FOLLOWING CHECKS TO FIND THE REAL PHYSICAL ADDRESSES
2173                         * OF ALL 4K BLKS OF RAM IN THE SYSTEM. WHEN EACH 4K BLK
2173                         * OF ALL 4K BLKS OF RAM IN THE SYSTEM. WHEN EACH 4K BLK
2174                         * OF RAM IS LOCATED, THE COMPLEMENT OF IT'S REAL ADDRESS
2174                         * OF RAM IS LOCATED, THE COMPLEMENT OF IT'S REAL ADDRESS
Line 3764... Line 3758...
2198                         *
2198                         *
2199                         *  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
2199                         *  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
2200                         * 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K -- -- 4K 4K -- --
2200                         * 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K -- -- 4K 4K -- --
2201                         *
2201                         *
2202                         *
2202                         *
2203                                 LDY  #LRARAM   ; POINT TO LOGICAL/REAL ADDR. TABLE
2203 FF3A 10 8E DF D0                LDY  #LRARAM   ; POINT TO LOGICAL/REAL ADDR. TABLE
2204                                 STA  13,Y      ; STORE $D--- XLATION FACTOR AT $DFDD
2204 FF3E A7 2D                      STA  13,Y      ; STORE $D--- XLATION FACTOR AT $DFDD
2205                                 CLR  14,Y      ; CLEAR $DFDE
2205 FF40 6F 2E                      CLR  14,Y      ; CLEAR $DFDE
2206                                 LDA  #$F0      ; DESTINED FOR IC8 AN MEM EXPANSION ?
2206 FF42 86 F0                      LDA  #$F0      ; DESTINED FOR IC8 AN MEM EXPANSION ?
2207                                 STA  15,Y      ; STORE AT $DFDF
2207 FF44 A7 2F                      STA  15,Y      ; STORE AT $DFDF
2208                                 LDA  #$0C      ; PRESET NUMBER OF BYTES TO CLEAR
2208 FF46 86 0C                      LDA  #$0C      ; PRESET NUMBER OF BYTES TO CLEAR
2209                         CLRLRT  CLR  A,Y       ; CLEAR $DFDC THRU $DFD0
2209 FF48 6F A6              CLRLRT  CLR  A,Y       ; CLEAR $DFDC THRU $DFD0
2210                                 DECA           ; SUB. 1 FROM BYTES LEFT TO CLEAR
2210 FF4A 4A                         DECA           ; SUB. 1 FROM BYTES LEFT TO CLEAR
2211                                 BPL  CLRLRT    ; CONTINUE IF NOT DONE CLEARING
2211 FF4B 2A FB                      BPL  CLRLRT    ; CONTINUE IF NOT DONE CLEARING
2212                         FNDRAM  LEAX -$1000,X  ; POINT TO NEXT LOWER 4K OF RAM
2212 FF4D 30 89 F0 00        FNDRAM  LEAX -$1000,X  ; POINT TO NEXT LOWER 4K OF RAM
2213                                 CMPX #$F0A0    ; TEST FOR DECREMENT PAST ZERO
2213 FF51 8C F0 A0                   CMPX #$F0A0    ; TEST FOR DECREMENT PAST ZERO
2214                                 BEQ  FINTAB    ; SKIP IF FINISHED
2214 FF54 27 22                      BEQ  FINTAB    ; SKIP IF FINISHED
2215                                 LDU  ,X        ; SAVE DATA AT CURRENT TEST LOCATION
2215 FF56 EE 84                      LDU  ,X        ; SAVE DATA AT CURRENT TEST LOCATION
2216                                 LDY  #TSTPAT   ; LOAD TEST DATA PATTERN INTO Y REG.
2216 FF58 10 8E 55 AA                LDY  #TSTPAT   ; LOAD TEST DATA PATTERN INTO Y REG.
2217                                 STY  ,X        ; STORE TEST PATT. INTO RAM TEST LOC.
2217 FF5C 10 AF 84                   STY  ,X        ; STORE TEST PATT. INTO RAM TEST LOC.
2218                                 CMPY ,X        ; VERIFY RAM AT TEST LOCATION
2218 FF5F 10 AC 84                   CMPY ,X        ; VERIFY RAM AT TEST LOCATION
2219                                 BNE  FNDRAM    ; IF NO RAM GO LOOK 4K LOWER
2219 FF62 26 E9                      BNE  FNDRAM    ; IF NO RAM GO LOOK 4K LOWER
2220                                 STU  ,X        ; ELSE RESTORE DATA TO TEST LOCATION
2220 FF64 EF 84                      STU  ,X        ; ELSE RESTORE DATA TO TEST LOCATION
2221                                 LDY  #LRARAM   ; POINT TO LOGICAL/REAL ADDR. TABLE
2221 FF66 10 8E DF D0                LDY  #LRARAM   ; POINT TO LOGICAL/REAL ADDR. TABLE
2222                                 TFR  X,D       ; PUT ADDR. OF PRESENT 4K BLOCK IN D
2222 FF6A 1F 10                      TFR  X,D       ; PUT ADDR. OF PRESENT 4K BLOCK IN D
2223                                 LSRA           ; PUT MS 4 BITS OF ADDR. IN LOC. D0-D3
2223 FF6C 44                         LSRA           ; PUT MS 4 BITS OF ADDR. IN LOC. D0-D3
2224                                 LSRA           ; TO ALLOW STORING IT IN THE DAT RAM.
2224 FF6D 44                         LSRA           ; TO ALLOW STORING IT IN THE DAT RAM.
2225                                 LSRA
2225 FF6E 44                         LSRA
2226                                 LSRA
2226 FF6F 44                         LSRA
2227                                 TFR  A,B       ; SAVE OFFSET INTO LRARAM TABLE
2227 FF70 1F 89                      TFR  A,B       ; SAVE OFFSET INTO LRARAM TABLE
2228                                 EORA #$0F      ; INVERT MSB OF ADDR. OF CURRENT 4K BLK
2228 FF72 88 0F                      EORA #$0F      ; INVERT MSB OF ADDR. OF CURRENT 4K BLK
2229                                 STA  B,Y       ; SAVE TRANSLATION FACTOR IN LRARAM TABLE
2229 FF74 A7 A5                      STA  B,Y       ; SAVE TRANSLATION FACTOR IN LRARAM TABLE
2230                                 BRA  FNDRAM    ; GO TRANSLATE ADDR. OF NEXT 4K BLK
2230 FF76 20 D5                      BRA  FNDRAM    ; GO TRANSLATE ADDR. OF NEXT 4K BLK
2231                         FINTAB  LDA  #$F1      ; DESTINED FOR IC8 AND MEM EXPANSION ?
2231 FF78 86 F1              FINTAB  LDA  #$F1      ; DESTINED FOR IC8 AND MEM EXPANSION ?
2232                                 LDY  #LRARAM   ; POINT TO LRARAM TABLE
2232 FF7A 10 8E DF D0                LDY  #LRARAM   ; POINT TO LRARAM TABLE
2233                                 STA  14,Y      ; STORE $F1 AT $DFCE
2233 FF7E A7 2E                      STA  14,Y      ; STORE $F1 AT $DFCE
2234                         *
2234                         *
2235                         * THE FOLLOWING CHECKS TO SEE IF THERE IS A 4K BLK OF
2235                         * THE FOLLOWING CHECKS TO SEE IF THERE IS A 4K BLK OF
2236                         * RAM LOCATED AT $C000-$CFFF. IF NONE THERE IT LOCATES
2236                         * RAM LOCATED AT $C000-$CFFF. IF NONE THERE IT LOCATES
2237                         * THE NEXT LOWER 4K BLK AN XLATES ITS ADDR SO IT
2237                         * THE NEXT LOWER 4K BLK AN XLATES ITS ADDR SO IT
2238                         * LOGICALLY RESPONDS TO THE ADDRESS $C---.
2238                         * LOGICALLY RESPONDS TO THE ADDRESS $C---.
2239                         *
2239                         *
2240                         *
2240                         *
2241                                 LDA  #$0C      ; PRESET NUMBER HEX "C"
2241 FF80 86 0C                      LDA  #$0C      ; PRESET NUMBER HEX "C"
2242                         FINDC   LDB  A,Y       ; GET ENTRY FROM LRARAM TABLE
2242 FF82 E6 A6              FINDC   LDB  A,Y       ; GET ENTRY FROM LRARAM TABLE
2243                                 BNE  FOUNDC    ; BRANCH IF RAM THIS PHYSICAL ADDR.
2243 FF84 26 05                      BNE  FOUNDC    ; BRANCH IF RAM THIS PHYSICAL ADDR.
2244                                 DECA           ; ELSE POINT 4K LOWER
2244 FF86 4A                         DECA           ; ELSE POINT 4K LOWER
2245                                 BPL  FINDC     ; GO TRY AGAIN
2245 FF87 2A F9                      BPL  FINDC     ; GO TRY AGAIN
2246                                 BRA  XFERTF
2246 FF89 20 14                      BRA  XFERTF
2247                         FOUNDC  CLR  A,Y       ; CLR XLATION FACTOR OF 4K BLOCK FOUND
2247 FF8B 6F A6              FOUNDC  CLR  A,Y       ; CLR XLATION FACTOR OF 4K BLOCK FOUND
2248                                 STB  $0C,Y     ; GIVE IT XLATION FACTOR MOVING IT TO $C---
2248 FF8D E7 2C                      STB  $0C,Y     ; GIVE IT XLATION FACTOR MOVING IT TO $C---
2249                         *
2249                         *
2250                         * THE FOLLOWING CODE ADJUSTS THE TRANSLATION
2250                         * THE FOLLOWING CODE ADJUSTS THE TRANSLATION
2251                         * FACTORS SUCH THAT ALL REMAINING RAM WILL
2251                         * FACTORS SUCH THAT ALL REMAINING RAM WILL
2252                         * RESPOND TO A CONTIGUOUS BLOCK OF LOGICAL
2252                         * RESPOND TO A CONTIGUOUS BLOCK OF LOGICAL
2253                         * ADDRESSES FROM $0000 AND UP....
2253                         * ADDRESSES FROM $0000 AND UP....
2254                         *
2254                         *
2255                                 CLRA           ; START AT ZERO
2255 FF8F 4F                         CLRA           ; START AT ZERO
2256                                 TFR  Y,X       ; START POINTER "X" START OF "LRARAM" TABLE.
2256 FF90 1F 21                      TFR  Y,X       ; START POINTER "X" START OF "LRARAM" TABLE.
2257                         COMPRS  LDB  A,Y       ; GET ENTRY FROM "LRARAM" TABLE
2257 FF92 E6 A6              COMPRS  LDB  A,Y       ; GET ENTRY FROM "LRARAM" TABLE
2258                                 BEQ  PNTNXT    ; IF IT'S ZER0 SKIP
2258 FF94 27 04                      BEQ  PNTNXT    ; IF IT'S ZER0 SKIP
2259                                 CLR  A,Y       ; ELSE ERASE FROM TABLE
2259 FF96 6F A6                      CLR  A,Y       ; ELSE ERASE FROM TABLE
2260                                 STB  ,X+       ; AND ENTER ABOVE LAST ENTRY- BUMP
2260 FF98 E7 80                      STB  ,X+       ; AND ENTER ABOVE LAST ENTRY- BUMP
2261                         PNTNXT  INCA           ; GET OFFSET TO NEXT ENTRY
2261 FF9A 4C                 PNTNXT  INCA           ; GET OFFSET TO NEXT ENTRY
2262                                 CMPA #$0C      ; LAST ENTRY YET ?
2262 FF9B 81 0C                      CMPA #$0C      ; LAST ENTRY YET ?
2263                                 BLT  COMPRS
2263 FF9D 2D F3                      BLT  COMPRS
2264                         *
2264                         *
2265                         * THE FOLLOWING CODE TRANSFER THE TRANSLATION
2265                         * THE FOLLOWING CODE TRANSFER THE TRANSLATION
2266                         * FACTORS FROM THE LRARAM TABLE TO IC11 ON
2266                         * FACTORS FROM THE LRARAM TABLE TO IC11 ON
2267                         * THE MP-09 CPU CARD.
2267                         * THE MP-09 CPU CARD.
2268                         *
2268                         *
2269                         XFERTF  LDX  #IC11     ; POINT TO DAT RAM IC11
2269 FF9F 8E FF F0           XFERTF  LDX  #IC11     ; POINT TO DAT RAM IC11
2270                                 LDB  #$10      ; GET NO. OF BYTES TO MOVE
2270 FFA2 C6 10                      LDB  #$10      ; GET NO. OF BYTES TO MOVE
2271                         FETCH   LDA  ,Y+       ; GET BYTE AND POINT TO NEXT
2271 FFA4 A6 A0              FETCH   LDA  ,Y+       ; GET BYTE AND POINT TO NEXT
2272                                 STA  ,X+       ; POKE XLATION FACTOR IN IC11
2272 FFA6 A7 80                      STA  ,X+       ; POKE XLATION FACTOR IN IC11
2273                                 DECB           ; SUB 1 FROM BYTES TO MOVE
2273 FFA8 5A                         DECB           ; SUB 1 FROM BYTES TO MOVE
2274                                 BNE  FETCH     ; CONTINUE UNTIL 16 MOVED
2274 FFA9 26 F9                      BNE  FETCH     ; CONTINUE UNTIL 16 MOVED
2275                         *
2275                         *
2276                                 ELSE
2276                                 ELSE
2277 FCF9 39                 LRA     RTS
2277                         LRA     RTS
2278 FCFA 10 CE DF C0        START   LDS  #STACK    ; INITIALIZE STACK POINTER
2278                         START   LDS  #STACK    ; INITIALIZE STACK POINTER
2279 FCFE 5F                         CLRB
2279                                 CLRB
 
2280                                 ENDIF DATOPT
2280                                 ENDIF DATOPT
2280                                 ENDIF DATOPT
2281                         *
2281                         *
2282 FCFF 53                         COMB           ; SET "B" NON-ZERO
2282 FFAB 53                         COMB           ; SET "B" NON-ZERO
2283 FD00 F7 DF D2                   STB  ECHO      ; TURN ON ECHO FLAG
2283 FFAC F7 DF E2                   STB  ECHO      ; TURN ON ECHO FLAG
2284 FD03 16 FB 0E                   LBRA MONITOR   ; INITIALIZATION IS COMPLETE
2284 FFAF 16 F8 62                   LBRA MONITOR   ; INITIALIZATION IS COMPLETE
2285                         *
2285                         *
2286                         ** INTERRUPT JUMP VECTORS
2286                         ** INTERRUPT JUMP VECTORS
2287                         *
2287                         *
2288 FD06 6E 9F DF C0        V1      JMP  [STACK]
2288 FFB2 6E 9F DF C0        V1      JMP  [STACK]
2289 FD0A 6E 9F DF C4        V2      JMP  [SWI2]
2289 FFB6 6E 9F DF C4        V2      JMP  [SWI2]
2290 FD0E 6E 9F DF C6        V3      JMP  [FIRQ]
2290 FFBA 6E 9F DF C6        V3      JMP  [FIRQ]
2291 FD12 6E 9F DF C8        V4      JMP  [IRQ]
2291 FFBE 6E 9F DF C8        V4      JMP  [IRQ]
2292 FD16 6E 9F DF CA        V5      JMP  [SWI]
2292 FFC2 6E 9F DF CA        V5      JMP  [SWI]
2293                         *
2293                         *
2294                         * SWI3 ENTRY POINT
2294                         * SWI3 ENTRY POINT
2295                         *
2295                         *
2296 FD1A 1F 43              SWI3E   TFR  S,U
2296 FFC6 1F 43              SWI3E   TFR  S,U
2297 FD1C AE 4A                      LDX  10,U      *$FFC8
2297 FFC8 AE 4A                      LDX  10,U      *$FFC8
2298 FD1E E6 80                      LDB  ,X+
2298 FFCA E6 80                      LDB  ,X+
2299 FD20 AF 4A                      STX  10,U
2299 FFCC AF 4A                      STX  10,U
2300 FD22 4F                         CLRA
2300 FFCE 4F                         CLRA
2301 FD23 58                         ASLB
2301 FFCF 58                         ASLB
2302 FD24 49                         ROLA
2302 FFD0 49                         ROLA
2303 FD25 BE DF CC                   LDX  SVCVO
2303 FFD1 BE DF CC                   LDX  SVCVO
2304 FD28 8C FF FF                   CMPX #$FFFF
2304 FFD4 8C FF FF                   CMPX #$FFFF
2305 FD2B 27 0F                      BEQ  SWI3Z
2305 FFD7 27 0F                      BEQ  SWI3Z
2306 FD2D 30 8B                      LEAX D,X
2306 FFD9 30 8B                      LEAX D,X
2307 FD2F BC DF CE                   CMPX SVCVL
2307 FFDB BC DF CE                   CMPX SVCVL
2308 FD32 22 08                      BHI  SWI3Z
2308 FFDE 22 08                      BHI  SWI3Z
2309 FD34 34 10                      PSHS X
2309 FFE0 34 10                      PSHS X
2310 FD36 EC C4                      LDD  ,U
2310 FFE2 EC C4                      LDD  ,U
2311 FD38 AE 44                      LDX  4,U
2311 FFE4 AE 44                      LDX  4,U
2312 FD3A 6E F1                      JMP  [,S++]
2312 FFE6 6E F1                      JMP  [,S++]
2313 FD3C 37 1F              SWI3Z   PULU A,B,X,CC,DP
2313 FFE8 37 1F              SWI3Z   PULU A,B,X,CC,DP
2314 FD3E EE 42                      LDU  2,U
2314 FFEA EE 42                      LDU  2,U
2315 FD40 6E 9F DF C2                JMP  [SWI3]
2315 FFEC 6E 9F DF C2                JMP  [SWI3]
2316                         *
2316                         *
2317                         * 6809 VECTORS
2317                         * 6809 VECTORS
2318                         *
2318                         *
2319 FFF0                            ORG $FFF0
2319 FFF0                            ORG $FFF0
2320 FFF0 FD 06                      FDB V1    USER-V
2320 FFF0 FF B2                      FDB V1    USER-V
2321 FFF2 FD 1A                      FDB SWI3E SWI3-V
2321 FFF2 FF C6                      FDB SWI3E SWI3-V
2322 FFF4 FD 0A                      FDB V2    SWI2-V
2322 FFF4 FF B6                      FDB V2    SWI2-V
2323 FFF6 FD 0E                      FDB V3    FIRQ-V
2323 FFF6 FF BA                      FDB V3    FIRQ-V
2324 FFF8 FD 12                      FDB V4    IRQ-V
2324 FFF8 FF BE                      FDB V4    IRQ-V
2325 FFFA FD 16                      FDB V5    SWI-V
2325 FFFA FF C2                      FDB V5    SWI-V
2326 FFFC FD 06                      FDB V1    NMI-V
2326 FFFC FF B2                      FDB V1    NMI-V
2327 FFFE FC FA                      FDB START RESTART-V
2327 FFFE FF 00                      FDB START RESTART-V
0005                                 END START
0005                                 END START
0006                          END
0006                          END
Program + Init Data = 2898 bytes
Program + Init Data = 3583 bytes
Error count = 0
Error count = 0
 
 


ACIAC1     0000
ACIAC1     E000
ACIAD1     0001
ACIAD1     E001
ACINIZ     FC36
ACIAOPT    00FF
ACIRST     01F7
ACIAS      E000
 
ACINIZ     FCF9
 
ACIRST     F1FC
ACK        0006
ACK        0006
AJDUMP     F8F0
AJDUMP     F909
ALTAD      FAE5
ALTAD      FB7E
ALTBD      FADA
ALTBD      FB73
ALTCCD     FAF2
ALTCCD     FB8B
ALTDPD     FACF
ALTDPD     FB68
ALTPC1     FA9B
ALTPC1     FB34
ALTPCD     FAA3
ALTPCD     FB3C
ALTRA      FADB
ALTRA      FB74
ALTRB      FAD0
ALTRB      FB69
ALTRCC     FAE6
ALTRCC     FB7F
ALTRDP     FAC5
ALTRDP     FB5E
ALTRPC     FA98
ALTRPC     FB31
ALTRU      FAA4
ALTRU      FB3D
ALTRX      FABA
ALTRX      FB53
ALTRY      FAAF
ALTRY      FB48
ALTUD      FAAE
ALTUD      FB47
ALTXD      FAC4
ALTXD      FB5D
ALTYD      FAB9
ALTYD      FB52
AOUTCH     FC21
AOUTCH     FCE2
ATLOPT     00FF
ATLOPT     00FF
BACK       F8D4
AUXRESET   0006
BIASCI     FBE4
AUXRSTREL  0002
 
BACK       F8ED
 
BACKSP     FD80
 
BIASCI     FC7D
BLKNUM     0104
BLKNUM     0104
BLOAD0     070D
BLOAD0     F70D
BLOAD1     071B
BLOAD1     F71B
BLOAD2     0731
BLOAD2     F731
BLOAD3     0745
BLOAD3     F745
BOOT       0700
BOOT       F700
BPADJ      F9B9
BPADJ      F9D2
BPERR      F967
BPERR      F980
BPTBL      DFD3
BPTBL      DFE3
BPTEST     F9A9
BPTEST     F9C2
BRKPNT     F943
BRKPNT     F95C
BSSTACK    C0FF
BSSTACK    C0FF
BUFFER     0200
BUFFER     0200
 
BUSY       0080
BYTCNT     0105
BYTCNT     0105
BYTE       FB8D
BYTE       FC26
CAN        0018
CAN        0018
CFLAG      0001
CFLAG      0001
CHANGE     F8C2
CF_AUX     E11E
CHKDRV     053B
CF_BASE    E100
 
CF_COMAND  E10E
 
CF_CYLHI   E10A
 
CF_CYLLO   E108
 
CF_DATA    E100
 
CF_ERROR   E102
 
CF_FEATURE E102
 
CF_HEAD    E10C
 
CF_SECCNT  E104
 
CF_SECNUM  E106
 
CF_STATUS  E10E
 
CHANGE     F8DB
 
CHKDRV     F546
CHKSUM     0103
CHKSUM     0103
CHRTN      F8C1
CHRIGHT    FD88
 
CHRTN      F8DA
 
CLRESC     FDAE
 
CLRLRT     FF48
 
CLRSCR     FDD2
CLRSTK     F82F
CLRSTK     F82F
CPORT      DFD0
CMDREAD    0020
 
CMDWRITE   0030
 
CNVADR     FF2A
 
COLADX     DFFB
 
COMPRS     FF92
 
CONTRL     FD48
 
CPORT      DFE0
 
CRETN      FDE9
 
DATLP      FF05
 
DATOPT     00FF
DELCNT     0108
DELCNT     0108
DELCON     04E2
DELCON     04E2
DFL1       0115
DFL1       F119
DFL2       0122
DFL2       F126
DFL3       0136
DFL3       F13A
DFL4       01A0
DFL4       F1A4
DISFOS     0085
DISFOS     F089
DISSTK     F8D8
DISSTK     F8F1
DLY        F9BC
DLY        FA55
DNS        0707
DNS        F707
DRNUM      070C
DRDY       0040
 
DRNUM      F70C
 
DRQ        0008
DRVNUM     0100
DRVNUM     0100
DRVS2      0536
DRVS2      F541
DRVSEL     052F
DRVSEL     F53A
ECHO       DFD2
ECHO       DFE2
ECHON      FBF9
ECHON      FC96
EDPASC     F92F
EDPASC     F948
EDPRTN     F8EF
EDPRTN     F908
EDUMP      F90B
EDUMP      F924
EFLAG      0080
EFLAG      0080
ELOOP      F91D
ELOOP      F936
EOT        0004
EOT        0004
EXITBP     F966
ERR        0001
EXTEND     0035
ESCAPE     FD97
EXTTAB     002C
ESCCL1     FDDC
FETSTA     FC26
ESCCLL     FDD7
 
ESCCLS     FE10
 
ESCCLS1    FE15
 
ESCCLS2    FE31
 
ESCCU1     FDBB
 
ESCCU2     FDC4
 
ESCCUR     FDB2
 
ESCFLG     DFFE
 
EXITBP     F97F
 
EXTCMD     0000
 
EXTEND     F035
 
EXTOPT     00FF
 
EXTTAB     F02C
 
FETCH      FFA4
 
FETSTA     FCE7
FFLAG      0040
FFLAG      0040
FFSTBL     F9A0
FFSTBL     F9B9
 
FINDC      FF82
 
FINTAB     FF78
FIRQ       DFC6
FIRQ       DFC6
FNDBP      F9AF
FNDBP      F9C8
FORWRD     F8D0
FNDRAM     FF4D
GETCH      0752
FNDREL     F84E
GETCH2     0758
FORWRD     F8E9
GETCH4     0767
FOUNDC     FF8B
GETST1     FC0F
GETCH      F752
GETSTA     FC06
GETCH2     F758
GO         F88C
GETCH4     F767
GOFLEX     076A
GETST1     FCBB
 
GETSTA     FCA9
 
GO         F8A5
 
GOFLEX     F76A
 
HEADLBA    00E0
 
HFCOPT     00FF
HFLAG      0020
HFLAG      0020
 
HOME       FD92
 
IC11       FFF0
 
IDEBOOT    F9D5
 
IDEOPT     00FF
IFLAG      0010
IFLAG      0010
IN1ADR     FB7D
IN1ADR     FC16
IN2ADR     FB72
IN2ADR     FC0B
INCH       FC04
INCH       FCA1
INCHE      FBFE
INCHE      FC9B
INCHEK     FC13
INCHEK     FCC5
INCHEK1    FC1B
INCHEK1    FCDA
INCHEV     F806
INCHEV     F806
INCHKV     F808
INCHKV     F808
INCHV      F804
INCHV      F804
INHEX      FBA0
INHEX      FC39
INHEXA     FBAD
INHEXA     FC46
INHEXL     FBB8
INHEXL     FC51
INITDR     04B2
INITDR     F4BD
INTER      0200
INTER      F207
INTER0     020B
INTER0     F212
INTER1     0219
INTER1     F221
INTER2     021E
INTER2     F227
INTEST     01F2
INTEST     F1F6
IOINIZ     FC36
IOINIZ     FCF7
IRQ        DFC8
IRQ        DFC8
JBYTE      FA92
JBYTE      FB2B
JIN1ADR    FA95
JIN1ADR    FB2E
JMPCMD     F888
JMPCMD     F8A1
JMPEXT     002A
JMPEXT     F02A
JMPTAB     FC49
JMPTAB     FE3B
JOUT1S     FA8F
JOUT1S     FB28
JOUT2H     FB17
JOUT2H     FBB0
JOUT4H     FB04
JOUT4H     FB9D
LADR       070A
LADR       F70A
LOAD       F9C5
LINEFD     FD6C
LOAD1      F9D0
LINEUP     FD77
LOAD10     F9FA
LINLEN     0050
LOAD16     FA10
LOAD       FA5E
LOAD2      F9D3
LOAD1      FA69
LOAD21     FA1B
LOAD10     FA93
LODERR     FA0F
LOAD16     FAA9
 
LOAD2      FA6C
 
LOAD21     FAB4
 
LODERR     FAA8
LOOPA      F81D
LOOPA      F81D
LRA        FCF9
LRA        FA2E
 
LRARAM     DFD0
LRAV       F812
LRAV       F812
MAXSEC     010C
MAXSEC     010C
MAXTRK     010B
MAXTRK     010B
MDUMP1     F8E9
MDUMP1     F902
MEMC2      F896
MEMC2      F8AF
MEMCHG     F88F
MEMCHG     F8A8
MEMDUMP    F8E4
MEMDUMP    F8FD
MESS6      00AE
MESS6      F0B2
 
MONEXT     F000
MONIO      E000
MONIO      E000
MONITOR    F814
MONITOR    F814
MONITV     F800
MONITV     F800
MONRAM     DFC0
MONRAM     DFC0
MONROM     F800
MONROM     F800
MSG1       FC8C
MSG1       FE84
MSG10      FCB9
MSG10      FEB6
MSG11      FCBF
MSG11      FEBC
MSG12      FCC5
MSG12      FEC2
MSG13      FCCB
MSG13      FEC8
MSG14      FCD1
MSG14      FECE
MSG15      FCD7
MSG15      FED4
MSG16      FCDD
MSG16      FEDA
MSG17      FCE2
MSG17      FEDF
MSG18      FCE7
MSG18      FEE4
MSG19      FCEE
MSG19      FEEB
MSG2       FCA6
MSG2       FEA3
MSG20      FCF6
MSG20      FEF3
MSG3       FCAD
MSG3       FEAA
MSG4       FCAF
MSG4       FEAC
MSG5       FCB5
MSG5       FEB2
MSGWHAT    0035
MSGWHAT    F035
NAK        0015
NAK        0015
NEXTCMD    F848
NEWCOL     FDF5
NEXTEXT    0002
NEWCUR     FDED
 
NEWROW     DFFD
 
NEXTCMD    F861
 
NEXTEXT    F002
NFLAG      0008
NFLAG      0008
NMI        DFC0
NMI        DFC0
NOTHEX     FBC3
NOTHEX     FC5C
NXTCH0     F872
NUMLIN     0019
NXTCHR     F875
NXTCH0     F88B
 
NXTCHR     F88E
NXTCMV     F802
NXTCMV     F802
NXTEX0     0016
NXTEX0     F016
NXTEX1     0019
NXTEX1     F019
NXTLIN     F8FF
NXTLIN     F918
OUT1S      FC1F
OUT1S      FCDE
OUT2H      FBCE
OUT2H      FC67
OUT2S      FC1D
OUT2S      FCDC
OUT4H      FBC6
OUT4H      FC5F
OUTBA      FBE8
OUTBA      FC81
OUTC       FBE2
OUTC       FC7B
OUTCH      FC21
OUTCH      FCE0
OUTCHV     F80A
OUTCHV     F80A
OUTHL      FBCE
OUTHL      FC67
OUTHR      FBD6
OUTHR      FC6F
OUTTE1     0233
OUTTE1     F23C
OUTTE2     0241
OUTTE2     F24B
OUTTER     0231
OUTTER     F23A
PCLKHI     0001
PCLKHI     0001
PCLKLO     0000
PCLKLO     0000
PCRLF      FA85
PCRLF      FB1E
PCRLFV     F80E
PCRLFV     F80E
PDATA      FAF6
PDATA      FB8F
PDATA0     0246
PDATA0     F251
PDATA1     0248
PDATA1     F253
PDATAV     F80C
PDATAV     F80C
PERIOD     F939
PERIOD     F952
PRASC      F93B
PNTNXT     FF9A
PRINT      FAF3
POSCOL     FDEA
 
PRASC      F954
 
PRINT      FB8C
PROMREG    E0C0
PROMREG    E0C0
PRSTHI     0002
PRSTHI     0002
PRSTLO     0000
PRSTLO     0000
PRTA       FB35
PRTA       FBCE
PRTB       FB3E
PRTB       FBD7
PRTBA      FBF0
PRTBA      FC89
PRTCC      FB47
PRTCC      FBE0
PRTCMD     F866
PRTCMD     F87F
PRTDP      FB10
PRTDP      FBA9
PRTIX      FB1A
PRTIX      FBB3
PRTIY      FB23
PRTIY      FBBC
PRTPC      FB2C
PRTPC      FBC5
PRTSP      FAFD
PRTSP      FB96
PRTUS      FB07
PRTUS      FBA0
 
PS2KBD     E020
 
PS2OPT     00FF
PSTRGV     F810
PSTRGV     F810
PSTRNG     FA81
PSTRNG     FB1A
PUNCH      FA23
PUNCH      FABC
PUNCH2     FA3C
PUNCH2     FAD5
PUNCH3     FA48
PUNCH3     FAE1
PUNCH4     FA4A
PUNCH4     FAE3
PUNCHL     FA62
PUNCHL     FAFB
PUNEXT     FA79
PUNEXT     FB12
RAMVEC     FC7C
RAMVEC     FE74
RCHAR      0046
RCHAR      F046
RCHAR1     004B
RCHAR1     F04B
RCHAR2     004F
RCHAR2     F04F
RCHAR3     005E
RCHAR3     F05F
RDLP1      04F7
RDLOOP     FA03
READ       0787
RDLP1      F502
READ1      0797
READ       F787
READSC     04E6
READ1      F797
REGPR      F989
READSC     F4F1
REGSTR     FB54
REGPR      F9A2
RESTR1     04C7
REGSTR     FBED
RF3        01D7
RELPAS     F855
 
RESTR1     F4D2
 
RETESC     FDB1
 
RETURN     FD46
 
RF3        F1DB
RMAXSEC    00FF
RMAXSEC    00FF
RMAXTRK    0100
RMAXTRK    0100
RPLSWI     F98F
ROWADX     DFFC
RTI        F88E
RPLSWI     F9A8
 
RTI        F8A7
RTOTSEC    FE01
RTOTSEC    FE01
SCHAR      0062
SCHAR      F064
SCHAR1     0069
SCHAR1     F06B
SCHAR2     006D
SCHAR2     F06F
SCHAR3     007F
SCHAR3     F082
SCT        0706
SCROL1     FE0E
 
SCROLL     FE06
 
SCT        F706
SCTBUF     C300
SCTBUF     C300
SECTOR     0102
SECTOR     0102
SEEK       076D
SEEK       F76D
SEEKTS     04CC
SEEKTS     F4D7
SKPDMP     F908
SETESC     FDAA
 
SKPDMP     F921
SOH        0001
SOH        0001
 
SOROU1     FD39
 
SOROU2     FD41
STACK      DFC0
STACK      DFC0
START      FCFA
START      FF00
SUB1       F9C0
SUB1       FA59
SVCVL      DFCE
SVCVL      DFCE
SVCVO      DFCC
SVCVO      DFCC
SWI        DFCA
SWI        DFCA
SWI2       DFC4
SWI2       DFC4
SWI3       DFC2
SWI3       DFC2
SWI3E      FD1A
SWI3E      FFC6
SWI3Z      FD3C
SWI3Z      FFE8
SWIE       F97B
SWIE       F994
SYNCHI     AA55
SYNCHI     AA55
SYNCLO     FF00
SYNCLO     FF00
TABEND     FC7C
TABEND     FE74
TADR       0708
TADR       F708
TRACK      0101
TRACK      0101
TRK        0705
TRK        F705
UBSUB      003E
TSTPAT     55AA
UFEXIT     01EC
TSTRAM     FF15
UFMSG1     00CB
UBSUB      F03E
UFSUB      00E6
UFEXIT     F1F0
UFSUB1     00EF
UFMSG1     F0CF
UXERR      03FF
UFSUB      F0EA
UXEXIT     03F9
UFSUB1     F0F3
UXLOOP     03AD
USRCMD     FC92
UXMES0     024F
UXERR      F40A
UXMES1     0268
UXEXIT     F404
UXMES2     027A
UXLOOP     F3B8
UXMSG3     0289
UXMES0     F25A
UXMSG4     029A
UXMES1     F273
UXSUB      02B1
UXMES2     F285
UXSUB1     02BD
UXMSG3     F294
UXSUB2     02EA
UXMSG4     F2A5
V1         FD06
UXSUB      F2BC
V2         FD0A
UXSUB1     F2C8
V3         FD0E
UXSUB2     F2F5
V4         FD12
V1         FFB2
V5         FD16
V2         FFB6
 
V3         FFBA
 
V4         FFBE
 
V5         FFC2
 
VDU        E030
 
VDUATT     0001
 
VDUCHR     0000
 
VDUCOL     0002
 
VDUOFF     0004
 
VDUOPT     00FF
 
VDUROW     0003
VFLAG      0002
VFLAG      0002
VOLMSG     00DD
VINIZ      FD0C
WRITSC     050A
VOLMSG     F0E1
WRTLP1     051C
VOUTCH     FD2B
WTDRQ      07B7
WAITDRQ    FA26
WTRDY      07A8
WAITRDY    FA17
XACK       04A9
WRITSC     F515
XASCII     FBDA
WRTLP1     F527
XBKPNT     F96F
WTDRQ      F7B7
XBPLP      F975
WTRDY      F7A8
XBYTE0     040A
XACK       F4B4
XBYTE1     0419
XASCII     FC73
XREAD      0405
XBKPNT     F988
 
XBPLP      F98E
 
XBYTE0     F415
 
XBYTE1     F424
 
XFERTF     FF9F
 
XREAD      F410
XSTATE     0106
XSTATE     0106
XSTBL      0442
XSTBL      F44D
XSTBLE     044D
XSTBLE     F458
XSTCK      0483
XSTCK      F48E
XSTCK1     0493
XSTCK1     F49E
XSTCK2     04A0
XSTCK2     F4AB
XSTCOM     0458
XSTCOM     F463
XSTDA      046C
XSTDA      F477
XSTDA1     047E
XSTDA1     F489
XSTST      0422
XSTST      F42D
XSTST1     042C
XSTST1     F437
XSTST2     0438
XSTST2     F443
XSTST3     043F
XSTST3     F44A
ZFLAG      0004
ZFLAG      0004

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.