0000- 133 .FI 0000- 134 .FI 0000- 135 ; 0000- 136 ; ******************************************************** 0000- 137 ; F800- 138 MPROM .EQ $F800 ; Normal monitor position at top of memory 00E3- 139 MONDP .EQ BASE+$0300/256 ; Direct page for monitor 0000- 140 ; 0000- 141 ; VDU Configuration 0019- 142 ROWS .EQ 25 ; Number of rows on display. 0050- 143 COLS .EQ VDU&$F8 ; Number of characters per row, 40 or 80 0800- 144 PSIZE .EQ VDU&$F8/10*256 ; Size of display memory in total, $0400 (1K) or $0800 (2K) 000C- 145 PAGHI .EQ 12 ; Page address register, high byte 000E- 146 CURHI .EQ 14 ; Cursor address register, high byte 0000- 147 ; 0000- S 148 .DO VDU&$F8=40 ; Location of memory that 40-Column VDU uses: 0000- S 149 VPAGE .EQ BASE+$400 ; Standard $0400 0000- S 150 ; Flex $E400 0000- S 151 ; 0000- S 152 ; Location of CRT controller on 40-column VDU card: 0000- S 153 CRTC .EQ BASE+$0800 ; Standard $0800 0000- 154 .FI ; Flex $E800 0000- 155 ; 0000- 156 .DO VDU=80 ; Location of memory that 80-Column VDU uses: F000- 157 VPAGE .EQ BASE+$1000 ; Standard $1000 0000- 158 ; Flex $F000 0000- 159 ; 0000- 160 ; Location of CRT controller on 80-column VDU card: 0000- S 161 .DO BASE=$0000 0000- S 162 CRTC .EQ $1840 ; Standard $1840 0000- 163 .FI 0000- 164 .DO BASE=$E000 E840- 165 CRTC .EQ $E840 ; Flex $E840 0000- 166 .FI 0000- 167 .FI 0000- 168 ; 0007- 169 WRPMSK .EQ PSIZE/256-1 ; Mask to wrap address within PSIZE, 3 (40-column) or 7 (80-column) 0000- 170 ; 0040- 171 DRIVE .EQ $40 ; Drive to bootstrap from - Drive 0 $40, Drive 1 change to $80 EA00- 172 FLOPY .EQ BASE+$0A00 ; Location of floppy disc controller: 0000- 173 ; Standard $0A00 0000- 174 ; Flex $EA00 EA00- 175 FDCC .EQ FLOPY ; Command register EA00- 176 FDCS .EQ FDCC ; Status register EA01- 177 FDCP .EQ FLOPY+1 ; Parameter register EA01- 178 FDCR .EQ FDCP ; Result register EA02- 179 FDRST .EQ FLOPY+2 ; Reset register EA04- 180 FDCD .EQ FLOPY+4 ; Data register 0000- 181 ; E980- 182 KVIA .EQ BASE+$0980 ; Location of Versatile Interface Adaptor E980- 183 KORB .EQ KVIA+$0 ; Output register B E980- 184 KIRB .EQ KORB ; Input register B E981- 185 KORA .EQ KVIA+$1 ; Output register A E981- 186 KIRA .EQ KORA ; Input register A E982- 187 KDDRB .EQ KVIA+$2 ; Data direction register B E983- 188 KDDRA .EQ KVIA+$3 ; Data direction register A E984- 189 KT1CL .EQ KVIA+$4 ; Timer 1 counter low E985- 190 KT1CH .EQ KVIA+$5 ; Timer 1 counter high E986- 191 KT1LL .EQ KVIA+$6 ; Timer 1 latch low E987- 192 KT1LH .EQ KVIA+$7 ; Timer 1 latch high E988- 193 KT2CL .EQ KVIA+$8 ; Timer 2 counter low E989- 194 KT2CH .EQ KVIA+$9 ; Timer 2 counter high E98A- 195 KSR .EQ KVIA+$A ; Shift register E98B- 196 KACR .EQ KVIA+$B ; Auxiliary control register E98C- 197 KPCR .EQ KVIA+$C ; Peripheral control register E98D- 198 KIFR .EQ KVIA+$D ; Interrupt flag register E98E- 199 KIER .EQ KVIA+$E ; Interrupt enable register E98F- 200 KORA2 .EQ KVIA+$F ; Input/output register A without hand shake 0000- 201 ; 0F00- 202 INTDEL .EQ 15*256 ; Delay for single instruction trace is 15 cycles 0040- 203 T1IFLG .EQ %01000000 ; Interrupt flag position for timer 1 0010- 204 CB1FLG .EQ %00010000 ; Interrupt flag position for keyboard strobe on CB1 0000- 205 ; 00EF- 206 IKPCR .EQ %11101111 ; Initial value for peripheral control register, 0000- 207 ; bit 0 CA1 control from printer, positive edge interrupt, 0000- 208 ; but not used in this monitor 0000- 209 ; bits 1-3 CA2 control to strobe printer, normally high 0000- 210 ; bit 4 CB1 control, negative edge keyboard interrupt 0000- 211 ; bits 5-7 CB2 control, cassette output initially set high 0000- 212 ; 00D0- 213 IKIER .EQ %11010000 ; Interrupt enable register control 0000- 214 ; bit 4 CB1 keyboard interrupt enable 0000- 215 ; bit 6 timer 1 interrupt enable 0000- 216 ; bit 7 set interrupts enabled 0000- 217 ; other enables not altered 0000- 218 ; 0002- 219 PSTRB .EQ %00000010 ; bit position in PCR of printer strobe, to toggle CA2 0020- 220 COPBIT .EQ %00100000 ; bit position in PCR of cassette output, to toggle CB2 0000- 221 ; 003F- 222 SWIOP .EQ $3F ; Software interrupt used for breakpoints 0000- 223 ; 0052- 224 BUFLEN .EQ 81+1 ; Buffer up to 80 characters from keyboard 0000- 225 ; 002A- 226 PROMPT .EQ '*' ; Monitor prompt 007F- 227 RUBCH .EQ $7F ; Keyboard code that does rubout operation 007F- 228 BSPACE .EQ $7F ; Code that backspaces VDU, also used to do rubout 000A- 229 LF .EQ $0A ; Linefeed 000D- 230 CR .EQ $0D ; Carriage return 0020- 231 SPACE .EQ $20 ; Blank space 002C- 232 COMMA .EQ ',' ; The comma symbol 002D- 233 MINUS .EQ '-' ; The minus symbol 000C- 234 FFEED .EQ $0C ; Code used as clear screen command 003B- 235 SEMIC .EQ ';' ; The semicolon symbol 0000- 236 ; 0010- 237 IRQ .EQ $10 0004- 238 ZERO .EQ $04 0000- 239 ; 0000- 240 ; Definitions of variables in page 03 / E3 0000- 241 ; ---------------------------------------- 0000- 242 ; E35B- 243 ISTACK .EQ BASE+$035B ; Stack pointer starts here E35B- 244 RTAB1 .EQ BASE+$035B ; RAM table 1 starts here 0000- 245 ; 0000- 246 ; This table is copied from ROM on start-up 0000- 247 ; E35B- 248 STACK .EQ BASE+$035B ; Position of stack pointer when empty E35D- 249 NTRACE .EQ BASE+$035D ; Number of instructions to trace before stopping E35F- 250 BSECHO .EQ BASE+$035F ; Character sent to backspace display E360- 251 ECHOF .EQ BASE+$0360 ; Keyboard buffer/echo control 0000- 252 ; bits 0-5 don't care 0000- 253 ; bit 6 echo console input to console output if set 0000- 254 ; bit 7 buffer input lines, allow rubout if set 0000- 255 ; E361- 256 PFLAG .EQ BASE+$0361 ; Printer control flag, echo console output to printer if nonzero E362- 257 PNEW .EQ BASE+$0362 ; This character not sent to printer E363- 258 DELCNT .EQ BASE+$0363 ; Non-zero delay count for cassette, controls baud rate E365- 259 COPADR .EQ BASE+$0365 ; Address for console output E367- 260 CINADR .EQ BASE+$0367 ; Address for console input E369- 261 CASOPA .EQ BASE+$0369 ; Address for cassette output E36B- 262 CASINA .EQ BASE+$036B ; Address for cassette input E36D- 263 PRINT1 .EQ BASE+$036D ; Address of printer output routine E36F- 264 FUNCTI .EQ BASE+$036F ; Address of VDU function table E371- 265 CMNDI .EQ BASE+$0371 ; Address of monitor command table E373- 266 IRQRTS .EQ BASE+$0373 ; Address to go to on timer 1 interrupt E375- 267 LINEPT .EQ BASE+$0375 ; Address of memory input line, 0 if none E377- 268 IRESV .EQ BASE+$0377 ; Address of reserved vector routine E379- 269 ISWI3 .EQ BASE+$0379 ; Address of SWI1 routine E37B- 270 ISWI2 .EQ BASE+$037B ; Address of SWI2 routine E37D- 271 IFIRQ .EQ BASE+$037D ; Address of FIRQ routine E37F- 272 IIRQ .EQ BASE+$037F ; Address of IRQ routine E381- 273 ISWI .EQ BASE+$0381 ; Address of SWI routine E383- 274 INMI .EQ BASE+$0383 ; Address of NMI routine E385- 275 OFFSET .EQ BASE+$0385 ; Cassette load offset 0000- 276 ; 0000- 277 ; General variables for monitor use 0000- 278 ; E387- 279 HEADST .EQ BASE+$0387 ; Static head pointer into line buffer E389- 280 HEADDY .EQ BASE+$0389 ; Dynamic head pointer into line buffer E38B- 281 TAIL .EQ BASE+$038B ; Tail pointer into line buffer E38D- 282 MSTACK .EQ BASE+$038D ; stack saved whilst memory interpreting E38F- 283 CROW .EQ BASE+$038F ; current row of cursor on display E390- 284 CCOL .EQ BASE+$0390 ; current column of cursor on display E391- 285 CPAGE .EQ BASE+$0391 ; current start of display page in memory E393- 286 MSAV .EQ BASE+$0393 ; Saved address for memory command E395- 287 GSAV .EQ BASE+$0395 ; Saved address for go command E397- 288 NAME .EQ BASE+$0397 ; Saved name for cassette input output E39D- 289 CSSTRT .EQ BASE+$039D ; Saved cassette output start address E39F- 290 CSEND .EQ BASE+$039F ; Saved cassette output end address E3A1- 291 ONLINE .EQ BASE+$03A1 ; flag set to zero when find or in input line E3A2- 292 LASTC .EQ BASE+$03A2 ; Saved last character from input line current E3A3- 293 CBREAK .EQ BASE+$03A3 ; Address of breakpoint, $FFFF if none E3A5- 294 NBREAK .EQ BASE+$03A5 ; number of breakpoints to ignore before stopping user E3A7- 295 CINST .EQ BASE+$03A7 ; user instruction at breakpoint address E3A8- 296 CTRACE .EQ BASE+$03A8 ; number of instructions left to trace before stopping user E3AA- 297 USRSTK .EQ BASE+$03AA ; Saved user-stack pointer when user halted E3AC- 298 TEMP .EQ BASE+$03AC ; Temporary storage E3AE- 299 BUFFER .EQ BASE+$03AE ; line input buffer 0000- 300 ; BASE+$03FF ; end of line input buffer 0000- 301 ; 0000- 302 ; Memory Maps 0000- 303 ; ----------- 0000- 304 ; 0000- 305 ; Original Acorn 0000- 306 ; $0000-$03FF Monitor System RAM (IC5,6) 0000- 307 ; $0400-$07FF 40-column Teletext video memory 0000- 308 ; $0800-$08FF 40-column Teletext 6845 CRTC 0000- 309 ;; $0900-$09FF 6522 VIA ($0980) 0000- 310 ; REGA b6-b0 printer output 0000- 311 ; b7 printer busy input 0000- 312 ; REGB b6-b0 keyboard ASCII input 0000- 313 ; b7 cassette input 0000- 314 ; CA1 input from printer acknowledge (not used) 0000- 315 ; CA2 output strobe to printer 0000- 316 ; CB1 input strobe from keyboard 0000- 317 ; CB2 output to cassette 0000- 318 ; Timer1 used to single step 0000- 319 ; Timer2 unused 0000- 320 ; $0A00-$0A7F 8271 floppy disk controller 0000- 321 ; $1000-$17FF 80-column VDU video memory 0000- 322 ; $1800-$187F 80-column 6845 CRTC ($1840) 0000- 323 ; $2000-$3FFF User RAM (8K) 0000- 324 ; $2000-$BFFF or User RAM (8K+32K) 0000- 325 ; $F800-$FFFF Monitor EPROM (IC4) 0000- 326 ; 0000- 327 ; Flex 0000- 328 ; $0000-$7FFF User RAM (32K) 0000- 329 ; $0000-$BFFF or User RAM (48K) 0000- 330 ; $C000-$DFFF FLEX System RAM (loaded from Disk) 0000- 331 ; $E000-$E3FF Monitor System RAM (IC5,6) 0000- 332 ; $E400-$E7FF 40-column Teletext Video memory 0000- 333 ; $E800-$E8FF 40-column Teletext 6845 CRTC 0000- 334 ; $E800-$E87F 80-column 6845 CRTC ($E840) 0000- 335 ; $E900-$E9FF 6522 VIA ($E980) 0000- 336 ; REGA b6-b0 printer output 0000- 337 ; b7 printer busy input 0000- 338 ; REGB b6-b0 keyboard ASCII input 0000- 339 ; b7 cassette input 0000- 340 ; CA1 input from printer acknowledge (not used) 0000- 341 ; CA2 output strobe to printer 0000- 342 ; CB1 input strobe from keyboard 0000- 343 ; CB2 output to cassette 0000- 344 ; Timer1 used to single step 0000- 345 ; Timer2 unused 0000- 346 ; $EA00-$EA7F 8271 floppy disk controller 0000- 347 ; $F000-$F7FF 80-column VDU video memory 0000- 348 ; $F800-$FFFF Monitor EPROM (IC4) 0000- 349 ; F800- 350 .OR MPROM F800- 351 ; F800- 352 ; ****** Hardware Reset Starts Here ****** F800- 353 ; F800-86 E3 354 ( 2) RESET: LDA #MONDP ; setup direct page F802-1F 8B 355 ( 7) TFR A,DP F804- 356 .DP MONDP F804-8E FF 25 357 ( 3) LDX #PTAB1 ; ROM table start F807-CE E3 5B 358 ( 3) LDU #RTAB1 ; RAM table start F80A-A6 80 359 ( 7) RST1: LDA ,X+ ; copy ROM to RAM F80C-A7 C0 360 ( 7) STA ,U+ F80E-8C FF 51 361 ( 4) CMPX #PTAB2 ; until end of table F811-26 F7 362 ( 3) BNE RST1 F813-10 DE 5B 363 ( 6) LDS 495 ; (all versions except 4.95) F816-BE F7 FE 366 ( 6) LDX MPROM-2 F819-8C A5 5A 367 ( 4) CMPX #$A55A ; check for extra ROM F81C-26 04 368 ( 3) BNE STRT1 ; not there F81E-AD 9F F7 FC 369 (13) JSR [MPROM-4] ; else call it F822- 370 .FI F822- 371 ; F822- S 372 .DO VER=495 ; (version 4.95 only) F822- S 373 .DB $17,$06,$63 ; 'LBSR CONCHR-3' F822- S 374 NOP F822- S 375 NOP F822- S 376 NOP F822- S 377 NOP F822- S 378 NOP F822- S 379 NOP F822- S 380 NOP F822- S 381 NOP F822- S 382 NOP F822- 383 .FI F822- 384 ; F822-CE FB EA 385 ( 3) STRT1: LDU #BACK ; Put monitor return on to stack F825-34 40 386 ( 7) PSHS U F827-CC 00 0C 387 ( 3) LDD #$0C F82A-34 02 388 ( 6) STRT2: PSHS A ; Put dummy registers onto stack F82C-5A 389 ( 2) DECB F82D-26 FB 390 ( 3) BNE STRT2 F82F-10 DF AA 391 ( 6) STS 495 ; (all versions except 4.95) F849-9F A3 403 ( 5) STX LINEPT ; unless F852-26 03 415 ( 3) BNE MON1 ; memory input F854-17 01 CA 416 ( 9) LBSR CONOUT F857- 417 ; F857-B7 E3 A1 418 ( 5) MON1: STA >ONLINE ; Set no CR yet F85A-86 E3 419 ( 2) PARSE: LDA #MONDP F85C-1F 8B 420 ( 7) TFR A,DP ; Set direct page F85E- 421 .DP MONDP F85E-9E 75 422 ( 5) LDX 495 ; (all versions except 4.95) F8F9-86 50 523 ( 2) LDA #COLS F8FB- 524 .FI F8FB- 525 ; F8FB- S 526 .DO VER=495 ; (version 4.95 only) F8FB- S 527 LDA <$01 F8FB- 528 .FI F8FB- 529 ; F8FB-D6 8F 530 ( 4) LDB 495 ; (all versions except 4.95) F925-8E FF 0D 563 ( 3) LDX #CRTCSV ; Table for S version F928- 564 .FI F928- 565 ; F928- S 566 .DO VER=495 ; (version 4.95 only) F928- S 567 LDX #$E300 F928- 568 .FI F928- 569 ; F928-CC 0D AA 570 ( 3) LDD #PAGHI+1*256+$AA ; Test the page register F92B-FD E8 40 571 ( 6) STD CRTC ; (low byte) for read/write ability F92E-F1 E8 41 572 ( 5) CMPB CRTC+1 F931-27 02 573 ( 3) BEQ CRTC11 ; If so, then V version F933-30 0C 574 ( 1) LEAX $C,X ; 'LEAX CRTCRV-CRTCSV,X' ; else get R table instead F935-86 0B 575 ( 2) CRTC11: LDA #12-1 ; Set up 12 registers F937-E6 86 576 ( 6) CRTC12: LDB A,X ; Get data and store it in correct register F939-FD E8 40 577 ( 6) STD CRTC F93C-4A 578 ( 2) DECA F93D-2A F8 579 ( 3) BPL CRTC12 ; Repeat until all 12 done F93F- 580 ; F93F- 581 ; Reset display to a blank page with cursor at top left of screen F93F- 582 ; F93F-0F 8F 583 ( 6) CLRALL: CLR 495 ; (all versions except 4.95) F971-81 50 618 ( 2) CMPA #COLS ; all columns F973- 619 .FI F973- 620 ; F973- S 621 .DO VER=495 ; (version 4.95 only) F973- S 622 CMPA <$01 F973- 623 .FI F973- 624 ; F973-26 0E 625 ( 3) BNE SIM1 ; not yet filled F975-0F 90 626 ( 6) CLR 495 ; (all versions except 4.95) F97B-81 19 634 ( 2) CMPA #ROWS ; Last row yet F97D- 635 .FI F97D- 636 ; F97D- S 637 .DO VER=495 ; (version 4.95 only) F97D- S 638 CMPA <$06 F97D- 639 .FI F97D- 640 ; F97D-26 04 641 ( 3) BNE SIM1 ; if not then done, F97F-0A 8F 642 ( 6) DEC 495 ; (all versions except 4.95) F993-86 4F 660 ( 2) LDA #COLS-1 ; else set to F995- 661 .FI F995- 662 ; F995- S 663 .DO VER=495 ; (version 4.95 only) F995- S 664 LDA <$0C F995- 665 .FI F995- 666 ; F995-97 90 667 ( 4) STA 495 ; (all versions except 4.95) F9CE-10 8E 00 28 716 ( 4) LDY #COLS/2 ; Number to blank F9D2- 717 .FI F9D2- 718 ; F9D2- S 719 .DO VER=495 ; (version 4.95 only) F9D2- S 720 LDY <$0D F9D2- S 721 NOP F9D2- 722 .FI F9D2- 723 ; F9D2-84 07 724 ( 2) SCR1: ANDA #WRPMSK ; Wrap around in 1K or 2K F9D4-EF 8B 725 (10) STU D,X ; and put 2 blanks F9D6-C3 00 02 726 ( 4) ADDD #2 ; Move up and F9D9-31 3F 727 ( 1) LEAY -1,Y ; repeat until F9DB-26 F5 728 ( 3) BNE SCR1 ; line done F9DD-83 07 D0 729 ( 4) SUBD #ROWS*COLS ; Move to second line now, $03E8 (40-column) or $07D0 (80-column) F9E0-84 07 730 ( 2) ANDA #WRPMSK ; wrap around and F9E2-DD 91 731 ( 5) STD 490 ; (versions 492 and 495) FB7D-69 E4 1014 .DB $69,$E4 ; 'ROL ,S' FB7F- 1015 .FI FB7F- 1016 ; FB7F-5A 1017 ( 2) DECB ; Do 4 times. FB80-26 F8 1018 ( 3) BNE NUMB2 ; Get a hex digit from console FB82-8D 11 1019 ( 7) BSR GETHEX ; Was hex so use, FB84-28 EE 1020 ( 3) BVC NUMB3 ; else finish with V clear FB86-1C FD 1021 ( 3) NUMB4: ANDCC #$FD ; CLV FB88-35 86 1022 ( 9) NUMB1: PULS D,PC FB8A- 1023 ; FB8A- 1024 ; GETHXS - get a hex digit ignoring leading spaces FB8A- 1025 ; GETHEX - get a hex digit both return value in A with V=0 else set V=1 if non-hex FB8A- 1026 ; FB8A-17 FC F2 1027 ( 9) GETHXS: LBSR CONCHR ; Get input. FB8D-27 22 1028 ( 3) BEQ GETH5 ; On CR, no number FB8F-81 20 1029 ( 2) CMPA #SPACE ; If space FB91-27 F7 1030 ( 3) BEQ GETHXS ; then ignore FB93-20 05 1031 ( 3) BRA GETH2 ; Change to hex FB95- 1032 ; FB95-17 FC E7 1033 ( 9) GETHEX: LBSR CONCHR ; Get input FB98-27 17 1034 ( 3) BEQ GETH5 ; On CR, no number FB9A-81 30 1035 ( 2) GETH2: CMPA #'0' FB9C-25 0C 1036 ( 3) BCS GETH1 ; Illegal hex FB9E-81 39 1037 ( 2) CMPA #'9' FBA0-23 14 1038 ( 3) BLS GETH3 ; Number hex FBA2-81 41 1039 ( 2) CMPA #'A' FBA4-25 04 1040 ( 3) BCS GETH1 ; Illegal hex FBA6-81 46 1041 ( 2) CMPA #'F' FBA8-23 0A 1042 ( 3) BLS GETH4 ; Alpha hex FBAA-81 2C 1043 ( 2) GETH1: CMPA #COMMA FBAC-27 03 1044 ( 3) BEQ GETH5 ; Absorb comma FBAE-B7 E3 A2 1045 ( 5) STA LASTC ; else re-use FBB1-1A 02 1046 ( 3) GETH5: ORCC #$02 ; Bad hex, SEV FBB3-39 1047 ( 5) RTS FBB4-80 07 1048 ( 2) GETH4: SUBA #7 ; Alpha offset FBB6-80 30 1049 ( 2) GETH3: SUBA #'0' ; Number offset FBB8-39 1050 ( 5) RTS ; with V clear FBB9- 1051 ; FBB9- 1052 ; Resume user program using stack as stands FBB9- 1053 ; FBB9- 1054 .DP MONDP FBB9-32 62 1055 ( 1) RESUME: LEAS 2,S ; Strip return address FBBB-8D AF 1056 ( 7) BSR NUMB ; Get number or zero FBBD-DD A5 1057 ( 5) STD 495 ; (all versions except 4.95) FD53-34 14 1328 ( 8) MCASIN: PSHS B,X FD55-86 80 1329 ( 2) LDA #$80 ; Rotating counter FD57-F6 E9 80 1330 ( 5) MCAS11: LDB KIRB ; Wait for start bit FD5A-2B FB 1331 ( 3) LFD5A: BMI MCAS11 FD5C-8D ED 1332 ( 7) BSR HWAIT ; Wait 1/2 bit time FD5E-F6 E9 80 1333 ( 5) LDB KIRB ; Recheck FD61- 1334 .FI FD61- 1335 ; FD61- S 1336 .DO VER=495 ; (version 4.95 only) FD61- S 1337 MCASIN: STX <$A3 FD61- S 1338 ANDCC #$EF FD61- S 1339 MCAS11: LDD #MON FD61- S 1340 PSHS A,B FD61- S 1341 JMP BOOT FD61- S 1342 ADCB ,X+ FD61- 1343 .FI FD61- 1344 ; FD61-2B F4 1345 ( 3) BMI MCAS11 ; start bit FD63-8D E4 1346 ( 7) MCAS12: BSR CWAIT ; Wait whole bit time FD65-F6 E9 80 1347 ( 5) LDB KIRB ; and get input FD68-AC E4 1348 ( 7) CMPX ,S ; waste time to FD6A-11 AC E4 1349 ( 8) CMPS ,S ; match loop delays FD6D-58 1350 ( 2) LSLB ; Move bit to carry FD6E-46 1351 ( 2) RORA ; then into byte FD6F-24 F2 1352 ( 3) BCC MCAS12 ; Repeat for 8 bits FD71-8D D6 1353 ( 7) BSR CWAIT ; Get into stop bit FD73-35 94 1354 (10) PULS B,X,PC ; and done FD75- 1355 ; FD75- 1356 ; Routine gets name from input stream, up to 6 characters long FD75- 1357 ; No name leaves memory unaltered. Any name is padded to 6 characters with spaces FD75- 1358 ; FD75-8E E3 9D 1359 ( 3) NAMEIN: LDX #NAME+6 FD78-17 FB 04 1360 ( 9) NAM2: LBSR CONCHR ; Get a character FD7B-27 23 1361 ( 3) BEQ NAM1 ; no name FD7D-81 20 1362 ( 2) CMPA #SPACE ; if space FD7F-27 F7 1363 ( 3) BEQ NAM2 ; ignore FD81-81 2C 1364 ( 2) CMPA #COMMA FD83-27 1B 1365 ( 3) BEQ NAM1 ; Null name FD85-C6 FA 1366 ( 2) LDB #256-6 ; Minus name length FD87-A7 85 1367 ( 6) NAM3: STA B,X ; Store a letter FD89-5C 1368 ( 2) INCB ; and move up FD8A-27 15 1369 ( 3) BEQ NAM6 ; Done 6 chars, exit FD8C-17 FA F0 1370 ( 9) LBSR CONCHR ; Get next letter FD8F-27 08 1371 ( 3) BEQ NAM5 ; On CR, pad name FD91-81 20 1372 ( 2) CMPA #SPACE ; On space, FD93-27 06 1373 ( 3) BEQ NAM4 ; pad name FD95-81 2C 1374 ( 2) CMPA #COMMA ; If not comma FD97-26 EE 1375 ( 3) BNE NAM3 ; then use FD99-86 20 1376 ( 2) NAM5: LDA #SPACE ; padding FD9B-A7 85 1377 ( 6) NAM4: STA B,X ; Pad until FD9D-5C 1378 ( 2) INCB ; end of FD9E-26 FB 1379 ( 3) BNE NAM4 ; name buffer FDA0-39 1380 ( 5) NAM1: RTS FDA1-17 FA DB 1381 ( 9) NAM6: LBSR CONCHR ; Get next input FDA4-27 FA 1382 ( 3) BEQ NAM1 ; leave if CR FDA6-81 2C 1383 ( 2) CMPA #COMMA ; else FDA8-27 F6 1384 ( 3) LFDA8: BEQ NAM1 ; absorb comma FDAA-97 A2 1385 ( 4) STA 490 ; (versions 4.92 and 4.95) FE33-48 1491 .DB $08+DRIVE ; Parameter 2 - Load Head FE34- 1492 .FI FE34- 1493 ; FE34- 1494 ; Query Drive Ready (sent by DRVRDY) FE34-6C 1495 .DB $2C+DRIVE ; Command - Read Drive Status FE35-00 1496 .DB $00 ; Number of Parameters - 0 FE36- 1497 ; FE36- 1498 ; ; Seek to Track 0 (sent by CMDPAR) FE36-69 1499 .DB $29+DRIVE ; Command - Seek FE37-01 1500 .DB $01 ; Number of Parameters - 1 FE38-00 1501 .DB $00 ; Parameter 1 - Track 0 FE39- 1502 ; FE39- 1503 ; ; Query Drive Ready (sent by DRVRDY) FE39-6C 1504 .DB $2C+DRIVE ; Command - Read Drive Status FE3A-00 1505 .DB $00 ; Number of Parameters - 0 FE3B- 1506 ; FE3B- 1507 ; ; Read Sector 1/2 (sent by CMDPAR) FE3B-53 1508 .DB $13+DRIVE ; Command - Read Data Multi-sector FE3C-03 1509 .DB $03 ; Number of Parameters - 3 FE3D-00 1510 .DB $00 ; Parameter 1 - Logical Track Address 0 FE3E- 1511 FE3E- S 1512 .DO VER=490 ; (original Acorn version 4.90 only) FE3E- S 1513 .DB $02 ; Parameter 2 - Logical Sector Address 2 FE3E- 1514 .FI FE3E- 1515 .DO VER<>490 ; (version 4.92 and 4.95) FE3E-01 1516 .DB $01 ; Parameter 2 - Logical Sector Address 1 FE3F- 1517 .FI FE3F-21 1518 .DB $21 ; Parameter 3 - Sector Size - 256 bytes/sector FE40- 1519 ; Number of Sectors - 1 sector of 256 bytes FE40- 1520 ; FE40- S 1521 .DO VER<>492 ; (original Acorn version 4.90 and version 4.95) FE40- S 1522 ; ; Read Starting at Sector 3 (sent by CMDPAR) FE40- S 1523 .DB $13+DRIVE ; Command - Read Data Multi-sector FE40- S 1524 .DB $02 ; Number of Parameters - 2 (should be 3 ?) FE40- S 1525 .DB $00 ; Parameter 1 - Logical Track Address 0 FE40- S 1526 .DB $03 ; Parameter 2 - Logical Sector Address 3 FE40- S 1527 ; Parameter 3 - (missing should be $21 ?) FE40- 1528 .FI FE40- 1529 .DO VER=492 ; (version 4.92 only) FE40-FF FF FF FF 1530 .DB $FF,$FF,$FF,$FF ; packing FE44- 1531 .FI FE44- 1532 ; FE44- 1533 ; This routine bootstraps from a mini-floppy disc FE44- 1534 ; Reads Sector 1/2 to find where to put program FE44- 1535 ; FE44-8E FF 04 1536 ( 3) BOOT: LDX #ANRTI ; Set dummy interrupt routine FE47-9F 83 1537 ( 5) STX 490 ; (versions 492 and 495) FE60-CE C0 00 1556 ( 3) LDU #$C000 ; Put at $C000 FE63- 1557 .FI FE63- 1558 ; FE63-1F 32 1559 ( 7) TFR U,Y ; and point to it FE65-8D 62 1560 ( 7) BSR TRNSFR ; Move disc data to memory FE67-26 07 1561 ( 3) BNE DERR ; Non-zero means error FE69- 1562 ; FE69- S 1563 .DO VER=490 ; (original Acorn version 4.90 only) FE69- S 1564 LDD #$FF42 ; Check first two bytes are $FF42 FE69- S 1565 CMPD ,Y++ FE69- S 1566 BNE DERR ; If not $FF42, no boot present FE69- S 1567 BSR CMDPAR ; Start read at sector 3 FE69- S 1568 LDU ,Y++ ; Get address to put at FE69- S 1569 LDA ,Y+ ; and number of sectors FE69- S 1570 LDY ,Y ; Start of program FE69- S 1571 ADDA #$20 ; Add sector length value FE69- S 1572 BOOT1: LDB 490 ; (version 4.92 and 4.95) FE69-10 FE E3 5B 1585 ( 7) LDS STACK ; Reset stack and go to program FE6D-7E C0 00 1586 ( 4) JMP $C000 FE70- 1587 .FI FE70- 1588 ; FE70-8E FF CE 1589 ( 3) DERR: LDX #DQRY ; Query user on display with error number FE73-17 FA 76 1590 ( 9) LBSR STRING FE76-17 FC 08 1591 ( 9) LBSR OPAREG FE79-16 FA 6D 1592 (55) LBRA OPCRLF ; Newline and exit FE7C- 1593 ; FE7C- 1594 .DO VER=492 ; (version 4.92 only) FE7C-FF FF FF FF FF FF FF FF 1595 .DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Packing FE84-FF FF FF FF FF FF FF FF 1596 .DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF FE8C-FF FF FF FF FF FF FF FF 1597 .DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF FE94-FF FF FF FF FF FF FF FF 1598 .DB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF FE9C-FF FF FF 1599 .DB $FF,$FF,$FF FE9F- 1600 .FI FE9F- 1601 ; FE9F- S 1602 .DO VER=495 ; (version 4.95 only) FE9F- S 1603 LDY #CRTCSV FE9F- S 1604 LDX #$E300 FE9F- S 1605 LDB #$0B FE9F- S 1606 LFE85: LDA ,Y+ FE9F- S 1607 STA ,X+ FE9F- S 1608 DECB FE9F- S 1609 BPL LFE85 FE9F- S 1610 LDA <$01 FE9F- S 1611 DECA FE9F- S 1612 STA ,X+ FE9F- S 1613 CLRA FE9F- S 1614 LDB <$01 FE9F- S 1615 LSRB FE9F- S 1616 STD ,X++ FE9F- S 1617 RTS FE9F- S 1618 .DB $FF,$FF,$FF,$FF,$FF,$FF,$FF ; Packing FE9F- 1619 .FI FE9F- 1620 ; FE9F- 1621 ; This routine sends one command followed by a variable number of parameters, possibly none FE9F- 1622 ; X points to command, next byte is number of parameters FE9F- 1623 ; X left pointing after last parameter, destroys D FE9F- 1624 ; FE9F-EC 81 1625 ( 9) CMDPAR: LDD ,X++ ; Get command (A) and number of parameters (B) FEA1-0D 00 1626 ( 6) CP1: TST 495 ; (all versions except 4.95) FEFD-A6 00 1684 .DB $A6,$00 ; 'LDA KIRB-KVIA,X' ; and get a character FEFF- 1685 .FI FEFF- 1686 ; FEFF- S 1687 .DO VER=495 ; (version 4.95 only) FEFF- S 1688 .DB $A6,$84 ; 'LDA ,X' FEFF- 1689 .FI FEFF- 1690 ; FEFF-84 7F 1691 ( 2) ANDA #$7F ; stripping spare bit FF01-17 FA FF 1692 ( 9) LBSR HAVCHR ; Put into buffer FF04-3B 1693 (15) ANRTI: RTI ; then leave IRQ level FF05- 1694 ; FF05- 1695 ; Come here if unused interrupts are active, so complain to user and stop processor FF05- 1696 ; since cannot clear an unknown interrupt FF05- 1697 ; FF05-8E FF CC 1698 ( 3) UNUSED: LDX #IERR ; Query user on display FF08-17 F9 E1 1699 ( 9) LBSR STRING FF0B-20 FE 1700 ( 3) FOREVR: BRA FOREVR ; and stop dead ! FF0D- 1701 ; FF0D- 1702 ; *** VDU Configurations *** FF0D- 1703 ; FF0D- 1704 ; R0 Horizontal Total Register horizontal frequency, the total number of characters displayed and non-displayed per line FF0D- 1705 ; R1 Horizontal Displayed Register number of displayed characters per line FF0D- 1706 ; R2 Horizontal Sync Position Register position (start) of the horizontal sync FF0D- 1707 ; R3 (Horizontal) Sync Width Register bits 0-3: width (character clocks) of the horizontal sync pulse FF0D- 1708 ; bits 4-7: vertical sync pulse width in scan line times FF0D- 1709 ; R4 Vertical Total Register determines the vertical frequency (in character line times-1) FF0D- 1710 ; R5 Vertical Total Adjust Register adjustment to vertical frequency (in scan line times) FF0D- 1711 ; R6 Vertical Displayed Register number of displayed character rows FF0D- 1712 ; R7 Vertical Sync Position Register position of the vertical sync pulse (character row times) FF0D- 1713 ; R8 Interlace & Skew Register bits 0,1 control the raster scan mode FF0D- 1714 ; bits 4,5 control DISPTMG skew FF0D- 1715 ; bits 6,7 control cursor skew FF0D- 1716 ; R9 Maximum Scan Line Address Register number of scan lines per character row - 1 (including spacing) FF0D- 1717 ; R10 Cursor Start Register bits 0-4 cursor start scan line FF0D- 1718 ; bits 5,6 control the Cursor Display Mode FF0D- 1719 ; bit 6 blink enable FF0D- 1720 ; R11 Cursor End Register cursor end scan line FF0D- 1721 ; FF0D- 1722 ; 40-Column Configurations FF0D- 1723 ; FF0D- S 1724 .DO VDU=40 ; Original Acorn Monitor Configurations from Manual FF0D- S 1725 ; FF0D- S 1726 ; For S Version 6845 CRT Controller (Interlaced) FF0D- S 1727 CRTCSV: .DB $3F ; R0 64 characters per line (15,625kHz) FF0D- S 1728 .DB COLS ; R1 40 displayed characters per line FF0D- S 1729 .DB $34 ; R2 (52) start of horizontal sync - 52uS FF0D- S 1730 .DB $44 ; R3 bits 0-3 (4) width of horizontal sync pulse - 4uS FF0D- S 1731 ; bits 4-7 (4) vertical sync pulse width - 256uS FF0D- S 1732 .DB $1E ; R4 (30) vertical frequency - 15.625kHz (31x10x64uS) FF0D- S 1733 .DB $02 ; R5 (2) adjustment to vertical frequency (2x64uS) giving a total of 19.968mS i.e. 50Hz (actually 50.08Hz) FF0D- S 1734 .DB ROWS ; R6 25 displayed character rows FF0D- S 1735 .DB $1B ; R7 (27) position of vertical sync pulse - 17.28mS FF0D- S 1736 .DB $03 ; R8 bits 0,1 3 = Interlace Sync & Video Mode FF0D- S 1737 ; bits 4,5 0 = DISPTMG non-skew FF0D- S 1738 ; bits 6,7 0 = Cursor non-skew FF0D- S 1739 .DB $12 ; R9 (18) 20 scan lines/character (10 interlaced) FF0D- S 1740 .DB $70 ; R10 bits 0-4 (16) cursor start scan line - 16 FF0D- S 1741 ; bits 5,6 (1,1) blink enabled with frequency 1/32 of vertical field rate FF0D- S 1742 .DB $13 ; R11 bit 6 (19) underlined cursor FF0D- S 1743 ; FF0D- S 1744 ; For R Version 6845 CRT Controller (Non-Interlaced) FF0D- S 1745 CRTCRV: .DB $3F ; R0 64 characters per line (15,625kHz) FF0D- S 1746 .DB COLS ; R1 40 displayed characters per line FF0D- S 1747 .DB $34 ; R2 (52) start of horizontal sync - 52uS FF0D- S 1748 .DB $04 ; R3 bits 0-3 (0) width of horizontal sync pulse - 0uS FF0D- S 1749 ; bits 4-7 (4) vertical sync pulse width - 256uS FF0D- S 1750 .DB $1E ; R4 (30) vertical frequency - 15.625kHz (31x10x64uS) FF0D- S 1751 .DB $02 ; R5 (2) adjustment to vertical frequency (2x64uS) giving a total of 19.968mS i.e. 50Hz (actually 50.08Hz) FF0D- S 1752 .DB ROWS ; R6 25 displayed character rows FF0D- S 1753 .DB $1B ; R7 (27) position of vertical sync pulse - 17.28mS FF0D- S 1754 .DB $00 ; R8 bits 0,1 0 = Non-interlace Mode FF0D- S 1755 ; bits 4,5 0 = DISPTMG non-skew FF0D- S 1756 ; bits 6,7 0 = Cursor non-skew FF0D- S 1757 .DB $09 ; R9 (9) 10 scan lines/character FF0D- S 1758 .DB $68 ; R10 bits 0-4 (8) cursor start scan line - 8 FF0D- S 1759 ; bits 5,6 (1,1) blink enabled with frequency 1/32 of vertical field rate FF0D- S 1760 .DB $09 ; R11 bit 6 (9) underlined cursor FF0D- S 1761 ; FF0D- 1762 .FI FF0D- 1763 ; FF0D- S 1764 .DO VDU=41 ; Alternative Configurations which match System COS/DOS40B FF0D- S 1765 ; FF0D- S 1766 ; For S Version 6845 CRT Controller (Interlaced) FF0D- S 1767 CRTCSV: .DB $3F ; R0 64 characters per line (15,625kHz) FF0D- S 1768 .DB COLS ; R1 40 displayed characters per line FF0D- S 1769 .DB $33 ; R2 (51) start of horizontal sync - 51uS FF0D- S 1770 .DB $44 ; R3 bits 0-3 (4) width of horizontal sync pulse - 4uS FF0D- S 1771 ; bits 4-7 (4) vertical sync pulse width - 256uS FF0D- S 1772 .DB $1E ; R4 (30) vertical frequency - 15.625kHz (31x10x64uS) FF0D- S 1773 .DB $02 ; R5 (2) adjustment to vertical frequency (2x64uS) giving a total of 19.968mS i.e. 50Hz (actually 50.08Hz) FF0D- S 1774 .DB ROWS ; R6 25 displayed character rows FF0D- S 1775 .DB $1B ; R7 (27) position of vertical sync pulse - 17.28mS FF0D- S 1776 .DB $03 ; R8 bits 0,1 3 = Interlace Sync & Video Mode FF0D- S 1777 ; bits 4,5 0 = DISPTMG non-skew FF0D- S 1778 ; bits 6,7 0 = Cursor non-skew FF0D- S 1779 .DB $12 ; R9 (18) 20 scan lines/character (10 interlaced) FF0D- S 1780 .DB $72 ; R10 bits 0-4 (2) cursor start scan line - FF0D- S 1781 ; bits 5,6 (1,1) blink enabled with frequency 1/32 of vertical field rate FF0D- S 1782 .DB $13 ; R11 bit 6 (19) underlined cursor FF0D- S 1783 ; FF0D- S 1784 ; For R Version 6845 CRT Controller (Non-Interlaced) FF0D- S 1785 CRTCRV: .DB $3F ; R0 64 characters per line (15,625kHz) FF0D- S 1786 .DB COLS ; R1 40 displayed characters per line FF0D- S 1787 .DB $33 ; R2 (51) start of horizontal sync - 51uS FF0D- S 1788 .DB $04 ; R3 bits 0-3 (0) width of horizontal sync pulse - 0uS FF0D- S 1789 ; bits 4-7 (4) vertical sync pulse width - 256uS FF0D- S 1790 .DB $1E ; R4 (30) vertical frequency - 15.625kHz (31x10x64uS) FF0D- S 1791 .DB $02 ; R5 (2) adjustment to vertical frequency (2x64uS) giving a total of 19.968mS i.e. 50Hz (actually 50.08Hz) FF0D- S 1792 .DB ROWS ; R6 25 displayed character rows FF0D- S 1793 .DB $1B ; R7 (27) position of vertical sync pulse - 17.28mS FF0D- S 1794 .DB $00 ; R8 bits 0,1 0 = Non-interlace Mode FF0D- S 1795 ; bits 4,5 0 = DISPTMG non-skew FF0D- S 1796 ; bits 6,7 0 = Cursor non-skew FF0D- S 1797 .DB $09 ; R9 (9) 10 scan lines/character FF0D- S 1798 .DB $68 ; R10 bits 0-4 (8) cursor start scan line - 8 FF0D- S 1799 ; bits 5,6 (1,1) blink enabled with frequency 1/32 of vertical field rate FF0D- S 1800 .DB $09 ; R11 bit 6 (9) underlined cursor FF0D- S 1801 ; FF0D- 1802 .FI FF0D- 1803 ; FF0D- 1804 ; 80-Column Configurations FF0D- 1805 FF0D- 1806 .DO VDU=80 ; These configurations match the '41' config (taken from System COS/DOS80B) FF0D- 1807 ; FF0D- 1808 ; For S Version 6845 CRT Controller (Interlaced) FF0D-7F 1809 CRTCSV: .DB $7F ; R0 128 characters per line (31,250kHz) FF0E-50 1810 .DB COLS ; R1 40 displayed characters per line FF0F-60 1811 .DB $60 ; R2 (96) start of horizontal sync - 96uS FF10-28 1812 .DB $28 ; R3 bits 0-3 (8) width of horizontal sync pulse - 4uS FF11- 1813 ; bits 4-7 (2) vertical sync pulse width - 256uS FF11-1E 1814 .DB $1E ; R4 (30) vertical frequency - 15.625kHz (31x10x64uS) FF12-02 1815 .DB $02 ; R5 (2) adjustment to vertical frequency (2x64uS) giving a total of 19.968mS i.e. 50Hz (actually 50.08Hz) FF13-19 1816 .DB ROWS ; R6 25 displayed character rows FF14-1B 1817 .DB $1B ; R7 (27) position of vertical sync pulse - 17.28mS FF15-40 1818 .DB $40 ; R8 bits 0,1 0 = Non-interlace Mode FF16- 1819 ; bits 4,5 0 = DISPTMG non-skew FF16- 1820 ; bits 6,7 4 = Cursor two-character skew FF16-09 1821 .DB $09 ; R9 (09) 20 scan lines/character (09 interlaced) FF17-68 1822 .DB $68 ; R10 bits 0-4 (8) cursor start scan line - FF18- 1823 ; bits 5,6 (1,1) blink enabled with frequency 1/32 of vertcial field rate FF18-09 1824 .DB $09 ; R11 bit 6 (09) underlined cursor FF19- 1825 ; FF19- 1826 ; For R Version 6845 CRT Controller (Non-Interlaced) FF19-7F 1827 CRTCRV: .DB $7F ; R0 128 characters per line (31,250kHz) FF1A-50 1828 .DB COLS ; R1 40 displayed characters per line FF1B-60 1829 .DB $60 ; R2 (96) start of horizontal sync - 96uS FF1C-28 1830 .DB $28 ; R3 bits 0-3 (8) width of horizontal sync pulse - 4uS FF1D- 1831 ; bits 4-7 (2) vertical sync pulse width - 256uS FF1D-1E 1832 .DB $1E ; R4 (30) vertical frequency - 15.625kHz (31x10x64uS) FF1E-02 1833 .DB $02 ; R5 (2) adjustment to vertical frequency (2x64uS) giving a total of 19.968mS i.e. 50Hz (actually 50.08Hz) FF1F-19 1834 .DB ROWS ; R6 25 displayed character rows FF20-1B 1835 .DB $1B ; R7 (27) position of vertical sync pulse - 17.28mS FF21-40 1836 .DB $40 ; R8 bit 0,1 0 = Non-interlace Mode FF22- 1837 ; bits 4,5 0 = DISPTMG non-skew FF22- 1838 ; bits 6,7 4 = Cursor two-character skew FF22-09 1839 .DB $09 ; R9 (9) 10 scan lines/character FF23-68 1840 .DB $68 ; R10 bits 0-4 (8) cursor start scan line - 8 FF24- 1841 ; bits 5,6 (1,1) blink enabled with frequency 1/32 of vertical field rate FF24-09 1842 .DB $09 ; R11 bit 6 (9) underlined cursor FF25- 1843 ; FF25- 1844 .FI FF25- 1845 ; FF25- 1846 ; Set up table 1, copied directly to RAM at RTAB1 FF25- 1847 ; FF25-E3 5B 1848 PTAB1 .DW ISTACK ; Initial stack pointer FF27-00 00 1849 .DW 0 ; Trace initially off FF29-7F 1850 .DB BSPACE ; Character echoes on rubout FF2A-FF 1851 .DB $FF ; Echo on, line buffer on FF2B-00 1852 .DB 0 ; Printer off FF2C-0A 1853 .DB LF ; Do not send line feeds, use CR only to printer FF2D-00 CD 1854 .DW BAUD ; Initial baud rate for cassette FF2F-F9 5B 1855 .DW DISPLA ; Console output FF31-FA 5E 1856 .DW GETCHR ; Console input FF33-FD 25 1857 .DW MCASOP ; Cassette output FF35-FD 53 1858 .DW MCASIN ; Cassette input FF37-FA 9D 1859 .DW PRINT ; Printer routine FF39-FF 7F 1860 .DW FUNCTS ; Display function table FF3B-FF 51 1861 .DW CMNDS ; Monitor command table FF3D-FF 05 1862 .DW UNUSED ; Initial timer 1 routine FF3F-00 00 1863 .DW $0000 ; No memory interpret FF41-FF 05 1864 .DW UNUSED ; Reserved vector FF43-FF 05 1865 .DW UNUSED ; SWI3 FF45-FF 05 1866 .DW UNUSED ; SWI2 FF47-FF 05 1867 .DW UNUSED ; FIRQ FF49-FE E0 1868 .DW IRQHAN ; IRQ FF4B-FB C3 1869 .DW SWIHAN ; SWI FF4D-FF 05 1870 .DW UNUSED ; NMI FF4F-00 00 1871 .DW $0000 ; Initial load offset FF51- 1872 PTAB2: .EQ $ ; End of table FF51- 1873 ; FF51- 1874 ; This table contains the standard set of commands provided by the monitor FF51- 1875 ; FF51-0E 1876 CMNDS: .DB CMNDE-CMNDS/3-1 ; Number of entries FF52-47 1877 .AS 'G' FF53-FC B0 1878 .DW GOUSER-CMNDS ; Go to program FF55-4D 1879 .AS 'M' FF56-FB B0 1880 .DW MEM-CMNDS ; Memory examine FF58-52 1881 .AS 'R' FF59-F9 67 1882 .DW EXREG-CMNDS ; Examine registers FF5B-50 1883 .AS 'P' FF5C-FC 68 1884 .DW RESUME-CMNDS ; Proceed after break FF5E-54 1885 .AS 'T' FF5F-FD 10 1886 .DW TRACEN-CMNDS ; Set trace number FF61-53 1887 .AS 'S' FF62-FE 5C 1888 .DW SAVE-CMNDS ; Save on cassette FF64-4C 1889 .AS 'L' FF65-FD 50 1890 .DW LOAD-CMNDS ; Load from cassette FF67-56 1891 .AS 'V' FF68-FC D2 1892 .DW BRKSET-CMNDS ; Set break address FF6A-44 1893 .AS 'D' FF6B-FE F3 1894 .DW BOOT-CMNDS ; Disc bootstrap FF6D-43 1895 .AS 'C' FF6E-FD 29 1896 .DW PCNTL-CMNDS ; Copy to printer FF70-20 1897 .DB SPACE FF71-FB 0C 1898 .DW ANRTS-CMNDS ; Ignore spaces FF73-2C 1899 .DB COMMA FF74-FB 0C 1900 .DW ANRTS-CMNDS ; Ignore commas FF76-2E 1901 .AS '.' FF77-FD 16 1902 .DW TRACE-CMNDS ; Do trace operation FF79-46 1903 .AS 'F' FF7A-FD 77 1904 .DW LOAD7-CMNDS ; Finish file load FF7C-01 1905 .DB 1 FF7D-FD 38 1906 .DW BADCMD-CMNDS ; Default is query user FF7F- 1907 CMNDE: .EQ $ FF7F- 1908 ; FF7F- 1909 ; This table contains the standard functions provided by the VDU control programs FF7F- 1910 ; FF7F- 1911 FUNCTS: FF7F- 1912 .DO VER<>495 ; (all versions except 4.95) FF7F-04 1913 .DB FUNCTE-FUNCTS/3-1 ; Number of entries FF80- 1914 ; FF80-0D 1915 .DB CR ; Carriage return FF81-FA 6D 1916 .DW DOCR-FUNCTS FF83- 1917 ; FF83-0A 1918 .DB LF ; Linefeed FF84-F9 F8 1919 .DW DOLF-FUNCTS FF86- 1920 ; FF86-7F 1921 .DB BSPACE ; Backspace FF87-FA 06 1922 .DW DORUB-FUNCTS FF89- 1923 ; FF89-0C 1924 .DB FFEED ; Form feed FF8A-F9 A6 1925 .DW CRTCI-FUNCTS FF8C- 1926 ; FF8C-01 1927 .DB 1 FF8D-F9 EA 1928 .DW SIMCHR-FUNCTS ; Default is display it FF8F- 1929 .FI FF8F- 1930 ; FF8F- S 1931 .DO VER=495 ; (version 4.95 only) FF8F- S 1932 .DB FUNCTE-FUNCTS/3 ; Number of entries FF8F- S 1933 ; FF8F- S 1934 .DB CR ; Carriage return FF8F- S 1935 .DW DOCR-FUNCTS FF8F- S 1936 ; FF8F- S 1937 .DB LF ; Linefeed FF8F- S 1938 .DW DOLF-FUNCTS FF8F- S 1939 ; FF8F- S 1940 .DB $08 ; Backspace ?? FF8F- S 1941 .DW DORUB-FUNCTS FF8F- S 1942 ; FF8F- S 1943 .DB $01 ; Form feed FF8F- S 1944 .DW $F9EA ; CRTCI-FUNCTS ; $F9EA ?? FF8F- S 1945 .DB 1 FF8F- S 1946 .DW SIMCHR-FUNCTS ; Default is display it FF8F- 1947 .FI FF8F- 1948 ; FF8F- 1949 FUNCTE: .EQ $ FF8F- 1950 ; FF8F- 1951 ; This is the list of strings used by the monitor FF8F- 1952 ; FF8F-52 6F 6D 3F 1953 MQRY: .AS "Rom?" FF93-0D 0A 00 1954 SCRLF: .DB CR,LF,0 FF96-43 43 20 20 41 20 20 42 20 44 50 20 20 20 20 58 20 20 20 20 59 20 20 20 20 55 20 20 20 50 43 20 20 20 20 53 1955 TITLES: .AS "CC A B DP X Y U PC S" FFBA-0D 0A 00 1956 .DB CR,LF,0 FFBD-0D 0A 1957 PCMESS: .DB CR,LF FFBF-50 43 5D 1958 .AS "PC]" FFC2-00 1959 .DB 0 FFC3-57 68 61 74 20 69 73 3A 1960 CQRY: .AS "What is:" FFCB-00 1961 .DB 0 FFCC-49 1962 IERR: .AS 'I' FFCD-2D 1963 LQRY: .AS '-' FFCE-45 72 72 20 1964 DQRY: .AS "Err " FFD2-00 1965 .DB 0 FFD3- 1966 ; FFD3- 1967 ; This is the set of indirect jumps to redirect the interrupt vector addresses FFD3- 1968 ; FFD3-6E 9F E3 77 1969 ( 9) RESVI: JMP [IRESV] FFD7-6E 9F E3 79 1970 ( 9) SWI3I: JMP [ISWI3] FFDB-6E 9F E3 7B 1971 ( 9) SWI2I: JMP [ISWI2] FFDF-6E 9F E3 7D 1972 ( 9) FIRQI: JMP [IFIRQ] FFE3-6E 9F E3 7F 1973 ( 9) IRQI: JMP [IIRQ] FFE7-6E 9F E3 81 1974 ( 9) SWII: JMP [ISWI] FFEB-6E 9F E3 83 1975 ( 9) NMII: JMP [INMI] FFEF- 1976 ; FFEF- 1977 ; The following hardware vectors reside in the top 16 bytes of memory FFEF- 1978 ; when the monitor is in its standard position FFEF- 1979 ; FFEF- S 1980 .DO VER=490 ; (original Acorn version 4.90 only) FFEF- S 1981 .DB $00 ; packing FFEF- 1982 .EL ; (all other versions) FFEF-FF 1983 .DB $FF ; packing FFF0- 1984 .FI FFF0- 1985 ; FFF0-FF D3 1986 .DW RESVI FFF2-FF D7 1987 .DW SWI3I FFF4-FF DB 1988 .DW SWI2I FFF6-FF DF 1989 .DW FIRQI FFF8-FF E3 1990 .DW IRQI FFFA-FF E7 1991 .DW SWII FFFC-FF EB 1992 .DW NMII FFFE-F8 00 1993 .DW RESET