Home » CEEFAX disks » telesoftware9.adl » 26-08-88/T\SWR08
26-08-88/T\SWR08
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » CEEFAX disks » telesoftware9.adl |
Filename: | 26-08-88/T\SWR08 |
Read OK: | ✔ |
File size: | 2FB7 bytes |
Load address: | 0000 |
Exec address: | FFFFFFFF |
Duplicates
There is 1 duplicate copy of this file in the archive:
- CEEFAX disks » telesoftware3.adl » 11_12_87/T\SWR08
- CEEFAX disks » telesoftware9.adl » 26-08-88/T\SWR08
File contents
Mastering Sideways ROM & RAM - Module 08 - Service rom errors ------------------------------------------------------------- In Module 4 you were shown how to use the DFS command *ENABLE within your own SWR programs. If you look carefully at the program ENABLE used to illustrate Module 4 you will see that the reset routine is only executed if *ENABLE is typed before *RESET. If any other command is typed before *RESET the interpreter simply returns control to the MOS with the accumulator reset to zero. This is the simplest form of error handling - if the user types something unexpected return with the accumulator reset to zero. In this module I will show you how to deal with user generated errors within SWR service routines in such a way that an error will abort a BASIC program and print an appropriate error message. The way of dealing with errors in language roms is different from the method described here and will be dealt with in Module 17. Figure 8.1 illustrates how the DFS rom responds to user generated errors such as neglecting to include a mandatory argument. If you enter the DFS command *TYPE without an argument, the DFS responds by making the current language print the syntax it expects. If you make the same mistake within a running BASIC program the DFS makes the syntax message available to BASIC and aborts the BASIC program. BASIC then prints the message and the line number in which the error was generated. >*TYPE Syntax: TYPE <fsp> >NEW >10 *TYPE >20 STOP >RUN Syntax: TYPE <fsp> at line 10 > Figure 8.1 Error handling by the DFS ------------------------------------ The DFS handles the syntax error by copying the appropriate error message from the DFS rom into the error message buffer at the bottom of the hardware stack, from &100 upwards, and then jumping to &100. Figure 8.2 is a hexadecimal and ASCII dump of the error message buffer following the syntax error generated in figure 8.1. 0100 00 DC 53 79 6E 74 61 78 ..Syntax 0108 3A 20 54 59 50 45 20 3C : TYPE < 0110 66 73 70 3E 00 00 00 00 fsp>.... 0118 00 00 00 00 00 00 00 00 ........ Figure 8.2 A memory dump of the error message buffer ----------------------------------------------------- The first byte of the error message buffer is the BRK opcode &00. The next byte is the error number, in this example &DC. The error number is followed by the message "Syntax: TYPE <fsp>" and then another BRK opcode. The DFS rom passed control to the error buffer by jumping to &100. The MOS, after processing the BRK instruction, passed control to the BASIC error handler which printed the message starting at &102 until it encountered the next BRK opcode at &114. When the error was generated by a command within a BASIC program, BASIC added " at line 10" onto the end of the DFS error message. When the MOS processes a BRK instruction it issues service call 6 to all the sideways roms. When service call 6 is issued, the address of the error message number is stored in &FD (low byte) and &FE (high byte). Location &F0 contains a copy of the stack pointer after the BRK was executed and Osbyte &BA (or the less respectable method of peeking location &24A) can be used to find the number of the rom in use when the error was generated. This information will be used in Module 13 when trapping errors generated in other roms is covered. User generated errors within your service roms should be dealt with in the same way that the DFS deals with them. You should copy an error message, starting and ending with the BRK opcode, into the error buffer and then jump to &100 so that the MOS and currently active language can take responsibility for the error handling. An error number normally follows the first BRK opcode but you would be wise to use a second BRK in place of an error number unless your routine has been given an official error number by Acorn. You are unlikely to get an official error number unless you intend to market your programs. . . . .mistake LDX #message MOD 256 \ low byte of error message LDY #message DIV 256 \ high byte of error message JMP error \ jump to error handler .message BRK \ BRK opcode BRK \ error number zero EQUS "User error" BRK \ last byte EQUB &FF \ message termination character . . . .error STX &70 \ store X and Y STY &71 \ for indirect addressing LDY #&FF \ initialise offset .errorloop INY \ increment offset LDA (&70),Y \ read next byte of message STA &100,Y \ copy into error buffer BPL errorloop \ branch if not termination character JMP &100 \ jump to first BRK . . . Figure 8.3 User generated error handling. ------------------------------------------ In the outline error handling routine in figure 8.3, control will be passed to the label ".mistake" after detecting a user generated error. The X and Y registers are loaded with the address of the error message and control is passed to the label ".error". The error message is copied from the rom into the error buffer. The copying stops when &FF is found at the end of the error message and control is then passed to &100. The MOS and the currently active language can then take over the error processing. There is no need to balance the stack before jumping to the BRK instruction at &100. If you have been following the course, you should by now have enough experience to modify the program ENABLE (from Module 4) to include this more sophisticated error handling technique. The error handler in figure 8.3 has been used in the program ERROR. This program uses the now familiar one command interpreter to implement the new command *CHECK (0-6). This syntax means that the command must have an argument in the range from 0 to 6 inclusive. If the argument is outside that range or missing there is a syntax error. The command can be used from within a BASIC program to check which filing system is active. If it is not the one you want, as specified by the argument, then the routine responds with an incorrect filing system error message and aborts the BASIC program. If the active filing system is the one you want then the program will continue running without interuption. The different filing systems are represented by the argument as follows: 0 No filing system active, 1 1200 baud cassette, 2 300 baud cassette, 3 Rom filing system, 4 Disc filing system, 5 Econet filing system, 6 Telesoftware filing system. If you use the command *CHECK without an argument in a BASIC program, the program will abort with an error message "Syntax: *CHECK (0-6) in line xxx". If the DFS is active and you include the command *CHECK 1 in a BASIC program, the program will abort with an error message "Incorrect filing system in line xxx". When the interpreter (lines 290-570) recognises the new command it passes control to the label ".found" (line 580). The argument is initialised (lines 590-600) and the two zero page memory locations used by the routine are pushed on the stack (lines 610-640). The argument is read (line 650). If no argument is found (line 660) control is passed to the label ".mistake" (line 710). After reading the argument it is converted into binary and checked to see if it is in range (lines 670-700). If it is not in range control is passed to the label ".mistake" (line 710). If it is in range the binary representation of the argument is pushed on the stack (line 760), the accumulator and index registers are reset to zero (lines 770-790) and Osargs is called (line 800). The active filing system is returned in the accumulator and stored in &70 (line 810). The argument is pulled off the stack and compared with the active filing system number (lines 820-830). If they are identical the routine restores the zero page locations (lines 890-920), balances the stack (lines 930-950) and returns control to the MOS after reseting the accumulator to zero (lines 960-970). If the active filing system number is not the same as the argument the routine generates the incorrect filing system error message (lines 850-870). The error handler (lines 980-1110) is a little different from the one in figure 8.3 because it restores the two zero page bytes at &70 and &71 before jumping to &100. The registers pushed on the stack by the interpreter are not pulled off before jumping to &100 because the stack is reset by the language error handler after executing the BRK instruction at &100. 10 REM: ERROR 20 MODE7 30 HIMEM=&3C00 40 DIM save 50 50 diff=&8000-HIMEM 60 address=&70 70 comvec=&F2 80 errstack=&100 90 gsinit=&FFC2 100 gsread=&FFC5 110 osargs=&FFDA 120 oscli=&FFF7 130 FOR pass = 0 TO 2 STEP 2 140 P%=HIMEM 150 [ OPT pass 160 BRK 170 BRK 180 BRK 190 JMP service+diff 200 OPT FNequb(&82) 210 OPT FNequb((copyright+diff) MOD 256) 220 BRK 230 .title 240 OPT FNequs("CHECK") 250 .copyright 260 BRK 270 OPT FNequs("(C) Gordon Horsington 1987") 280 BRK 290 .service 300 CMP #4 310 BEQ unrecognised 320 .exit 330 RTS 340 .unrecognised 350 PHA 360 TXA 370 PHA 380 TYA 390 PHA 400 LDX #&FF 410 .comloop 420 INX 430 LDA title+diff,X 440 BEQ found 450 LDA (comvec),Y 460 INY 470 CMP #ASC(".") 480 BEQ found 490 AND #&DF 500 CMP title+diff,X 510 BEQ comloop 520 PLA 530 TAY 540 PLA 550 TAX 560 PLA 570 RTS 580 .found 590 SEC 600 JSR gsinit 610 LDA address 620 PHA 630 LDA address+1 640 PHA 650 JSR gsread 660 BCS mistake 670 SEC 680 SBC #ASC("0") 690 CMP #7 700 BCC file 710 .mistake 720 LDX #(syntax+diff) MOD 256 730 LDY #(syntax+diff) DIV 256 740 JMP error+diff 750 .file 760 PHA 770 LDA #0 780 TAX 790 TAY 800 JSR osargs 810 STA address 820 PLA 830 CMP address 840 BEQ correct 850 LDX #(wrong+diff) MOD 256 860 LDY #(wrong+diff) DIV 256 870 JMP error+diff 880 .correct 890 PLA 900 STA address+1 910 PLA 920 STA address 930 PLA 940 PLA 950 PLA 960 LDA #0 970 RTS 980 .error 990 STX address 1000 STY address+1 1010 LDY #&FF 1020 .errorloop 1030 INY 1040 LDA (address),Y 1050 STA errstack,Y 1060 BPL errorloop 1070 PLA 1080 STA address+1 1090 PLA 1100 STA address 1110 JMP errstack 1120 .syntax 1130 BRK 1140 BRK 1150 OPT FNequs("Syntax") 1160 OPT FNequb(&3A) 1170 OPT FNequs(" *CHECK (0-6)") 1180 BRK 1190 OPT FNequb(&FF) 1200 .wrong 1210 BRK 1220 BRK 1230 OPT FNequs("Incorrect filing system") 1240 BRK 1250 OPT FNequb(&FF) 1260 .lastbyte 1270 ] 1280 NEXT 1290 INPUT'"Save filename = "filename$ 1300 IF filename$="" END 1310 $save="SAVE "+filename$+" "+STR$~(HIMEM)+" "+STR$~(las tbyte)+" FFFF8000 FFFF8000" 1320 X%=save MOD 256 1330 Y%=save DIV 256 1340 *OPT1,2 1350 CALL oscli 1360 *OPT1,0 1370 END 1380 DEFFNequb(byte) 1390 ?P%=byte 1400 P%=P%+1 1410 =pass 1420 DEFFNequw(word) 1430 ?P%=word MOD 256 1440 P%?1=word DIV 256 1450 P%=P%+2 1460 =pass 1470 DEFFNequd(double) 1480 !P%=double 1490 P%=P%+4 1500 =pass 1510 DEFFNequs(string$) 1520 $P%=string$ 1530 P%=P%+LEN(string$) 1540 =pass
00000000 4d 61 73 74 65 72 69 6e 67 20 53 69 64 65 77 61 |Mastering Sidewa| 00000010 79 73 20 52 4f 4d 20 26 20 52 41 4d 20 2d 20 4d |ys ROM & RAM - M| 00000020 6f 64 75 6c 65 20 30 38 20 2d 20 53 65 72 76 69 |odule 08 - Servi| 00000030 63 65 20 72 6f 6d 20 65 72 72 6f 72 73 0d 2d 2d |ce rom errors.--| 00000040 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000070 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0d 20 20 49 |-----------.. I| 00000080 6e 20 4d 6f 64 75 6c 65 20 34 20 79 6f 75 20 77 |n Module 4 you w| 00000090 65 72 65 20 73 68 6f 77 6e 20 68 6f 77 20 74 6f |ere shown how to| 000000a0 20 75 73 65 20 74 68 65 20 44 46 53 20 63 6f 6d | use the DFS com| 000000b0 6d 61 6e 64 20 2a 45 4e 41 42 4c 45 20 77 69 74 |mand *ENABLE wit| 000000c0 68 69 6e 0d 79 6f 75 72 20 6f 77 6e 20 53 57 52 |hin.your own SWR| 000000d0 20 70 72 6f 67 72 61 6d 73 2e 20 49 66 20 79 6f | programs. If yo| 000000e0 75 20 6c 6f 6f 6b 20 63 61 72 65 66 75 6c 6c 79 |u look carefully| 000000f0 20 61 74 20 74 68 65 20 70 72 6f 67 72 61 6d 20 | at the program | 00000100 45 4e 41 42 4c 45 0d 75 73 65 64 20 74 6f 20 69 |ENABLE.used to i| 00000110 6c 6c 75 73 74 72 61 74 65 20 4d 6f 64 75 6c 65 |llustrate Module| 00000120 20 34 20 79 6f 75 20 77 69 6c 6c 20 73 65 65 20 | 4 you will see | 00000130 74 68 61 74 20 74 68 65 20 72 65 73 65 74 20 72 |that the reset r| 00000140 6f 75 74 69 6e 65 20 69 73 0d 6f 6e 6c 79 20 65 |outine is.only e| 00000150 78 65 63 75 74 65 64 20 69 66 20 2a 45 4e 41 42 |xecuted if *ENAB| 00000160 4c 45 20 69 73 20 74 79 70 65 64 20 62 65 66 6f |LE is typed befo| 00000170 72 65 20 2a 52 45 53 45 54 2e 20 49 66 20 61 6e |re *RESET. If an| 00000180 79 20 6f 74 68 65 72 20 63 6f 6d 6d 61 6e 64 0d |y other command.| 00000190 69 73 20 74 79 70 65 64 20 62 65 66 6f 72 65 20 |is typed before | 000001a0 2a 52 45 53 45 54 20 74 68 65 20 69 6e 74 65 72 |*RESET the inter| 000001b0 70 72 65 74 65 72 20 73 69 6d 70 6c 79 20 72 65 |preter simply re| 000001c0 74 75 72 6e 73 20 63 6f 6e 74 72 6f 6c 20 74 6f |turns control to| 000001d0 20 74 68 65 0d 4d 4f 53 20 77 69 74 68 20 74 68 | the.MOS with th| 000001e0 65 20 61 63 63 75 6d 75 6c 61 74 6f 72 20 72 65 |e accumulator re| 000001f0 73 65 74 20 74 6f 20 7a 65 72 6f 2e 20 54 68 69 |set to zero. Thi| 00000200 73 20 69 73 20 74 68 65 20 73 69 6d 70 6c 65 73 |s is the simples| 00000210 74 20 66 6f 72 6d 20 6f 66 0d 65 72 72 6f 72 20 |t form of.error | 00000220 68 61 6e 64 6c 69 6e 67 20 2d 20 69 66 20 74 68 |handling - if th| 00000230 65 20 75 73 65 72 20 74 79 70 65 73 20 73 6f 6d |e user types som| 00000240 65 74 68 69 6e 67 20 75 6e 65 78 70 65 63 74 65 |ething unexpecte| 00000250 64 20 72 65 74 75 72 6e 20 77 69 74 68 0d 74 68 |d return with.th| 00000260 65 20 61 63 63 75 6d 75 6c 61 74 6f 72 20 72 65 |e accumulator re| 00000270 73 65 74 20 74 6f 20 7a 65 72 6f 2e 0d 0d 20 20 |set to zero... | 00000280 49 6e 20 74 68 69 73 20 6d 6f 64 75 6c 65 20 49 |In this module I| 00000290 20 77 69 6c 6c 20 73 68 6f 77 20 79 6f 75 20 68 | will show you h| 000002a0 6f 77 20 74 6f 20 64 65 61 6c 20 77 69 74 68 20 |ow to deal with | 000002b0 75 73 65 72 20 67 65 6e 65 72 61 74 65 64 0d 65 |user generated.e| 000002c0 72 72 6f 72 73 20 77 69 74 68 69 6e 20 53 57 52 |rrors within SWR| 000002d0 20 73 65 72 76 69 63 65 20 72 6f 75 74 69 6e 65 | service routine| 000002e0 73 20 69 6e 20 73 75 63 68 20 61 20 77 61 79 20 |s in such a way | 000002f0 74 68 61 74 20 61 6e 20 65 72 72 6f 72 20 77 69 |that an error wi| 00000300 6c 6c 0d 61 62 6f 72 74 20 61 20 42 41 53 49 43 |ll.abort a BASIC| 00000310 20 70 72 6f 67 72 61 6d 20 61 6e 64 20 70 72 69 | program and pri| 00000320 6e 74 20 61 6e 20 61 70 70 72 6f 70 72 69 61 74 |nt an appropriat| 00000330 65 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 2e |e error message.| 00000340 20 54 68 65 20 77 61 79 0d 6f 66 20 64 65 61 6c | The way.of deal| 00000350 69 6e 67 20 77 69 74 68 20 65 72 72 6f 72 73 20 |ing with errors | 00000360 69 6e 20 6c 61 6e 67 75 61 67 65 20 72 6f 6d 73 |in language roms| 00000370 20 69 73 20 64 69 66 66 65 72 65 6e 74 20 66 72 | is different fr| 00000380 6f 6d 20 74 68 65 20 6d 65 74 68 6f 64 0d 64 65 |om the method.de| 00000390 73 63 72 69 62 65 64 20 68 65 72 65 20 61 6e 64 |scribed here and| 000003a0 20 77 69 6c 6c 20 62 65 20 64 65 61 6c 74 20 77 | will be dealt w| 000003b0 69 74 68 20 69 6e 20 4d 6f 64 75 6c 65 20 31 37 |ith in Module 17| 000003c0 2e 0d 0d 20 20 46 69 67 75 72 65 20 38 2e 31 20 |... Figure 8.1 | 000003d0 69 6c 6c 75 73 74 72 61 74 65 73 20 68 6f 77 20 |illustrates how | 000003e0 74 68 65 20 44 46 53 20 72 6f 6d 20 72 65 73 70 |the DFS rom resp| 000003f0 6f 6e 64 73 20 74 6f 20 75 73 65 72 20 67 65 6e |onds to user gen| 00000400 65 72 61 74 65 64 0d 65 72 72 6f 72 73 20 73 75 |erated.errors su| 00000410 63 68 20 61 73 20 6e 65 67 6c 65 63 74 69 6e 67 |ch as neglecting| 00000420 20 74 6f 20 69 6e 63 6c 75 64 65 20 61 20 6d 61 | to include a ma| 00000430 6e 64 61 74 6f 72 79 20 61 72 67 75 6d 65 6e 74 |ndatory argument| 00000440 2e 20 49 66 20 79 6f 75 0d 65 6e 74 65 72 20 74 |. If you.enter t| 00000450 68 65 20 44 46 53 20 63 6f 6d 6d 61 6e 64 20 2a |he DFS command *| 00000460 54 59 50 45 20 77 69 74 68 6f 75 74 20 61 6e 20 |TYPE without an | 00000470 61 72 67 75 6d 65 6e 74 2c 20 74 68 65 20 44 46 |argument, the DF| 00000480 53 20 72 65 73 70 6f 6e 64 73 20 62 79 0d 6d 61 |S responds by.ma| 00000490 6b 69 6e 67 20 74 68 65 20 63 75 72 72 65 6e 74 |king the current| 000004a0 20 6c 61 6e 67 75 61 67 65 20 70 72 69 6e 74 20 | language print | 000004b0 74 68 65 20 73 79 6e 74 61 78 20 69 74 20 65 78 |the syntax it ex| 000004c0 70 65 63 74 73 2e 20 49 66 20 79 6f 75 20 6d 61 |pects. If you ma| 000004d0 6b 65 0d 74 68 65 20 73 61 6d 65 20 6d 69 73 74 |ke.the same mist| 000004e0 61 6b 65 20 77 69 74 68 69 6e 20 61 20 72 75 6e |ake within a run| 000004f0 6e 69 6e 67 20 42 41 53 49 43 20 70 72 6f 67 72 |ning BASIC progr| 00000500 61 6d 20 74 68 65 20 44 46 53 20 6d 61 6b 65 73 |am the DFS makes| 00000510 20 74 68 65 0d 73 79 6e 74 61 78 20 6d 65 73 73 | the.syntax mess| 00000520 61 67 65 20 61 76 61 69 6c 61 62 6c 65 20 74 6f |age available to| 00000530 20 42 41 53 49 43 20 61 6e 64 20 61 62 6f 72 74 | BASIC and abort| 00000540 73 20 74 68 65 20 42 41 53 49 43 20 70 72 6f 67 |s the BASIC prog| 00000550 72 61 6d 2e 20 42 41 53 49 43 0d 74 68 65 6e 20 |ram. BASIC.then | 00000560 70 72 69 6e 74 73 20 74 68 65 20 6d 65 73 73 61 |prints the messa| 00000570 67 65 20 61 6e 64 20 74 68 65 20 6c 69 6e 65 20 |ge and the line | 00000580 6e 75 6d 62 65 72 20 69 6e 20 77 68 69 63 68 20 |number in which | 00000590 74 68 65 20 65 72 72 6f 72 20 77 61 73 0d 67 65 |the error was.ge| 000005a0 6e 65 72 61 74 65 64 2e 0d 0d 0d 0d 3e 2a 54 59 |nerated.....>*TY| 000005b0 50 45 0d 0d 53 79 6e 74 61 78 3a 20 54 59 50 45 |PE..Syntax: TYPE| 000005c0 20 3c 66 73 70 3e 0d 3e 4e 45 57 0d 3e 31 30 20 | <fsp>.>NEW.>10 | 000005d0 2a 54 59 50 45 0d 3e 32 30 20 53 54 4f 50 0d 3e |*TYPE.>20 STOP.>| 000005e0 52 55 4e 0d 0d 53 79 6e 74 61 78 3a 20 54 59 50 |RUN..Syntax: TYP| 000005f0 45 20 3c 66 73 70 3e 20 61 74 20 6c 69 6e 65 20 |E <fsp> at line | 00000600 31 30 0d 3e 0d 0d 46 69 67 75 72 65 20 38 2e 31 |10.>..Figure 8.1| 00000610 20 45 72 72 6f 72 20 68 61 6e 64 6c 69 6e 67 20 | Error handling | 00000620 62 79 20 74 68 65 20 44 46 53 0d 2d 2d 2d 2d 2d |by the DFS.-----| 00000630 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000640 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d |---------------.| 00000650 0d 0d 0d 20 20 54 68 65 20 44 46 53 20 68 61 6e |... The DFS han| 00000660 64 6c 65 73 20 74 68 65 20 73 79 6e 74 61 78 20 |dles the syntax | 00000670 65 72 72 6f 72 20 62 79 20 63 6f 70 79 69 6e 67 |error by copying| 00000680 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 | the appropriate| 00000690 20 65 72 72 6f 72 0d 6d 65 73 73 61 67 65 20 66 | error.message f| 000006a0 72 6f 6d 20 74 68 65 20 44 46 53 20 72 6f 6d 20 |rom the DFS rom | 000006b0 69 6e 74 6f 20 74 68 65 20 65 72 72 6f 72 20 6d |into the error m| 000006c0 65 73 73 61 67 65 20 62 75 66 66 65 72 20 61 74 |essage buffer at| 000006d0 20 74 68 65 20 62 6f 74 74 6f 6d 0d 6f 66 20 74 | the bottom.of t| 000006e0 68 65 20 68 61 72 64 77 61 72 65 20 73 74 61 63 |he hardware stac| 000006f0 6b 2c 20 66 72 6f 6d 20 26 31 30 30 20 75 70 77 |k, from &100 upw| 00000700 61 72 64 73 2c 20 61 6e 64 20 74 68 65 6e 20 6a |ards, and then j| 00000710 75 6d 70 69 6e 67 20 74 6f 20 26 31 30 30 2e 0d |umping to &100..| 00000720 0d 20 20 46 69 67 75 72 65 20 38 2e 32 20 69 73 |. Figure 8.2 is| 00000730 20 61 20 68 65 78 61 64 65 63 69 6d 61 6c 20 61 | a hexadecimal a| 00000740 6e 64 20 41 53 43 49 49 20 64 75 6d 70 20 6f 66 |nd ASCII dump of| 00000750 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73 73 61 | the error messa| 00000760 67 65 0d 62 75 66 66 65 72 20 66 6f 6c 6c 6f 77 |ge.buffer follow| 00000770 69 6e 67 20 74 68 65 20 73 79 6e 74 61 78 20 65 |ing the syntax e| 00000780 72 72 6f 72 20 67 65 6e 65 72 61 74 65 64 20 69 |rror generated i| 00000790 6e 20 66 69 67 75 72 65 20 38 2e 31 2e 0d 0d 0d |n figure 8.1....| 000007a0 0d 0d 0d 30 31 30 30 20 20 30 30 20 44 43 20 35 |...0100 00 DC 5| 000007b0 33 20 37 39 20 36 45 20 37 34 20 36 31 20 37 38 |3 79 6E 74 61 78| 000007c0 20 20 2e 2e 53 79 6e 74 61 78 0d 30 31 30 38 20 | ..Syntax.0108 | 000007d0 20 33 41 20 32 30 20 35 34 20 35 39 20 35 30 20 | 3A 20 54 59 50 | 000007e0 34 35 20 32 30 20 33 43 20 20 3a 20 54 59 50 45 |45 20 3C : TYPE| 000007f0 20 3c 0d 30 31 31 30 20 20 36 36 20 37 33 20 37 | <.0110 66 73 7| 00000800 30 20 33 45 20 30 30 20 30 30 20 30 30 20 30 30 |0 3E 00 00 00 00| 00000810 20 20 66 73 70 3e 2e 2e 2e 2e 0d 30 31 31 38 20 | fsp>.....0118 | 00000820 20 30 30 20 30 30 20 30 30 20 30 30 20 30 30 20 | 00 00 00 00 00 | 00000830 30 30 20 30 30 20 30 30 20 20 2e 2e 2e 2e 2e 2e |00 00 00 ......| 00000840 2e 2e 0d 0d 46 69 67 75 72 65 20 38 2e 32 20 20 |....Figure 8.2 | 00000850 41 20 6d 65 6d 6f 72 79 20 64 75 6d 70 20 6f 66 |A memory dump of| 00000860 20 74 68 65 20 65 72 72 6f 72 20 6d 65 73 73 61 | the error messa| 00000870 67 65 20 62 75 66 66 65 72 0d 2d 2d 2d 2d 2d 2d |ge buffer.------| 00000880 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000008a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d |---------------.| 000008b0 0d 0d 0d 0d 20 20 54 68 65 20 66 69 72 73 74 20 |.... The first | 000008c0 62 79 74 65 20 6f 66 20 74 68 65 20 65 72 72 6f |byte of the erro| 000008d0 72 20 6d 65 73 73 61 67 65 20 62 75 66 66 65 72 |r message buffer| 000008e0 20 69 73 20 74 68 65 20 42 52 4b 20 6f 70 63 6f | is the BRK opco| 000008f0 64 65 20 26 30 30 2e 0d 54 68 65 20 6e 65 78 74 |de &00..The next| 00000900 20 62 79 74 65 20 69 73 20 74 68 65 20 65 72 72 | byte is the err| 00000910 6f 72 20 6e 75 6d 62 65 72 2c 20 69 6e 20 74 68 |or number, in th| 00000920 69 73 20 65 78 61 6d 70 6c 65 20 26 44 43 2e 20 |is example &DC. | 00000930 54 68 65 20 65 72 72 6f 72 0d 6e 75 6d 62 65 72 |The error.number| 00000940 20 69 73 20 66 6f 6c 6c 6f 77 65 64 20 62 79 20 | is followed by | 00000950 74 68 65 20 6d 65 73 73 61 67 65 20 22 53 79 6e |the message "Syn| 00000960 74 61 78 3a 20 54 59 50 45 20 3c 66 73 70 3e 22 |tax: TYPE <fsp>"| 00000970 20 61 6e 64 20 74 68 65 6e 0d 61 6e 6f 74 68 65 | and then.anothe| 00000980 72 20 42 52 4b 20 6f 70 63 6f 64 65 2e 0d 0d 20 |r BRK opcode... | 00000990 20 54 68 65 20 44 46 53 20 72 6f 6d 20 70 61 73 | The DFS rom pas| 000009a0 73 65 64 20 63 6f 6e 74 72 6f 6c 20 74 6f 20 74 |sed control to t| 000009b0 68 65 20 65 72 72 6f 72 20 62 75 66 66 65 72 20 |he error buffer | 000009c0 62 79 20 6a 75 6d 70 69 6e 67 20 74 6f 20 26 31 |by jumping to &1| 000009d0 30 30 2e 0d 54 68 65 20 4d 4f 53 2c 20 61 66 74 |00..The MOS, aft| 000009e0 65 72 20 70 72 6f 63 65 73 73 69 6e 67 20 74 68 |er processing th| 000009f0 65 20 42 52 4b 20 69 6e 73 74 72 75 63 74 69 6f |e BRK instructio| 00000a00 6e 2c 20 70 61 73 73 65 64 20 63 6f 6e 74 72 6f |n, passed contro| 00000a10 6c 20 74 6f 20 74 68 65 0d 42 41 53 49 43 20 65 |l to the.BASIC e| 00000a20 72 72 6f 72 20 68 61 6e 64 6c 65 72 20 77 68 69 |rror handler whi| 00000a30 63 68 20 70 72 69 6e 74 65 64 20 74 68 65 20 6d |ch printed the m| 00000a40 65 73 73 61 67 65 20 73 74 61 72 74 69 6e 67 20 |essage starting | 00000a50 61 74 20 26 31 30 32 20 75 6e 74 69 6c 0d 69 74 |at &102 until.it| 00000a60 20 65 6e 63 6f 75 6e 74 65 72 65 64 20 74 68 65 | encountered the| 00000a70 20 6e 65 78 74 20 42 52 4b 20 6f 70 63 6f 64 65 | next BRK opcode| 00000a80 20 61 74 20 26 31 31 34 2e 20 57 68 65 6e 20 74 | at &114. When t| 00000a90 68 65 20 65 72 72 6f 72 20 77 61 73 0d 67 65 6e |he error was.gen| 00000aa0 65 72 61 74 65 64 20 62 79 20 61 20 63 6f 6d 6d |erated by a comm| 00000ab0 61 6e 64 20 77 69 74 68 69 6e 20 61 20 42 41 53 |and within a BAS| 00000ac0 49 43 20 70 72 6f 67 72 61 6d 2c 20 42 41 53 49 |IC program, BASI| 00000ad0 43 20 61 64 64 65 64 20 22 20 61 74 20 6c 69 6e |C added " at lin| 00000ae0 65 0d 31 30 22 20 6f 6e 74 6f 20 74 68 65 20 65 |e.10" onto the e| 00000af0 6e 64 20 6f 66 20 74 68 65 20 44 46 53 20 65 72 |nd of the DFS er| 00000b00 72 6f 72 20 6d 65 73 73 61 67 65 2e 0d 0d 20 20 |ror message... | 00000b10 57 68 65 6e 20 74 68 65 20 4d 4f 53 20 70 72 6f |When the MOS pro| 00000b20 63 65 73 73 65 73 20 61 20 42 52 4b 20 69 6e 73 |cesses a BRK ins| 00000b30 74 72 75 63 74 69 6f 6e 20 69 74 20 69 73 73 75 |truction it issu| 00000b40 65 73 20 73 65 72 76 69 63 65 20 63 61 6c 6c 20 |es service call | 00000b50 36 20 74 6f 0d 61 6c 6c 20 74 68 65 20 73 69 64 |6 to.all the sid| 00000b60 65 77 61 79 73 20 72 6f 6d 73 2e 20 57 68 65 6e |eways roms. When| 00000b70 20 73 65 72 76 69 63 65 20 63 61 6c 6c 20 36 20 | service call 6 | 00000b80 69 73 20 69 73 73 75 65 64 2c 20 74 68 65 20 61 |is issued, the a| 00000b90 64 64 72 65 73 73 20 6f 66 0d 74 68 65 20 65 72 |ddress of.the er| 00000ba0 72 6f 72 20 6d 65 73 73 61 67 65 20 6e 75 6d 62 |ror message numb| 00000bb0 65 72 20 69 73 20 73 74 6f 72 65 64 20 69 6e 20 |er is stored in | 00000bc0 26 46 44 20 28 6c 6f 77 20 62 79 74 65 29 20 61 |&FD (low byte) a| 00000bd0 6e 64 20 26 46 45 20 28 68 69 67 68 0d 62 79 74 |nd &FE (high.byt| 00000be0 65 29 2e 20 4c 6f 63 61 74 69 6f 6e 20 26 46 30 |e). Location &F0| 00000bf0 20 63 6f 6e 74 61 69 6e 73 20 61 20 63 6f 70 79 | contains a copy| 00000c00 20 6f 66 20 74 68 65 20 73 74 61 63 6b 20 70 6f | of the stack po| 00000c10 69 6e 74 65 72 20 61 66 74 65 72 20 74 68 65 20 |inter after the | 00000c20 42 52 4b 0d 77 61 73 20 65 78 65 63 75 74 65 64 |BRK.was executed| 00000c30 20 61 6e 64 20 4f 73 62 79 74 65 20 26 42 41 20 | and Osbyte &BA | 00000c40 28 6f 72 20 74 68 65 20 6c 65 73 73 20 72 65 73 |(or the less res| 00000c50 70 65 63 74 61 62 6c 65 20 6d 65 74 68 6f 64 20 |pectable method | 00000c60 6f 66 20 70 65 65 6b 69 6e 67 0d 6c 6f 63 61 74 |of peeking.locat| 00000c70 69 6f 6e 20 26 32 34 41 29 20 63 61 6e 20 62 65 |ion &24A) can be| 00000c80 20 75 73 65 64 20 74 6f 20 66 69 6e 64 20 74 68 | used to find th| 00000c90 65 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 |e number of the | 00000ca0 72 6f 6d 20 69 6e 20 75 73 65 20 77 68 65 6e 0d |rom in use when.| 00000cb0 74 68 65 20 65 72 72 6f 72 20 77 61 73 20 67 65 |the error was ge| 00000cc0 6e 65 72 61 74 65 64 2e 20 54 68 69 73 20 69 6e |nerated. This in| 00000cd0 66 6f 72 6d 61 74 69 6f 6e 20 77 69 6c 6c 20 62 |formation will b| 00000ce0 65 20 75 73 65 64 20 69 6e 20 4d 6f 64 75 6c 65 |e used in Module| 00000cf0 20 31 33 0d 77 68 65 6e 20 74 72 61 70 70 69 6e | 13.when trappin| 00000d00 67 20 65 72 72 6f 72 73 20 67 65 6e 65 72 61 74 |g errors generat| 00000d10 65 64 20 69 6e 20 6f 74 68 65 72 20 72 6f 6d 73 |ed in other roms| 00000d20 20 69 73 20 63 6f 76 65 72 65 64 2e 0d 0d 20 20 | is covered... | 00000d30 55 73 65 72 20 67 65 6e 65 72 61 74 65 64 20 65 |User generated e| 00000d40 72 72 6f 72 73 20 77 69 74 68 69 6e 20 79 6f 75 |rrors within you| 00000d50 72 20 73 65 72 76 69 63 65 20 72 6f 6d 73 20 73 |r service roms s| 00000d60 68 6f 75 6c 64 20 62 65 20 64 65 61 6c 74 20 77 |hould be dealt w| 00000d70 69 74 68 0d 69 6e 20 74 68 65 20 73 61 6d 65 20 |ith.in the same | 00000d80 77 61 79 20 74 68 61 74 20 74 68 65 20 44 46 53 |way that the DFS| 00000d90 20 64 65 61 6c 73 20 77 69 74 68 20 74 68 65 6d | deals with them| 00000da0 2e 20 59 6f 75 20 73 68 6f 75 6c 64 20 63 6f 70 |. You should cop| 00000db0 79 20 61 6e 20 65 72 72 6f 72 0d 6d 65 73 73 61 |y an error.messa| 00000dc0 67 65 2c 20 73 74 61 72 74 69 6e 67 20 61 6e 64 |ge, starting and| 00000dd0 20 65 6e 64 69 6e 67 20 77 69 74 68 20 74 68 65 | ending with the| 00000de0 20 42 52 4b 20 6f 70 63 6f 64 65 2c 20 69 6e 74 | BRK opcode, int| 00000df0 6f 20 74 68 65 20 65 72 72 6f 72 0d 62 75 66 66 |o the error.buff| 00000e00 65 72 20 61 6e 64 20 74 68 65 6e 20 6a 75 6d 70 |er and then jump| 00000e10 20 74 6f 20 26 31 30 30 20 73 6f 20 74 68 61 74 | to &100 so that| 00000e20 20 74 68 65 20 4d 4f 53 20 61 6e 64 20 63 75 72 | the MOS and cur| 00000e30 72 65 6e 74 6c 79 20 61 63 74 69 76 65 0d 6c 61 |rently active.la| 00000e40 6e 67 75 61 67 65 20 63 61 6e 20 74 61 6b 65 20 |nguage can take | 00000e50 72 65 73 70 6f 6e 73 69 62 69 6c 69 74 79 20 66 |responsibility f| 00000e60 6f 72 20 74 68 65 20 65 72 72 6f 72 20 68 61 6e |or the error han| 00000e70 64 6c 69 6e 67 2e 20 41 6e 20 65 72 72 6f 72 0d |dling. An error.| 00000e80 6e 75 6d 62 65 72 20 6e 6f 72 6d 61 6c 6c 79 20 |number normally | 00000e90 66 6f 6c 6c 6f 77 73 20 74 68 65 20 66 69 72 73 |follows the firs| 00000ea0 74 20 42 52 4b 20 6f 70 63 6f 64 65 20 62 75 74 |t BRK opcode but| 00000eb0 20 79 6f 75 20 77 6f 75 6c 64 20 62 65 20 77 69 | you would be wi| 00000ec0 73 65 20 74 6f 0d 75 73 65 20 61 20 73 65 63 6f |se to.use a seco| 00000ed0 6e 64 20 42 52 4b 20 69 6e 20 70 6c 61 63 65 20 |nd BRK in place | 00000ee0 6f 66 20 61 6e 20 65 72 72 6f 72 20 6e 75 6d 62 |of an error numb| 00000ef0 65 72 20 75 6e 6c 65 73 73 20 79 6f 75 72 20 72 |er unless your r| 00000f00 6f 75 74 69 6e 65 20 68 61 73 0d 62 65 65 6e 20 |outine has.been | 00000f10 67 69 76 65 6e 20 61 6e 20 6f 66 66 69 63 69 61 |given an officia| 00000f20 6c 20 65 72 72 6f 72 20 6e 75 6d 62 65 72 20 62 |l error number b| 00000f30 79 20 41 63 6f 72 6e 2e 20 59 6f 75 20 61 72 65 |y Acorn. You are| 00000f40 20 75 6e 6c 69 6b 65 6c 79 20 74 6f 20 67 65 74 | unlikely to get| 00000f50 0d 61 6e 20 6f 66 66 69 63 69 61 6c 20 65 72 72 |.an official err| 00000f60 6f 72 20 6e 75 6d 62 65 72 20 75 6e 6c 65 73 73 |or number unless| 00000f70 20 79 6f 75 20 69 6e 74 65 6e 64 20 74 6f 20 6d | you intend to m| 00000f80 61 72 6b 65 74 20 79 6f 75 72 20 70 72 6f 67 72 |arket your progr| 00000f90 61 6d 73 2e 0d 0d 0d 0d 0d 20 20 20 20 20 20 20 |ams...... | 00000fa0 20 20 2e 0d 20 20 20 20 20 20 20 20 20 2e 0d 20 | .. .. | 00000fb0 20 20 20 20 20 20 20 20 2e 0d 2e 6d 69 73 74 61 | ...mista| 00000fc0 6b 65 0d 20 20 20 20 20 20 20 20 4c 44 58 20 23 |ke. LDX #| 00000fd0 6d 65 73 73 61 67 65 20 4d 4f 44 20 32 35 36 20 |message MOD 256 | 00000fe0 5c 20 6c 6f 77 20 62 79 74 65 20 6f 66 20 65 72 |\ low byte of er| 00000ff0 72 6f 72 20 6d 65 73 73 61 67 65 0d 20 20 20 20 |ror message. | 00001000 20 20 20 20 4c 44 59 20 23 6d 65 73 73 61 67 65 | LDY #message| 00001010 20 44 49 56 20 32 35 36 20 5c 20 68 69 67 68 20 | DIV 256 \ high | 00001020 62 79 74 65 20 6f 66 20 65 72 72 6f 72 20 6d 65 |byte of error me| 00001030 73 73 61 67 65 0d 20 20 20 20 20 20 20 20 4a 4d |ssage. JM| 00001040 50 20 65 72 72 6f 72 20 20 20 20 20 20 20 20 20 |P error | 00001050 20 20 20 5c 20 6a 75 6d 70 20 74 6f 20 65 72 72 | \ jump to err| 00001060 6f 72 20 68 61 6e 64 6c 65 72 0d 2e 6d 65 73 73 |or handler..mess| 00001070 61 67 65 0d 20 20 20 20 20 20 20 20 42 52 4b 20 |age. BRK | 00001080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001090 20 5c 20 42 52 4b 20 6f 70 63 6f 64 65 0d 20 20 | \ BRK opcode. | 000010a0 20 20 20 20 20 20 42 52 4b 20 20 20 20 20 20 20 | BRK | 000010b0 20 20 20 20 20 20 20 20 20 20 20 5c 20 65 72 72 | \ err| 000010c0 6f 72 20 6e 75 6d 62 65 72 20 7a 65 72 6f 0d 20 |or number zero. | 000010d0 20 20 20 20 20 20 20 45 51 55 53 20 22 55 73 65 | EQUS "Use| 000010e0 72 20 65 72 72 6f 72 22 0d 20 20 20 20 20 20 20 |r error". | 000010f0 20 42 52 4b 20 20 20 20 20 20 20 20 20 20 20 20 | BRK | 00001100 20 20 20 20 20 20 5c 20 6c 61 73 74 20 62 79 74 | \ last byt| 00001110 65 0d 20 20 20 20 20 20 20 20 45 51 55 42 20 26 |e. EQUB &| 00001120 46 46 20 20 20 20 20 20 20 20 20 20 20 20 20 5c |FF \| 00001130 20 6d 65 73 73 61 67 65 20 74 65 72 6d 69 6e 61 | message termina| 00001140 74 69 6f 6e 20 63 68 61 72 61 63 74 65 72 0d 20 |tion character. | 00001150 20 20 20 20 20 20 20 20 2e 0d 20 20 20 20 20 20 | .. | 00001160 20 20 20 2e 0d 20 20 20 20 20 20 20 20 20 2e 0d | .. ..| 00001170 2e 65 72 72 6f 72 0d 20 20 20 20 20 20 20 20 53 |.error. S| 00001180 54 58 20 26 37 30 20 20 20 20 20 20 20 20 20 20 |TX &70 | 00001190 20 20 20 20 5c 20 73 74 6f 72 65 20 58 20 61 6e | \ store X an| 000011a0 64 20 59 0d 20 20 20 20 20 20 20 20 53 54 59 20 |d Y. STY | 000011b0 26 37 31 20 20 20 20 20 20 20 20 20 20 20 20 20 |&71 | 000011c0 20 5c 20 66 6f 72 20 69 6e 64 69 72 65 63 74 20 | \ for indirect | 000011d0 61 64 64 72 65 73 73 69 6e 67 0d 20 20 20 20 20 |addressing. | 000011e0 20 20 20 4c 44 59 20 23 26 46 46 20 20 20 20 20 | LDY #&FF | 000011f0 20 20 20 20 20 20 20 20 5c 20 69 6e 69 74 69 61 | \ initia| 00001200 6c 69 73 65 20 6f 66 66 73 65 74 0d 2e 65 72 72 |lise offset..err| 00001210 6f 72 6c 6f 6f 70 0d 20 20 20 20 20 20 20 20 49 |orloop. I| 00001220 4e 59 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |NY | 00001230 20 20 20 20 5c 20 69 6e 63 72 65 6d 65 6e 74 20 | \ increment | 00001240 6f 66 66 73 65 74 0d 20 20 20 20 20 20 20 20 4c |offset. L| 00001250 44 41 20 28 26 37 30 29 2c 59 20 20 20 20 20 20 |DA (&70),Y | 00001260 20 20 20 20 5c 20 72 65 61 64 20 6e 65 78 74 20 | \ read next | 00001270 62 79 74 65 20 6f 66 20 6d 65 73 73 61 67 65 0d |byte of message.| 00001280 20 20 20 20 20 20 20 20 53 54 41 20 26 31 30 30 | STA &100| 00001290 2c 59 20 20 20 20 20 20 20 20 20 20 20 5c 20 63 |,Y \ c| 000012a0 6f 70 79 20 69 6e 74 6f 20 65 72 72 6f 72 20 62 |opy into error b| 000012b0 75 66 66 65 72 0d 20 20 20 20 20 20 20 20 42 50 |uffer. BP| 000012c0 4c 20 65 72 72 6f 72 6c 6f 6f 70 20 20 20 20 20 |L errorloop | 000012d0 20 20 20 5c 20 62 72 61 6e 63 68 20 69 66 20 6e | \ branch if n| 000012e0 6f 74 20 74 65 72 6d 69 6e 61 74 69 6f 6e 20 63 |ot termination c| 000012f0 68 61 72 61 63 74 65 72 0d 20 20 20 20 20 20 20 |haracter. | 00001300 20 4a 4d 50 20 26 31 30 30 20 20 20 20 20 20 20 | JMP &100 | 00001310 20 20 20 20 20 20 5c 20 6a 75 6d 70 20 74 6f 20 | \ jump to | 00001320 66 69 72 73 74 20 42 52 4b 0d 20 20 20 20 20 20 |first BRK. | 00001330 20 20 20 2e 0d 20 20 20 20 20 20 20 20 20 2e 0d | .. ..| 00001340 20 20 20 20 20 20 20 20 20 2e 0d 0d 46 69 67 75 | ...Figu| 00001350 72 65 20 38 2e 33 20 20 55 73 65 72 20 67 65 6e |re 8.3 User gen| 00001360 65 72 61 74 65 64 20 65 72 72 6f 72 20 68 61 6e |erated error han| 00001370 64 6c 69 6e 67 2e 0d 2d 2d 2d 2d 2d 2d 2d 2d 2d |dling..---------| 00001380 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000013a0 2d 0d 0d 0d 0d 0d 20 20 49 6e 20 74 68 65 20 6f |-..... In the o| 000013b0 75 74 6c 69 6e 65 20 65 72 72 6f 72 20 68 61 6e |utline error han| 000013c0 64 6c 69 6e 67 20 72 6f 75 74 69 6e 65 20 69 6e |dling routine in| 000013d0 20 66 69 67 75 72 65 20 38 2e 33 2c 20 63 6f 6e | figure 8.3, con| 000013e0 74 72 6f 6c 20 77 69 6c 6c 20 62 65 0d 70 61 73 |trol will be.pas| 000013f0 73 65 64 20 74 6f 20 74 68 65 20 6c 61 62 65 6c |sed to the label| 00001400 20 22 2e 6d 69 73 74 61 6b 65 22 20 61 66 74 65 | ".mistake" afte| 00001410 72 20 64 65 74 65 63 74 69 6e 67 20 61 20 75 73 |r detecting a us| 00001420 65 72 20 67 65 6e 65 72 61 74 65 64 20 65 72 72 |er generated err| 00001430 6f 72 2e 0d 54 68 65 20 58 20 61 6e 64 20 59 20 |or..The X and Y | 00001440 72 65 67 69 73 74 65 72 73 20 61 72 65 20 6c 6f |registers are lo| 00001450 61 64 65 64 20 77 69 74 68 20 74 68 65 20 61 64 |aded with the ad| 00001460 64 72 65 73 73 20 6f 66 20 74 68 65 20 65 72 72 |dress of the err| 00001470 6f 72 20 6d 65 73 73 61 67 65 0d 61 6e 64 20 63 |or message.and c| 00001480 6f 6e 74 72 6f 6c 20 69 73 20 70 61 73 73 65 64 |ontrol is passed| 00001490 20 74 6f 20 74 68 65 20 6c 61 62 65 6c 20 22 2e | to the label ".| 000014a0 65 72 72 6f 72 22 2e 20 54 68 65 20 65 72 72 6f |error". The erro| 000014b0 72 20 6d 65 73 73 61 67 65 20 69 73 0d 63 6f 70 |r message is.cop| 000014c0 69 65 64 20 66 72 6f 6d 20 74 68 65 20 72 6f 6d |ied from the rom| 000014d0 20 69 6e 74 6f 20 74 68 65 20 65 72 72 6f 72 20 | into the error | 000014e0 62 75 66 66 65 72 2e 20 54 68 65 20 63 6f 70 79 |buffer. The copy| 000014f0 69 6e 67 20 73 74 6f 70 73 20 77 68 65 6e 20 26 |ing stops when &| 00001500 46 46 0d 69 73 20 66 6f 75 6e 64 20 61 74 20 74 |FF.is found at t| 00001510 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 65 72 |he end of the er| 00001520 72 6f 72 20 6d 65 73 73 61 67 65 20 61 6e 64 20 |ror message and | 00001530 63 6f 6e 74 72 6f 6c 20 69 73 20 74 68 65 6e 20 |control is then | 00001540 70 61 73 73 65 64 20 74 6f 0d 26 31 30 30 2e 20 |passed to.&100. | 00001550 54 68 65 20 4d 4f 53 20 61 6e 64 20 74 68 65 20 |The MOS and the | 00001560 63 75 72 72 65 6e 74 6c 79 20 61 63 74 69 76 65 |currently active| 00001570 20 6c 61 6e 67 75 61 67 65 20 63 61 6e 20 74 68 | language can th| 00001580 65 6e 20 74 61 6b 65 20 6f 76 65 72 20 74 68 65 |en take over the| 00001590 0d 65 72 72 6f 72 20 70 72 6f 63 65 73 73 69 6e |.error processin| 000015a0 67 2e 20 54 68 65 72 65 20 69 73 20 6e 6f 20 6e |g. There is no n| 000015b0 65 65 64 20 74 6f 20 62 61 6c 61 6e 63 65 20 74 |eed to balance t| 000015c0 68 65 20 73 74 61 63 6b 20 62 65 66 6f 72 65 20 |he stack before | 000015d0 6a 75 6d 70 69 6e 67 0d 74 6f 20 74 68 65 20 42 |jumping.to the B| 000015e0 52 4b 20 69 6e 73 74 72 75 63 74 69 6f 6e 20 61 |RK instruction a| 000015f0 74 20 26 31 30 30 2e 0d 0d 20 20 49 66 20 79 6f |t &100... If yo| 00001600 75 20 68 61 76 65 20 62 65 65 6e 20 66 6f 6c 6c |u have been foll| 00001610 6f 77 69 6e 67 20 74 68 65 20 63 6f 75 72 73 65 |owing the course| 00001620 2c 20 79 6f 75 20 73 68 6f 75 6c 64 20 62 79 20 |, you should by | 00001630 6e 6f 77 20 68 61 76 65 20 65 6e 6f 75 67 68 0d |now have enough.| 00001640 65 78 70 65 72 69 65 6e 63 65 20 74 6f 20 6d 6f |experience to mo| 00001650 64 69 66 79 20 74 68 65 20 70 72 6f 67 72 61 6d |dify the program| 00001660 20 45 4e 41 42 4c 45 20 28 66 72 6f 6d 20 4d 6f | ENABLE (from Mo| 00001670 64 75 6c 65 20 34 29 20 74 6f 20 69 6e 63 6c 75 |dule 4) to inclu| 00001680 64 65 0d 74 68 69 73 20 6d 6f 72 65 20 73 6f 70 |de.this more sop| 00001690 68 69 73 74 69 63 61 74 65 64 20 65 72 72 6f 72 |histicated error| 000016a0 20 68 61 6e 64 6c 69 6e 67 20 74 65 63 68 6e 69 | handling techni| 000016b0 71 75 65 2e 0d 0d 20 20 54 68 65 20 65 72 72 6f |que... The erro| 000016c0 72 20 68 61 6e 64 6c 65 72 20 69 6e 20 66 69 67 |r handler in fig| 000016d0 75 72 65 20 38 2e 33 20 68 61 73 20 62 65 65 6e |ure 8.3 has been| 000016e0 20 75 73 65 64 20 69 6e 20 74 68 65 20 70 72 6f | used in the pro| 000016f0 67 72 61 6d 20 45 52 52 4f 52 2e 0d 54 68 69 73 |gram ERROR..This| 00001700 20 70 72 6f 67 72 61 6d 20 75 73 65 73 20 74 68 | program uses th| 00001710 65 20 6e 6f 77 20 66 61 6d 69 6c 69 61 72 20 6f |e now familiar o| 00001720 6e 65 20 63 6f 6d 6d 61 6e 64 20 69 6e 74 65 72 |ne command inter| 00001730 70 72 65 74 65 72 20 74 6f 0d 69 6d 70 6c 65 6d |preter to.implem| 00001740 65 6e 74 20 74 68 65 20 6e 65 77 20 63 6f 6d 6d |ent the new comm| 00001750 61 6e 64 20 2a 43 48 45 43 4b 20 28 30 2d 36 29 |and *CHECK (0-6)| 00001760 2e 20 54 68 69 73 20 73 79 6e 74 61 78 20 6d 65 |. This syntax me| 00001770 61 6e 73 20 74 68 61 74 20 74 68 65 0d 63 6f 6d |ans that the.com| 00001780 6d 61 6e 64 20 6d 75 73 74 20 68 61 76 65 20 61 |mand must have a| 00001790 6e 20 61 72 67 75 6d 65 6e 74 20 69 6e 20 74 68 |n argument in th| 000017a0 65 20 72 61 6e 67 65 20 66 72 6f 6d 20 30 20 74 |e range from 0 t| 000017b0 6f 20 36 20 69 6e 63 6c 75 73 69 76 65 2e 20 49 |o 6 inclusive. I| 000017c0 66 0d 74 68 65 20 61 72 67 75 6d 65 6e 74 20 69 |f.the argument i| 000017d0 73 20 6f 75 74 73 69 64 65 20 74 68 61 74 20 72 |s outside that r| 000017e0 61 6e 67 65 20 6f 72 20 6d 69 73 73 69 6e 67 20 |ange or missing | 000017f0 74 68 65 72 65 20 69 73 20 61 20 73 79 6e 74 61 |there is a synta| 00001800 78 20 65 72 72 6f 72 2e 0d 0d 20 20 54 68 65 20 |x error... The | 00001810 63 6f 6d 6d 61 6e 64 20 63 61 6e 20 62 65 20 75 |command can be u| 00001820 73 65 64 20 66 72 6f 6d 20 77 69 74 68 69 6e 20 |sed from within | 00001830 61 20 42 41 53 49 43 20 70 72 6f 67 72 61 6d 20 |a BASIC program | 00001840 74 6f 20 63 68 65 63 6b 20 77 68 69 63 68 0d 66 |to check which.f| 00001850 69 6c 69 6e 67 20 73 79 73 74 65 6d 20 69 73 20 |iling system is | 00001860 61 63 74 69 76 65 2e 20 49 66 20 69 74 20 69 73 |active. If it is| 00001870 20 6e 6f 74 20 74 68 65 20 6f 6e 65 20 79 6f 75 | not the one you| 00001880 20 77 61 6e 74 2c 20 61 73 20 73 70 65 63 69 66 | want, as specif| 00001890 69 65 64 0d 62 79 20 74 68 65 20 61 72 67 75 6d |ied.by the argum| 000018a0 65 6e 74 2c 20 74 68 65 6e 20 74 68 65 20 72 6f |ent, then the ro| 000018b0 75 74 69 6e 65 20 72 65 73 70 6f 6e 64 73 20 77 |utine responds w| 000018c0 69 74 68 20 61 6e 20 69 6e 63 6f 72 72 65 63 74 |ith an incorrect| 000018d0 20 66 69 6c 69 6e 67 0d 73 79 73 74 65 6d 20 65 | filing.system e| 000018e0 72 72 6f 72 20 6d 65 73 73 61 67 65 20 61 6e 64 |rror message and| 000018f0 20 61 62 6f 72 74 73 20 74 68 65 20 42 41 53 49 | aborts the BASI| 00001900 43 20 70 72 6f 67 72 61 6d 2e 20 49 66 20 74 68 |C program. If th| 00001910 65 20 61 63 74 69 76 65 0d 66 69 6c 69 6e 67 20 |e active.filing | 00001920 73 79 73 74 65 6d 20 69 73 20 74 68 65 20 6f 6e |system is the on| 00001930 65 20 79 6f 75 20 77 61 6e 74 20 74 68 65 6e 20 |e you want then | 00001940 74 68 65 20 70 72 6f 67 72 61 6d 20 77 69 6c 6c |the program will| 00001950 20 63 6f 6e 74 69 6e 75 65 0d 72 75 6e 6e 69 6e | continue.runnin| 00001960 67 20 77 69 74 68 6f 75 74 20 69 6e 74 65 72 75 |g without interu| 00001970 70 74 69 6f 6e 2e 0d 0d 20 20 54 68 65 20 64 69 |ption... The di| 00001980 66 66 65 72 65 6e 74 20 66 69 6c 69 6e 67 20 73 |fferent filing s| 00001990 79 73 74 65 6d 73 20 61 72 65 20 72 65 70 72 65 |ystems are repre| 000019a0 73 65 6e 74 65 64 20 62 79 20 74 68 65 20 61 72 |sented by the ar| 000019b0 67 75 6d 65 6e 74 20 61 73 0d 66 6f 6c 6c 6f 77 |gument as.follow| 000019c0 73 3a 0d 0d 30 20 20 4e 6f 20 66 69 6c 69 6e 67 |s:..0 No filing| 000019d0 20 73 79 73 74 65 6d 20 61 63 74 69 76 65 2c 0d | system active,.| 000019e0 31 20 20 31 32 30 30 20 62 61 75 64 20 63 61 73 |1 1200 baud cas| 000019f0 73 65 74 74 65 2c 0d 32 20 20 33 30 30 20 62 61 |sette,.2 300 ba| 00001a00 75 64 20 63 61 73 73 65 74 74 65 2c 0d 33 20 20 |ud cassette,.3 | 00001a10 52 6f 6d 20 66 69 6c 69 6e 67 20 73 79 73 74 65 |Rom filing syste| 00001a20 6d 2c 0d 34 20 20 44 69 73 63 20 66 69 6c 69 6e |m,.4 Disc filin| 00001a30 67 20 73 79 73 74 65 6d 2c 0d 35 20 20 45 63 6f |g system,.5 Eco| 00001a40 6e 65 74 20 66 69 6c 69 6e 67 20 73 79 73 74 65 |net filing syste| 00001a50 6d 2c 0d 36 20 20 54 65 6c 65 73 6f 66 74 77 61 |m,.6 Telesoftwa| 00001a60 72 65 20 66 69 6c 69 6e 67 20 73 79 73 74 65 6d |re filing system| 00001a70 2e 0d 0d 20 20 49 66 20 79 6f 75 20 75 73 65 20 |... If you use | 00001a80 74 68 65 20 63 6f 6d 6d 61 6e 64 20 2a 43 48 45 |the command *CHE| 00001a90 43 4b 20 77 69 74 68 6f 75 74 20 61 6e 20 61 72 |CK without an ar| 00001aa0 67 75 6d 65 6e 74 20 69 6e 20 61 20 42 41 53 49 |gument in a BASI| 00001ab0 43 0d 70 72 6f 67 72 61 6d 2c 20 74 68 65 20 70 |C.program, the p| 00001ac0 72 6f 67 72 61 6d 20 77 69 6c 6c 20 61 62 6f 72 |rogram will abor| 00001ad0 74 20 77 69 74 68 20 61 6e 20 65 72 72 6f 72 20 |t with an error | 00001ae0 6d 65 73 73 61 67 65 20 22 53 79 6e 74 61 78 3a |message "Syntax:| 00001af0 20 2a 43 48 45 43 4b 0d 28 30 2d 36 29 20 69 6e | *CHECK.(0-6) in| 00001b00 20 6c 69 6e 65 20 78 78 78 22 2e 20 49 66 20 74 | line xxx". If t| 00001b10 68 65 20 44 46 53 20 69 73 20 61 63 74 69 76 65 |he DFS is active| 00001b20 20 61 6e 64 20 79 6f 75 20 69 6e 63 6c 75 64 65 | and you include| 00001b30 20 74 68 65 20 63 6f 6d 6d 61 6e 64 0d 2a 43 48 | the command.*CH| 00001b40 45 43 4b 20 31 20 69 6e 20 61 20 42 41 53 49 43 |ECK 1 in a BASIC| 00001b50 20 70 72 6f 67 72 61 6d 2c 20 74 68 65 20 70 72 | program, the pr| 00001b60 6f 67 72 61 6d 20 77 69 6c 6c 20 61 62 6f 72 74 |ogram will abort| 00001b70 20 77 69 74 68 20 61 6e 20 65 72 72 6f 72 0d 6d | with an error.m| 00001b80 65 73 73 61 67 65 20 22 49 6e 63 6f 72 72 65 63 |essage "Incorrec| 00001b90 74 20 66 69 6c 69 6e 67 20 73 79 73 74 65 6d 20 |t filing system | 00001ba0 69 6e 20 6c 69 6e 65 20 78 78 78 22 2e 0d 0d 20 |in line xxx"... | 00001bb0 20 57 68 65 6e 20 74 68 65 20 69 6e 74 65 72 70 | When the interp| 00001bc0 72 65 74 65 72 20 28 6c 69 6e 65 73 20 32 39 30 |reter (lines 290| 00001bd0 2d 35 37 30 29 20 72 65 63 6f 67 6e 69 73 65 73 |-570) recognises| 00001be0 20 74 68 65 20 6e 65 77 20 63 6f 6d 6d 61 6e 64 | the new command| 00001bf0 20 69 74 0d 70 61 73 73 65 73 20 63 6f 6e 74 72 | it.passes contr| 00001c00 6f 6c 20 74 6f 20 74 68 65 20 6c 61 62 65 6c 20 |ol to the label | 00001c10 22 2e 66 6f 75 6e 64 22 20 28 6c 69 6e 65 20 35 |".found" (line 5| 00001c20 38 30 29 2e 20 54 68 65 20 61 72 67 75 6d 65 6e |80). The argumen| 00001c30 74 20 69 73 0d 69 6e 69 74 69 61 6c 69 73 65 64 |t is.initialised| 00001c40 20 28 6c 69 6e 65 73 20 35 39 30 2d 36 30 30 29 | (lines 590-600)| 00001c50 20 61 6e 64 20 74 68 65 20 74 77 6f 20 7a 65 72 | and the two zer| 00001c60 6f 20 70 61 67 65 20 6d 65 6d 6f 72 79 20 6c 6f |o page memory lo| 00001c70 63 61 74 69 6f 6e 73 0d 75 73 65 64 20 62 79 20 |cations.used by | 00001c80 74 68 65 20 72 6f 75 74 69 6e 65 20 61 72 65 20 |the routine are | 00001c90 70 75 73 68 65 64 20 6f 6e 20 74 68 65 20 73 74 |pushed on the st| 00001ca0 61 63 6b 20 28 6c 69 6e 65 73 20 36 31 30 2d 36 |ack (lines 610-6| 00001cb0 34 30 29 2e 20 54 68 65 0d 61 72 67 75 6d 65 6e |40). The.argumen| 00001cc0 74 20 69 73 20 72 65 61 64 20 28 6c 69 6e 65 20 |t is read (line | 00001cd0 36 35 30 29 2e 20 49 66 20 6e 6f 20 61 72 67 75 |650). If no argu| 00001ce0 6d 65 6e 74 20 69 73 20 66 6f 75 6e 64 20 28 6c |ment is found (l| 00001cf0 69 6e 65 20 36 36 30 29 0d 63 6f 6e 74 72 6f 6c |ine 660).control| 00001d00 20 69 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 | is passed to th| 00001d10 65 20 6c 61 62 65 6c 20 22 2e 6d 69 73 74 61 6b |e label ".mistak| 00001d20 65 22 20 28 6c 69 6e 65 20 37 31 30 29 2e 0d 0d |e" (line 710)...| 00001d30 20 20 41 66 74 65 72 20 72 65 61 64 69 6e 67 20 | After reading | 00001d40 74 68 65 20 61 72 67 75 6d 65 6e 74 20 69 74 20 |the argument it | 00001d50 69 73 20 63 6f 6e 76 65 72 74 65 64 20 69 6e 74 |is converted int| 00001d60 6f 20 62 69 6e 61 72 79 20 61 6e 64 20 63 68 65 |o binary and che| 00001d70 63 6b 65 64 0d 74 6f 20 73 65 65 20 69 66 20 69 |cked.to see if i| 00001d80 74 20 69 73 20 69 6e 20 72 61 6e 67 65 20 28 6c |t is in range (l| 00001d90 69 6e 65 73 20 36 37 30 2d 37 30 30 29 2e 20 49 |ines 670-700). I| 00001da0 66 20 69 74 20 69 73 20 6e 6f 74 20 69 6e 20 72 |f it is not in r| 00001db0 61 6e 67 65 0d 63 6f 6e 74 72 6f 6c 20 69 73 20 |ange.control is | 00001dc0 70 61 73 73 65 64 20 74 6f 20 74 68 65 20 6c 61 |passed to the la| 00001dd0 62 65 6c 20 22 2e 6d 69 73 74 61 6b 65 22 20 28 |bel ".mistake" (| 00001de0 6c 69 6e 65 20 37 31 30 29 2e 20 49 66 20 69 74 |line 710). If it| 00001df0 20 69 73 20 69 6e 0d 72 61 6e 67 65 20 74 68 65 | is in.range the| 00001e00 20 62 69 6e 61 72 79 20 72 65 70 72 65 73 65 6e | binary represen| 00001e10 74 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 61 72 |tation of the ar| 00001e20 67 75 6d 65 6e 74 20 69 73 20 70 75 73 68 65 64 |gument is pushed| 00001e30 20 6f 6e 20 74 68 65 20 73 74 61 63 6b 0d 28 6c | on the stack.(l| 00001e40 69 6e 65 20 37 36 30 29 2c 20 74 68 65 20 61 63 |ine 760), the ac| 00001e50 63 75 6d 75 6c 61 74 6f 72 20 61 6e 64 20 69 6e |cumulator and in| 00001e60 64 65 78 20 72 65 67 69 73 74 65 72 73 20 61 72 |dex registers ar| 00001e70 65 20 72 65 73 65 74 20 74 6f 20 7a 65 72 6f 0d |e reset to zero.| 00001e80 28 6c 69 6e 65 73 20 37 37 30 2d 37 39 30 29 20 |(lines 770-790) | 00001e90 61 6e 64 20 4f 73 61 72 67 73 20 69 73 20 63 61 |and Osargs is ca| 00001ea0 6c 6c 65 64 20 28 6c 69 6e 65 20 38 30 30 29 2e |lled (line 800).| 00001eb0 0d 0d 20 20 54 68 65 20 61 63 74 69 76 65 20 66 |.. The active f| 00001ec0 69 6c 69 6e 67 20 73 79 73 74 65 6d 20 69 73 20 |iling system is | 00001ed0 72 65 74 75 72 6e 65 64 20 69 6e 20 74 68 65 20 |returned in the | 00001ee0 61 63 63 75 6d 75 6c 61 74 6f 72 20 61 6e 64 20 |accumulator and | 00001ef0 73 74 6f 72 65 64 0d 69 6e 20 26 37 30 20 28 6c |stored.in &70 (l| 00001f00 69 6e 65 20 38 31 30 29 2e 20 54 68 65 20 61 72 |ine 810). The ar| 00001f10 67 75 6d 65 6e 74 20 69 73 20 70 75 6c 6c 65 64 |gument is pulled| 00001f20 20 6f 66 66 20 74 68 65 20 73 74 61 63 6b 20 61 | off the stack a| 00001f30 6e 64 20 63 6f 6d 70 61 72 65 64 0d 77 69 74 68 |nd compared.with| 00001f40 20 74 68 65 20 61 63 74 69 76 65 20 66 69 6c 69 | the active fili| 00001f50 6e 67 20 73 79 73 74 65 6d 20 6e 75 6d 62 65 72 |ng system number| 00001f60 20 28 6c 69 6e 65 73 20 38 32 30 2d 38 33 30 29 | (lines 820-830)| 00001f70 2e 20 49 66 20 74 68 65 79 20 61 72 65 0d 69 64 |. If they are.id| 00001f80 65 6e 74 69 63 61 6c 20 74 68 65 20 72 6f 75 74 |entical the rout| 00001f90 69 6e 65 20 72 65 73 74 6f 72 65 73 20 74 68 65 |ine restores the| 00001fa0 20 7a 65 72 6f 20 70 61 67 65 20 6c 6f 63 61 74 | zero page locat| 00001fb0 69 6f 6e 73 20 28 6c 69 6e 65 73 0d 38 39 30 2d |ions (lines.890-| 00001fc0 39 32 30 29 2c 20 62 61 6c 61 6e 63 65 73 20 74 |920), balances t| 00001fd0 68 65 20 73 74 61 63 6b 20 28 6c 69 6e 65 73 20 |he stack (lines | 00001fe0 39 33 30 2d 39 35 30 29 20 61 6e 64 20 72 65 74 |930-950) and ret| 00001ff0 75 72 6e 73 20 63 6f 6e 74 72 6f 6c 20 74 6f 0d |urns control to.| 00002000 74 68 65 20 4d 4f 53 20 61 66 74 65 72 20 72 65 |the MOS after re| 00002010 73 65 74 69 6e 67 20 74 68 65 20 61 63 63 75 6d |seting the accum| 00002020 75 6c 61 74 6f 72 20 74 6f 20 7a 65 72 6f 20 28 |ulator to zero (| 00002030 6c 69 6e 65 73 20 39 36 30 2d 39 37 30 29 2e 20 |lines 960-970). | 00002040 49 66 20 74 68 65 0d 61 63 74 69 76 65 20 66 69 |If the.active fi| 00002050 6c 69 6e 67 20 73 79 73 74 65 6d 20 6e 75 6d 62 |ling system numb| 00002060 65 72 20 69 73 20 6e 6f 74 20 74 68 65 20 73 61 |er is not the sa| 00002070 6d 65 20 61 73 20 74 68 65 20 61 72 67 75 6d 65 |me as the argume| 00002080 6e 74 20 74 68 65 0d 72 6f 75 74 69 6e 65 20 67 |nt the.routine g| 00002090 65 6e 65 72 61 74 65 73 20 74 68 65 20 69 6e 63 |enerates the inc| 000020a0 6f 72 72 65 63 74 20 66 69 6c 69 6e 67 20 73 79 |orrect filing sy| 000020b0 73 74 65 6d 20 65 72 72 6f 72 20 6d 65 73 73 61 |stem error messa| 000020c0 67 65 20 28 6c 69 6e 65 73 0d 38 35 30 2d 38 37 |ge (lines.850-87| 000020d0 30 29 2e 0d 0d 20 20 54 68 65 20 65 72 72 6f 72 |0)... The error| 000020e0 20 68 61 6e 64 6c 65 72 20 28 6c 69 6e 65 73 20 | handler (lines | 000020f0 39 38 30 2d 31 31 31 30 29 20 69 73 20 61 20 6c |980-1110) is a l| 00002100 69 74 74 6c 65 20 64 69 66 66 65 72 65 6e 74 20 |ittle different | 00002110 66 72 6f 6d 20 74 68 65 0d 6f 6e 65 20 69 6e 20 |from the.one in | 00002120 66 69 67 75 72 65 20 38 2e 33 20 62 65 63 61 75 |figure 8.3 becau| 00002130 73 65 20 69 74 20 72 65 73 74 6f 72 65 73 20 74 |se it restores t| 00002140 68 65 20 74 77 6f 20 7a 65 72 6f 20 70 61 67 65 |he two zero page| 00002150 20 62 79 74 65 73 20 61 74 20 26 37 30 0d 61 6e | bytes at &70.an| 00002160 64 20 26 37 31 20 62 65 66 6f 72 65 20 6a 75 6d |d &71 before jum| 00002170 70 69 6e 67 20 74 6f 20 26 31 30 30 2e 20 54 68 |ping to &100. Th| 00002180 65 20 72 65 67 69 73 74 65 72 73 20 70 75 73 68 |e registers push| 00002190 65 64 20 6f 6e 20 74 68 65 20 73 74 61 63 6b 20 |ed on the stack | 000021a0 62 79 0d 74 68 65 20 69 6e 74 65 72 70 72 65 74 |by.the interpret| 000021b0 65 72 20 61 72 65 20 6e 6f 74 20 70 75 6c 6c 65 |er are not pulle| 000021c0 64 20 6f 66 66 20 62 65 66 6f 72 65 20 6a 75 6d |d off before jum| 000021d0 70 69 6e 67 20 74 6f 20 26 31 30 30 20 62 65 63 |ping to &100 bec| 000021e0 61 75 73 65 20 74 68 65 0d 73 74 61 63 6b 20 69 |ause the.stack i| 000021f0 73 20 72 65 73 65 74 20 62 79 20 74 68 65 20 6c |s reset by the l| 00002200 61 6e 67 75 61 67 65 20 65 72 72 6f 72 20 68 61 |anguage error ha| 00002210 6e 64 6c 65 72 20 61 66 74 65 72 20 65 78 65 63 |ndler after exec| 00002220 75 74 69 6e 67 20 74 68 65 20 42 52 4b 0d 69 6e |uting the BRK.in| 00002230 73 74 72 75 63 74 69 6f 6e 20 61 74 20 26 31 30 |struction at &10| 00002240 30 2e 0d 0d 0d 20 20 20 31 30 20 52 45 4d 3a 20 |0.... 10 REM: | 00002250 45 52 52 4f 52 0d 20 20 20 32 30 20 4d 4f 44 45 |ERROR. 20 MODE| 00002260 37 0d 20 20 20 33 30 20 48 49 4d 45 4d 3d 26 33 |7. 30 HIMEM=&3| 00002270 43 30 30 0d 20 20 20 34 30 20 44 49 4d 20 73 61 |C00. 40 DIM sa| 00002280 76 65 20 35 30 0d 20 20 20 35 30 20 64 69 66 66 |ve 50. 50 diff| 00002290 3d 26 38 30 30 30 2d 48 49 4d 45 4d 0d 20 20 20 |=&8000-HIMEM. | 000022a0 36 30 20 61 64 64 72 65 73 73 3d 26 37 30 0d 20 |60 address=&70. | 000022b0 20 20 37 30 20 63 6f 6d 76 65 63 3d 26 46 32 0d | 70 comvec=&F2.| 000022c0 20 20 20 38 30 20 65 72 72 73 74 61 63 6b 3d 26 | 80 errstack=&| 000022d0 31 30 30 0d 20 20 20 39 30 20 67 73 69 6e 69 74 |100. 90 gsinit| 000022e0 3d 26 46 46 43 32 0d 20 20 31 30 30 20 67 73 72 |=&FFC2. 100 gsr| 000022f0 65 61 64 3d 26 46 46 43 35 0d 20 20 31 31 30 20 |ead=&FFC5. 110 | 00002300 6f 73 61 72 67 73 3d 26 46 46 44 41 0d 20 20 31 |osargs=&FFDA. 1| 00002310 32 30 20 6f 73 63 6c 69 3d 26 46 46 46 37 0d 20 |20 oscli=&FFF7. | 00002320 20 31 33 30 20 46 4f 52 20 70 61 73 73 20 3d 20 | 130 FOR pass = | 00002330 30 20 54 4f 20 32 20 53 54 45 50 20 32 0d 20 20 |0 TO 2 STEP 2. | 00002340 31 34 30 20 50 25 3d 48 49 4d 45 4d 0d 20 20 31 |140 P%=HIMEM. 1| 00002350 35 30 20 5b 20 20 20 20 20 20 20 4f 50 54 20 70 |50 [ OPT p| 00002360 61 73 73 0d 20 20 31 36 30 20 20 20 20 20 20 20 |ass. 160 | 00002370 20 20 42 52 4b 0d 20 20 31 37 30 20 20 20 20 20 | BRK. 170 | 00002380 20 20 20 20 42 52 4b 0d 20 20 31 38 30 20 20 20 | BRK. 180 | 00002390 20 20 20 20 20 20 42 52 4b 0d 20 20 31 39 30 20 | BRK. 190 | 000023a0 20 20 20 20 20 20 20 20 4a 4d 50 20 73 65 72 76 | JMP serv| 000023b0 69 63 65 2b 64 69 66 66 0d 20 20 32 30 30 20 20 |ice+diff. 200 | 000023c0 20 20 20 20 20 20 20 4f 50 54 20 46 4e 65 71 75 | OPT FNequ| 000023d0 62 28 26 38 32 29 0d 20 20 32 31 30 20 20 20 20 |b(&82). 210 | 000023e0 20 20 20 20 20 4f 50 54 20 46 4e 65 71 75 62 28 | OPT FNequb(| 000023f0 28 63 6f 70 79 72 69 67 68 74 2b 64 69 66 66 29 |(copyright+diff)| 00002400 20 4d 4f 44 20 32 35 36 29 0d 20 20 32 32 30 20 | MOD 256). 220 | 00002410 20 20 20 20 20 20 20 20 42 52 4b 0d 20 20 32 33 | BRK. 23| 00002420 30 20 2e 74 69 74 6c 65 0d 20 20 32 34 30 20 20 |0 .title. 240 | 00002430 20 20 20 20 20 20 20 4f 50 54 20 46 4e 65 71 75 | OPT FNequ| 00002440 73 28 22 43 48 45 43 4b 22 29 0d 20 20 32 35 30 |s("CHECK"). 250| 00002450 20 2e 63 6f 70 79 72 69 67 68 74 0d 20 20 32 36 | .copyright. 26| 00002460 30 20 20 20 20 20 20 20 20 20 42 52 4b 0d 20 20 |0 BRK. | 00002470 32 37 30 20 20 20 20 20 20 20 20 20 4f 50 54 20 |270 OPT | 00002480 46 4e 65 71 75 73 28 22 28 43 29 20 47 6f 72 64 |FNequs("(C) Gord| 00002490 6f 6e 20 48 6f 72 73 69 6e 67 74 6f 6e 20 31 39 |on Horsington 19| 000024a0 38 37 22 29 0d 20 20 32 38 30 20 20 20 20 20 20 |87"). 280 | 000024b0 20 20 20 42 52 4b 0d 20 20 32 39 30 20 2e 73 65 | BRK. 290 .se| 000024c0 72 76 69 63 65 0d 20 20 33 30 30 20 20 20 20 20 |rvice. 300 | 000024d0 20 20 20 20 43 4d 50 20 23 34 0d 20 20 33 31 30 | CMP #4. 310| 000024e0 20 20 20 20 20 20 20 20 20 42 45 51 20 75 6e 72 | BEQ unr| 000024f0 65 63 6f 67 6e 69 73 65 64 0d 20 20 33 32 30 20 |ecognised. 320 | 00002500 2e 65 78 69 74 0d 20 20 33 33 30 20 20 20 20 20 |.exit. 330 | 00002510 20 20 20 20 52 54 53 0d 20 20 33 34 30 20 2e 75 | RTS. 340 .u| 00002520 6e 72 65 63 6f 67 6e 69 73 65 64 0d 20 20 33 35 |nrecognised. 35| 00002530 30 20 20 20 20 20 20 20 20 20 50 48 41 0d 20 20 |0 PHA. | 00002540 33 36 30 20 20 20 20 20 20 20 20 20 54 58 41 0d |360 TXA.| 00002550 20 20 33 37 30 20 20 20 20 20 20 20 20 20 50 48 | 370 PH| 00002560 41 0d 20 20 33 38 30 20 20 20 20 20 20 20 20 20 |A. 380 | 00002570 54 59 41 0d 20 20 33 39 30 20 20 20 20 20 20 20 |TYA. 390 | 00002580 20 20 50 48 41 0d 20 20 34 30 30 20 20 20 20 20 | PHA. 400 | 00002590 20 20 20 20 4c 44 58 20 23 26 46 46 0d 20 20 34 | LDX #&FF. 4| 000025a0 31 30 20 2e 63 6f 6d 6c 6f 6f 70 0d 20 20 34 32 |10 .comloop. 42| 000025b0 30 20 20 20 20 20 20 20 20 20 49 4e 58 0d 20 20 |0 INX. | 000025c0 34 33 30 20 20 20 20 20 20 20 20 20 4c 44 41 20 |430 LDA | 000025d0 74 69 74 6c 65 2b 64 69 66 66 2c 58 0d 20 20 34 |title+diff,X. 4| 000025e0 34 30 20 20 20 20 20 20 20 20 20 42 45 51 20 66 |40 BEQ f| 000025f0 6f 75 6e 64 0d 20 20 34 35 30 20 20 20 20 20 20 |ound. 450 | 00002600 20 20 20 4c 44 41 20 28 63 6f 6d 76 65 63 29 2c | LDA (comvec),| 00002610 59 0d 20 20 34 36 30 20 20 20 20 20 20 20 20 20 |Y. 460 | 00002620 49 4e 59 0d 20 20 34 37 30 20 20 20 20 20 20 20 |INY. 470 | 00002630 20 20 43 4d 50 20 23 41 53 43 28 22 2e 22 29 0d | CMP #ASC(".").| 00002640 20 20 34 38 30 20 20 20 20 20 20 20 20 20 42 45 | 480 BE| 00002650 51 20 66 6f 75 6e 64 0d 20 20 34 39 30 20 20 20 |Q found. 490 | 00002660 20 20 20 20 20 20 41 4e 44 20 23 26 44 46 0d 20 | AND #&DF. | 00002670 20 35 30 30 20 20 20 20 20 20 20 20 20 43 4d 50 | 500 CMP| 00002680 20 74 69 74 6c 65 2b 64 69 66 66 2c 58 0d 20 20 | title+diff,X. | 00002690 35 31 30 20 20 20 20 20 20 20 20 20 42 45 51 20 |510 BEQ | 000026a0 63 6f 6d 6c 6f 6f 70 0d 20 20 35 32 30 20 20 20 |comloop. 520 | 000026b0 20 20 20 20 20 20 50 4c 41 0d 20 20 35 33 30 20 | PLA. 530 | 000026c0 20 20 20 20 20 20 20 20 54 41 59 0d 20 20 35 34 | TAY. 54| 000026d0 30 20 20 20 20 20 20 20 20 20 50 4c 41 0d 20 20 |0 PLA. | 000026e0 35 35 30 20 20 20 20 20 20 20 20 20 54 41 58 0d |550 TAX.| 000026f0 20 20 35 36 30 20 20 20 20 20 20 20 20 20 50 4c | 560 PL| 00002700 41 0d 20 20 35 37 30 20 20 20 20 20 20 20 20 20 |A. 570 | 00002710 52 54 53 0d 20 20 35 38 30 20 2e 66 6f 75 6e 64 |RTS. 580 .found| 00002720 0d 20 20 35 39 30 20 20 20 20 20 20 20 20 20 53 |. 590 S| 00002730 45 43 0d 20 20 36 30 30 20 20 20 20 20 20 20 20 |EC. 600 | 00002740 20 4a 53 52 20 67 73 69 6e 69 74 0d 20 20 36 31 | JSR gsinit. 61| 00002750 30 20 20 20 20 20 20 20 20 20 4c 44 41 20 61 64 |0 LDA ad| 00002760 64 72 65 73 73 0d 20 20 36 32 30 20 20 20 20 20 |dress. 620 | 00002770 20 20 20 20 50 48 41 0d 20 20 36 33 30 20 20 20 | PHA. 630 | 00002780 20 20 20 20 20 20 4c 44 41 20 61 64 64 72 65 73 | LDA addres| 00002790 73 2b 31 0d 20 20 36 34 30 20 20 20 20 20 20 20 |s+1. 640 | 000027a0 20 20 50 48 41 0d 20 20 36 35 30 20 20 20 20 20 | PHA. 650 | 000027b0 20 20 20 20 4a 53 52 20 67 73 72 65 61 64 0d 20 | JSR gsread. | 000027c0 20 36 36 30 20 20 20 20 20 20 20 20 20 42 43 53 | 660 BCS| 000027d0 20 6d 69 73 74 61 6b 65 0d 20 20 36 37 30 20 20 | mistake. 670 | 000027e0 20 20 20 20 20 20 20 53 45 43 0d 20 20 36 38 30 | SEC. 680| 000027f0 20 20 20 20 20 20 20 20 20 53 42 43 20 23 41 53 | SBC #AS| 00002800 43 28 22 30 22 29 0d 20 20 36 39 30 20 20 20 20 |C("0"). 690 | 00002810 20 20 20 20 20 43 4d 50 20 23 37 0d 20 20 37 30 | CMP #7. 70| 00002820 30 20 20 20 20 20 20 20 20 20 42 43 43 20 66 69 |0 BCC fi| 00002830 6c 65 0d 20 20 37 31 30 20 2e 6d 69 73 74 61 6b |le. 710 .mistak| 00002840 65 0d 20 20 37 32 30 20 20 20 20 20 20 20 20 20 |e. 720 | 00002850 4c 44 58 20 23 28 73 79 6e 74 61 78 2b 64 69 66 |LDX #(syntax+dif| 00002860 66 29 20 4d 4f 44 20 32 35 36 0d 20 20 37 33 30 |f) MOD 256. 730| 00002870 20 20 20 20 20 20 20 20 20 4c 44 59 20 23 28 73 | LDY #(s| 00002880 79 6e 74 61 78 2b 64 69 66 66 29 20 44 49 56 20 |yntax+diff) DIV | 00002890 32 35 36 0d 20 20 37 34 30 20 20 20 20 20 20 20 |256. 740 | 000028a0 20 20 4a 4d 50 20 65 72 72 6f 72 2b 64 69 66 66 | JMP error+diff| 000028b0 0d 20 20 37 35 30 20 2e 66 69 6c 65 0d 20 20 37 |. 750 .file. 7| 000028c0 36 30 20 20 20 20 20 20 20 20 20 50 48 41 0d 20 |60 PHA. | 000028d0 20 37 37 30 20 20 20 20 20 20 20 20 20 4c 44 41 | 770 LDA| 000028e0 20 23 30 0d 20 20 37 38 30 20 20 20 20 20 20 20 | #0. 780 | 000028f0 20 20 54 41 58 0d 20 20 37 39 30 20 20 20 20 20 | TAX. 790 | 00002900 20 20 20 20 54 41 59 0d 20 20 38 30 30 20 20 20 | TAY. 800 | 00002910 20 20 20 20 20 20 4a 53 52 20 6f 73 61 72 67 73 | JSR osargs| 00002920 0d 20 20 38 31 30 20 20 20 20 20 20 20 20 20 53 |. 810 S| 00002930 54 41 20 61 64 64 72 65 73 73 0d 20 20 38 32 30 |TA address. 820| 00002940 20 20 20 20 20 20 20 20 20 50 4c 41 0d 20 20 38 | PLA. 8| 00002950 33 30 20 20 20 20 20 20 20 20 20 43 4d 50 20 61 |30 CMP a| 00002960 64 64 72 65 73 73 0d 20 20 38 34 30 20 20 20 20 |ddress. 840 | 00002970 20 20 20 20 20 42 45 51 20 63 6f 72 72 65 63 74 | BEQ correct| 00002980 0d 20 20 38 35 30 20 20 20 20 20 20 20 20 20 4c |. 850 L| 00002990 44 58 20 23 28 77 72 6f 6e 67 2b 64 69 66 66 29 |DX #(wrong+diff)| 000029a0 20 4d 4f 44 20 32 35 36 0d 20 20 38 36 30 20 20 | MOD 256. 860 | 000029b0 20 20 20 20 20 20 20 4c 44 59 20 23 28 77 72 6f | LDY #(wro| 000029c0 6e 67 2b 64 69 66 66 29 20 44 49 56 20 32 35 36 |ng+diff) DIV 256| 000029d0 0d 20 20 38 37 30 20 20 20 20 20 20 20 20 20 4a |. 870 J| 000029e0 4d 50 20 65 72 72 6f 72 2b 64 69 66 66 0d 20 20 |MP error+diff. | 000029f0 38 38 30 20 2e 63 6f 72 72 65 63 74 0d 20 20 38 |880 .correct. 8| 00002a00 39 30 20 20 20 20 20 20 20 20 20 50 4c 41 0d 20 |90 PLA. | 00002a10 20 39 30 30 20 20 20 20 20 20 20 20 20 53 54 41 | 900 STA| 00002a20 20 61 64 64 72 65 73 73 2b 31 0d 20 20 39 31 30 | address+1. 910| 00002a30 20 20 20 20 20 20 20 20 20 50 4c 41 0d 20 20 39 | PLA. 9| 00002a40 32 30 20 20 20 20 20 20 20 20 20 53 54 41 20 61 |20 STA a| 00002a50 64 64 72 65 73 73 0d 20 20 39 33 30 20 20 20 20 |ddress. 930 | 00002a60 20 20 20 20 20 50 4c 41 0d 20 20 39 34 30 20 20 | PLA. 940 | 00002a70 20 20 20 20 20 20 20 50 4c 41 0d 20 20 39 35 30 | PLA. 950| 00002a80 20 20 20 20 20 20 20 20 20 50 4c 41 0d 20 20 39 | PLA. 9| 00002a90 36 30 20 20 20 20 20 20 20 20 20 4c 44 41 20 23 |60 LDA #| 00002aa0 30 0d 20 20 39 37 30 20 20 20 20 20 20 20 20 20 |0. 970 | 00002ab0 52 54 53 0d 20 20 39 38 30 20 2e 65 72 72 6f 72 |RTS. 980 .error| 00002ac0 0d 20 20 39 39 30 20 20 20 20 20 20 20 20 20 53 |. 990 S| 00002ad0 54 58 20 61 64 64 72 65 73 73 0d 20 31 30 30 30 |TX address. 1000| 00002ae0 20 20 20 20 20 20 20 20 20 53 54 59 20 61 64 64 | STY add| 00002af0 72 65 73 73 2b 31 0d 20 31 30 31 30 20 20 20 20 |ress+1. 1010 | 00002b00 20 20 20 20 20 4c 44 59 20 23 26 46 46 0d 20 31 | LDY #&FF. 1| 00002b10 30 32 30 20 2e 65 72 72 6f 72 6c 6f 6f 70 0d 20 |020 .errorloop. | 00002b20 31 30 33 30 20 20 20 20 20 20 20 20 20 49 4e 59 |1030 INY| 00002b30 0d 20 31 30 34 30 20 20 20 20 20 20 20 20 20 4c |. 1040 L| 00002b40 44 41 20 28 61 64 64 72 65 73 73 29 2c 59 0d 20 |DA (address),Y. | 00002b50 31 30 35 30 20 20 20 20 20 20 20 20 20 53 54 41 |1050 STA| 00002b60 20 65 72 72 73 74 61 63 6b 2c 59 0d 20 31 30 36 | errstack,Y. 106| 00002b70 30 20 20 20 20 20 20 20 20 20 42 50 4c 20 65 72 |0 BPL er| 00002b80 72 6f 72 6c 6f 6f 70 0d 20 31 30 37 30 20 20 20 |rorloop. 1070 | 00002b90 20 20 20 20 20 20 50 4c 41 0d 20 31 30 38 30 20 | PLA. 1080 | 00002ba0 20 20 20 20 20 20 20 20 53 54 41 20 61 64 64 72 | STA addr| 00002bb0 65 73 73 2b 31 0d 20 31 30 39 30 20 20 20 20 20 |ess+1. 1090 | 00002bc0 20 20 20 20 50 4c 41 0d 20 31 31 30 30 20 20 20 | PLA. 1100 | 00002bd0 20 20 20 20 20 20 53 54 41 20 61 64 64 72 65 73 | STA addres| 00002be0 73 0d 20 31 31 31 30 20 20 20 20 20 20 20 20 20 |s. 1110 | 00002bf0 4a 4d 50 20 65 72 72 73 74 61 63 6b 0d 20 31 31 |JMP errstack. 11| 00002c00 32 30 20 2e 73 79 6e 74 61 78 0d 20 31 31 33 30 |20 .syntax. 1130| 00002c10 20 20 20 20 20 20 20 20 20 42 52 4b 0d 20 31 31 | BRK. 11| 00002c20 34 30 20 20 20 20 20 20 20 20 20 42 52 4b 0d 20 |40 BRK. | 00002c30 31 31 35 30 20 20 20 20 20 20 20 20 20 4f 50 54 |1150 OPT| 00002c40 20 46 4e 65 71 75 73 28 22 53 79 6e 74 61 78 22 | FNequs("Syntax"| 00002c50 29 0d 20 31 31 36 30 20 20 20 20 20 20 20 20 20 |). 1160 | 00002c60 4f 50 54 20 46 4e 65 71 75 62 28 26 33 41 29 0d |OPT FNequb(&3A).| 00002c70 20 31 31 37 30 20 20 20 20 20 20 20 20 20 4f 50 | 1170 OP| 00002c80 54 20 46 4e 65 71 75 73 28 22 20 2a 43 48 45 43 |T FNequs(" *CHEC| 00002c90 4b 20 28 30 2d 36 29 22 29 0d 20 31 31 38 30 20 |K (0-6)"). 1180 | 00002ca0 20 20 20 20 20 20 20 20 42 52 4b 0d 20 31 31 39 | BRK. 119| 00002cb0 30 20 20 20 20 20 20 20 20 20 4f 50 54 20 46 4e |0 OPT FN| 00002cc0 65 71 75 62 28 26 46 46 29 0d 20 31 32 30 30 20 |equb(&FF). 1200 | 00002cd0 2e 77 72 6f 6e 67 0d 20 31 32 31 30 20 20 20 20 |.wrong. 1210 | 00002ce0 20 20 20 20 20 42 52 4b 0d 20 31 32 32 30 20 20 | BRK. 1220 | 00002cf0 20 20 20 20 20 20 20 42 52 4b 0d 20 31 32 33 30 | BRK. 1230| 00002d00 20 20 20 20 20 20 20 20 20 4f 50 54 20 46 4e 65 | OPT FNe| 00002d10 71 75 73 28 22 49 6e 63 6f 72 72 65 63 74 20 66 |qus("Incorrect f| 00002d20 69 6c 69 6e 67 20 73 79 73 74 65 6d 22 29 0d 20 |iling system"). | 00002d30 31 32 34 30 20 20 20 20 20 20 20 20 20 42 52 4b |1240 BRK| 00002d40 0d 20 31 32 35 30 20 20 20 20 20 20 20 20 20 4f |. 1250 O| 00002d50 50 54 20 46 4e 65 71 75 62 28 26 46 46 29 0d 20 |PT FNequb(&FF). | 00002d60 31 32 36 30 20 2e 6c 61 73 74 62 79 74 65 0d 20 |1260 .lastbyte. | 00002d70 31 32 37 30 20 5d 0d 20 31 32 38 30 20 4e 45 58 |1270 ]. 1280 NEX| 00002d80 54 0d 20 31 32 39 30 20 49 4e 50 55 54 27 22 53 |T. 1290 INPUT'"S| 00002d90 61 76 65 20 66 69 6c 65 6e 61 6d 65 20 3d 20 22 |ave filename = "| 00002da0 66 69 6c 65 6e 61 6d 65 24 0d 20 31 33 30 30 20 |filename$. 1300 | 00002db0 49 46 20 66 69 6c 65 6e 61 6d 65 24 3d 22 22 20 |IF filename$="" | 00002dc0 45 4e 44 0d 20 31 33 31 30 20 24 73 61 76 65 3d |END. 1310 $save=| 00002dd0 22 53 41 56 45 20 22 2b 66 69 6c 65 6e 61 6d 65 |"SAVE "+filename| 00002de0 24 2b 22 20 22 2b 53 54 52 24 7e 28 48 49 4d 45 |$+" "+STR$~(HIME| 00002df0 4d 29 2b 22 20 22 2b 53 54 52 24 7e 28 6c 61 73 |M)+" "+STR$~(las| 00002e00 0d 20 20 20 20 20 20 74 62 79 74 65 29 2b 22 20 |. tbyte)+" | 00002e10 46 46 46 46 38 30 30 30 20 46 46 46 46 38 30 30 |FFFF8000 FFFF800| 00002e20 30 22 0d 20 31 33 32 30 20 58 25 3d 73 61 76 65 |0". 1320 X%=save| 00002e30 20 4d 4f 44 20 32 35 36 0d 20 31 33 33 30 20 59 | MOD 256. 1330 Y| 00002e40 25 3d 73 61 76 65 20 44 49 56 20 32 35 36 0d 20 |%=save DIV 256. | 00002e50 31 33 34 30 20 2a 4f 50 54 31 2c 32 0d 20 31 33 |1340 *OPT1,2. 13| 00002e60 35 30 20 43 41 4c 4c 20 6f 73 63 6c 69 0d 20 31 |50 CALL oscli. 1| 00002e70 33 36 30 20 2a 4f 50 54 31 2c 30 0d 20 31 33 37 |360 *OPT1,0. 137| 00002e80 30 20 45 4e 44 0d 20 31 33 38 30 20 44 45 46 46 |0 END. 1380 DEFF| 00002e90 4e 65 71 75 62 28 62 79 74 65 29 0d 20 31 33 39 |Nequb(byte). 139| 00002ea0 30 20 3f 50 25 3d 62 79 74 65 0d 20 31 34 30 30 |0 ?P%=byte. 1400| 00002eb0 20 50 25 3d 50 25 2b 31 0d 20 31 34 31 30 20 3d | P%=P%+1. 1410 =| 00002ec0 70 61 73 73 0d 20 31 34 32 30 20 44 45 46 46 4e |pass. 1420 DEFFN| 00002ed0 65 71 75 77 28 77 6f 72 64 29 0d 20 31 34 33 30 |equw(word). 1430| 00002ee0 20 3f 50 25 3d 77 6f 72 64 20 4d 4f 44 20 32 35 | ?P%=word MOD 25| 00002ef0 36 0d 20 31 34 34 30 20 50 25 3f 31 3d 77 6f 72 |6. 1440 P%?1=wor| 00002f00 64 20 44 49 56 20 32 35 36 0d 20 31 34 35 30 20 |d DIV 256. 1450 | 00002f10 50 25 3d 50 25 2b 32 0d 20 31 34 36 30 20 3d 70 |P%=P%+2. 1460 =p| 00002f20 61 73 73 0d 20 31 34 37 30 20 44 45 46 46 4e 65 |ass. 1470 DEFFNe| 00002f30 71 75 64 28 64 6f 75 62 6c 65 29 0d 20 31 34 38 |qud(double). 148| 00002f40 30 20 21 50 25 3d 64 6f 75 62 6c 65 0d 20 31 34 |0 !P%=double. 14| 00002f50 39 30 20 50 25 3d 50 25 2b 34 0d 20 31 35 30 30 |90 P%=P%+4. 1500| 00002f60 20 3d 70 61 73 73 0d 20 31 35 31 30 20 44 45 46 | =pass. 1510 DEF| 00002f70 46 4e 65 71 75 73 28 73 74 72 69 6e 67 24 29 0d |FNequs(string$).| 00002f80 20 31 35 32 30 20 24 50 25 3d 73 74 72 69 6e 67 | 1520 $P%=string| 00002f90 24 0d 20 31 35 33 30 20 50 25 3d 50 25 2b 4c 45 |$. 1530 P%=P%+LE| 00002fa0 4e 28 73 74 72 69 6e 67 24 29 0d 20 31 35 34 30 |N(string$). 1540| 00002fb0 20 3d 70 61 73 73 0d | =pass.| 00002fb7