Home » CEEFAX disks » telesoftware7.adl » 16-05-88/T\OSB26
16-05-88/T\OSB26
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 » telesoftware7.adl |
Filename: | 16-05-88/T\OSB26 |
Read OK: | ✔ |
File size: | 2EB7 bytes |
Load address: | 0000 |
Exec address: | FFFFFFFF |
File contents
OSBITS - An Exploration of the BBC Micro at Machine Level By Programmer ......................................................... Part 26: Editing Your Source Code Bringing up the rear in this series I am going to briefly discuss editing source code. Despite having reasonable facilities for line editing, one of the problems of working with large bodies of code on the BBC Micro is that you often wish you could edit it like you would text on a word processor; moving blocks about and replacing strings. There are BASIC program editors (such as the one from ACORN) and with the BBC Master micro you have the EDIT facility to let you do just this. It de-tokenises the BASIC file you are working on and puts it in memory ready for the EDIT process. When you exit from EDIT your edited text is put back into memory, with line numbers added, as a BASIC program. If you have a word processor and a disc drive (or, even better, some kind of RAM filing system like BEEBUG's ROMIT) you can carry out this kind of operation. Many of the assembler modules of OSbits were edited using VIEW in this way. Although BASIC does not use tokens for assembler mnemonics, things like line numbers and the FOR/NEXT loop around your assembly code are still tokenised. This means that you cannot take a BASIC file and read it directly into a word processor. You have to have a text version of the file. BBC BASIC is unusual in having tokenised BASIC. It makes for more efficient storage and allows you to use abbreviations like P. for PRINT. Most other BASICs use a text file (sometimes called an ASCII file) which can be used in a word processor. In fact, on the BBC, the source files for high level compiled languages like FORTRAN and BCPL are straight text files, since with a compiled language (as opposed to an interpreted one like BBC BASIC) there is little benefit in compressing the source code. So, how do you produce a text file version of your BASIC program. It's simple .... you *SPOOL one. As I use VIEW exclusively I will tell you about using this particular word processor, but the principles for using WORDWISE or INTER-WORD or whatever will be similar. With your program in memory, and your LISTO option set to 0, you type *SPOOL <filename>. Then you LIST the program, and as well as being output to the screen the program listing is saved to a file. When you have finished you type *SPOOL to stop the SPOOLing and the file <filename> contains a text version of your BASIC program. To load this file into VIEW you select it with *WORD. On versions up to 2.1 you then have to type NEW, and finally you READ <filename>. Trying to LOAD <filename> will not work correctly with a SPOOLed file. The program will now be loaded into your word processor. Ideally you want to work without line numbers because this makes it easier to move blocks of the program around. Removing them relies on BASIC's line numbers, when displayed, always occupying 5 character spaces. If there are less than five digits in the line number it is padded with leading blanks. This means that any group of five characters following a carriage return in a spooled BASIC program are bound to be line numbers. So, in VIEW 2.1, you type CHANGE |????? | on the command screen. The | (vertical bar, which is SHIFT(\) on your micro) represents a carriage return and each ? is a wild card for any digit. So changing |????? into | changes any occurrence of a carriage return followed by five characters (which includes blank spaces) into a carriage return by itself. This just removes any five characters found immediately following any carriage return, which means the first five characters of any line except the top one. With VIEW 3.0 you enter CHANGE ^C^?^?^?^?^? ^C and with Wordwise Plus you use the global search and replace facility (option 5) with |||R##### as the search string and |R as the replace string. With Inter-Word you select the 'Search and Replace' menu with CTRL-f3, and replace |M##### with |M. In this case you also have to switch off the change confirmation. When this has been done and you look at your text you will see that the line numbers have gone. Now you have to adjust the top and bottom of the text. At the bottom you will probably find the letters OL on their own on the last line. This is what's left of the *SPOOL you typed at the end of your listing and you just delete this line. You will probably also have to manually adjust the top line of the program to remove its line number. To make the text suitable for returning to a BASIC program form after you have edited it, you should enter a couple of commands at the top of the text. Each on a line of their own should go *BASIC (or *B.) followed by AUTO. This is because this text will eventually be *EXECed into the computer and *BASIC selects the right language while AUTO will turn on the automatic line numbering. In editing the text you can work with most of the facilities of the word processor, such as replacing words or moving blocks of text about or inserting lines. You must, however, make sure you turn off the formatting and justifying since you have to keep your lines separate. Although BASIC will accept lines that are up to 255 characters long, a limitation of using VIEW to edit source files is that you cannot have lines longer than 132 characters. Also your lines will not wrap around on the screen, so lines over 74 characters long (if you work in Mode 3, which I recommend) will run off the right hand end of the screen. You also have to take care with blank lines. If you want to include blank lines in your final BASIC or assembler program you will have to make sure that any blank lines in your text file contain a single space (or more, but that's wasteful). One very important limitation of this method of writing and editing BASIC is that you can no longer use GOTO or GOSUB in your programs! But you wouldn't want to anyway would you? Adding header and footer and formatting information, or margins, or using TABs or markers, will mean that your text file will contain extra control characters. Although you can SPOOL text out from your word processor to produce a text file, I work by ignoring all these facilities in VIEW and aiming to produce a text file more simply. If you do not use any stored commands or markers or TABs or new rulers then any text file SAVED from VIEW will only contain ASCII text characters, and so is suitable for the next stage of the operation. Once you have edited your source, how do you get it back into the machine ready to compile? This takes two stages. Let's assume that your source file, in memory in VIEW, has no stored commands, rulers, markers or TABS and so simply saying SAVE <filename> will save a text file. I have a small silicon disc system in my micro (BEEBUG's ROMIT) which allows me to use sideways RAM to save files. This speeds up this process and cuts down on disc use, but you can just as easily use disc for all these stages. When the file <filename> is saved you enter *EXEC <filename> which takes every character in the file and treats it just as if it had been typed in at the keyboard. Therefore the first line, *BASIC, selects the language and the second, AUTO, starts the automatic line numbering. You will see the program going in with line numbers now added. At the end of the file the micro will wait, showing the next line number. You press ESCAPE to finish the process. Your BASIC program is now in memory and ready to RUN. As an example I have provided a short piece of source code in text format which you can either load into a word processor or EXEC into memory ready to be run. The program B/osb26 is a simple ROM unplugging routine to remove a ROM that is causing trouble. I use it to remove ADFS when I want to use the AMX Art utilities or the AMPLE music language as there are clashes over workspace and memory, since ADFS in a B raises PAGE up to around &2000. The program works by using OSBYTEs 247 to 249 to write a JMP instruction (starting with &4C which is the op code for JMP) into a section of memory starting at &287. This memory is tested by the OS on every reset (BREAK) and if there is a JMP instruction at &287 the OS will obey the jump each time the reset occurs. In this way you can add your own code to the reset procedure. You might want to print your own message in the banner (this is the correct way of doing this, rather than intercepting service call 1 or 3) or there may be a piece of code that has to precede the ROM service calls to be effective. That last reason is why this code is used. The OS copies the ROM information bytes of all the resident sideways ROMs into a ROM information table in RAM during the reset initialisation. The OS knows whether a valid ROM is in a particular socket by checking the relevant byte in the ROM table. Invalid or absent ROMS have their byte set to zero. If we make one of these bytes zero after the OS has set it on initialisation, but before it sends out the service calls, then we have effectively removed the ROM from the OS's ken and therefore from the machine .... without having to actually touch it! The most likely reasons for wanting to do this are because of a clash of *command name with another ROM or a problem with the workspace that the ROM grabs for itself. The BREAK intercept code pointed to by the JUMP, set using OSBYTEs 247-9, is executed twice. Firstly before the tube initialisation and banner message with CARRY clear, and then after the tube initialisation and banner with CARRY set. To successfully remove the ROM we put the zero in the ROM information table when the CARRY is clear. This will mean that the zero is in place before the OS sends out the ROM service calls and so the ROM will play no part in grabbing workspace. Although you can remove the ROM by executing the intercept code when CARRY is set you will find that the memory allocation has already taken place and the OS high water mark (PAGE in BASIC) is set as if the ROM were still active. Once this code is run (it assembles at &380 in the I/O processor only) you press BREAK and from then on the ROM is absent. If you are not using cassettes then the block from &380 to &3DF is available to you for machine code. Re-CALLing the code at &380 will crash the machine and only a power down will rescue the situation. Also assembling any other code at &380 will crash the machine. You need to find in which socket your errant ROM lives (possibly using *ROMS or even *ROMLIST from module 9) and set the variable 'rom_list' accordingly. Note that this program can only unplug one ROM at a time. You could modify it to unplug more but be careful, it is very easy to crash the machine when intercepting BREAK! You can do a *FX247,0 to bring the ROM back and a *FX247,76 to remove it again - 76 is &4C which is 6502-speak for JMP. A complete cure for this intercept is best achieved by switching off. Your advanced guide will tell you more about OSBYTEs 247-9. ............................................................ So, that's it for OSbits. I hope you have enjoyed toying around with the assembler and have found some of the benefits and fun to be had programming your machine in its own language. My thanks to those of you who have commented on the series, especially Pete Vince who has provided much constructive criticism of my communicative abilities. All I can say is LDA #pint, STA Pete. If you missed any modules of OSbits, then watch out for a re-transmission of the whole series from September. The re-transmissions will have minor modifications to some of the files (a kind of second edition) taking note of your comments and any second thoughts I had along the way. Until we meet again on the datastream then, thanks for taking the trouble to download and read, and happy assembling. Andy Finney London 7 June 1987
00000000 4f 53 42 49 54 53 20 2d 20 41 6e 20 45 78 70 6c |OSBITS - An Expl| 00000010 6f 72 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 42 |oration of the B| 00000020 42 43 20 4d 69 63 72 6f 20 61 74 20 4d 61 63 68 |BC Micro at Mach| 00000030 69 6e 65 20 4c 65 76 65 6c 0d 0d 42 79 20 50 72 |ine Level..By Pr| 00000040 6f 67 72 61 6d 6d 65 72 0d 0d 2e 2e 2e 2e 2e 2e |ogrammer........| 00000050 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e |................| * 00000080 2e 2e 2e 0d 0d 0d 50 61 72 74 20 32 36 3a 20 45 |......Part 26: E| 00000090 64 69 74 69 6e 67 20 59 6f 75 72 20 53 6f 75 72 |diting Your Sour| 000000a0 63 65 20 43 6f 64 65 0d 0d 0d 42 72 69 6e 67 69 |ce Code...Bringi| 000000b0 6e 67 20 75 70 20 74 68 65 20 72 65 61 72 20 69 |ng up the rear i| 000000c0 6e 20 74 68 69 73 20 73 65 72 69 65 73 20 49 20 |n this series I | 000000d0 61 6d 20 67 6f 69 6e 67 20 74 6f 20 62 72 69 65 |am going to brie| 000000e0 66 6c 79 0d 64 69 73 63 75 73 73 20 65 64 69 74 |fly.discuss edit| 000000f0 69 6e 67 20 73 6f 75 72 63 65 20 63 6f 64 65 2e |ing source code.| 00000100 20 20 44 65 73 70 69 74 65 20 68 61 76 69 6e 67 | Despite having| 00000110 20 72 65 61 73 6f 6e 61 62 6c 65 0d 66 61 63 69 | reasonable.faci| 00000120 6c 69 74 69 65 73 20 66 6f 72 20 6c 69 6e 65 20 |lities for line | 00000130 65 64 69 74 69 6e 67 2c 20 6f 6e 65 20 6f 66 20 |editing, one of | 00000140 74 68 65 20 70 72 6f 62 6c 65 6d 73 20 6f 66 20 |the problems of | 00000150 77 6f 72 6b 69 6e 67 0d 77 69 74 68 20 6c 61 72 |working.with lar| 00000160 67 65 20 62 6f 64 69 65 73 20 6f 66 20 63 6f 64 |ge bodies of cod| 00000170 65 20 6f 6e 20 74 68 65 20 42 42 43 20 4d 69 63 |e on the BBC Mic| 00000180 72 6f 20 69 73 20 74 68 61 74 20 79 6f 75 20 6f |ro is that you o| 00000190 66 74 65 6e 0d 77 69 73 68 20 79 6f 75 20 63 6f |ften.wish you co| 000001a0 75 6c 64 20 65 64 69 74 20 69 74 20 6c 69 6b 65 |uld edit it like| 000001b0 20 79 6f 75 20 77 6f 75 6c 64 20 74 65 78 74 20 | you would text | 000001c0 6f 6e 20 61 20 77 6f 72 64 0d 70 72 6f 63 65 73 |on a word.proces| 000001d0 73 6f 72 3b 20 6d 6f 76 69 6e 67 20 62 6c 6f 63 |sor; moving bloc| 000001e0 6b 73 20 61 62 6f 75 74 20 61 6e 64 20 72 65 70 |ks about and rep| 000001f0 6c 61 63 69 6e 67 20 73 74 72 69 6e 67 73 2e 20 |lacing strings. | 00000200 20 54 68 65 72 65 0d 61 72 65 20 42 41 53 49 43 | There.are BASIC| 00000210 20 70 72 6f 67 72 61 6d 20 65 64 69 74 6f 72 73 | program editors| 00000220 20 28 73 75 63 68 20 61 73 20 74 68 65 20 6f 6e | (such as the on| 00000230 65 20 66 72 6f 6d 20 41 43 4f 52 4e 29 20 61 6e |e from ACORN) an| 00000240 64 0d 77 69 74 68 20 74 68 65 20 42 42 43 20 4d |d.with the BBC M| 00000250 61 73 74 65 72 20 6d 69 63 72 6f 20 79 6f 75 20 |aster micro you | 00000260 68 61 76 65 20 74 68 65 20 45 44 49 54 20 66 61 |have the EDIT fa| 00000270 63 69 6c 69 74 79 20 74 6f 20 6c 65 74 0d 79 6f |cility to let.yo| 00000280 75 20 64 6f 20 6a 75 73 74 20 74 68 69 73 2e 20 |u do just this. | 00000290 20 49 74 20 64 65 2d 74 6f 6b 65 6e 69 73 65 73 | It de-tokenises| 000002a0 20 74 68 65 20 42 41 53 49 43 20 66 69 6c 65 20 | the BASIC file | 000002b0 79 6f 75 20 61 72 65 0d 77 6f 72 6b 69 6e 67 20 |you are.working | 000002c0 6f 6e 20 61 6e 64 20 70 75 74 73 20 69 74 20 69 |on and puts it i| 000002d0 6e 20 6d 65 6d 6f 72 79 20 72 65 61 64 79 20 66 |n memory ready f| 000002e0 6f 72 20 74 68 65 20 45 44 49 54 20 70 72 6f 63 |or the EDIT proc| 000002f0 65 73 73 2e 20 0d 57 68 65 6e 20 79 6f 75 20 65 |ess. .When you e| 00000300 78 69 74 20 66 72 6f 6d 20 45 44 49 54 20 79 6f |xit from EDIT yo| 00000310 75 72 20 65 64 69 74 65 64 20 74 65 78 74 20 69 |ur edited text i| 00000320 73 20 70 75 74 20 62 61 63 6b 20 69 6e 74 6f 0d |s put back into.| 00000330 6d 65 6d 6f 72 79 2c 20 77 69 74 68 20 6c 69 6e |memory, with lin| 00000340 65 20 6e 75 6d 62 65 72 73 20 61 64 64 65 64 2c |e numbers added,| 00000350 20 61 73 20 61 20 42 41 53 49 43 20 70 72 6f 67 | as a BASIC prog| 00000360 72 61 6d 2e 0d 0d 49 66 20 79 6f 75 20 68 61 76 |ram...If you hav| 00000370 65 20 61 20 77 6f 72 64 20 70 72 6f 63 65 73 73 |e a word process| 00000380 6f 72 20 61 6e 64 20 61 20 64 69 73 63 20 64 72 |or and a disc dr| 00000390 69 76 65 20 28 6f 72 2c 20 65 76 65 6e 0d 62 65 |ive (or, even.be| 000003a0 74 74 65 72 2c 20 73 6f 6d 65 20 6b 69 6e 64 20 |tter, some kind | 000003b0 6f 66 20 52 41 4d 20 66 69 6c 69 6e 67 20 73 79 |of RAM filing sy| 000003c0 73 74 65 6d 20 6c 69 6b 65 20 42 45 45 42 55 47 |stem like BEEBUG| 000003d0 27 73 20 52 4f 4d 49 54 29 0d 79 6f 75 20 63 61 |'s ROMIT).you ca| 000003e0 6e 20 63 61 72 72 79 20 6f 75 74 20 74 68 69 73 |n carry out this| 000003f0 20 6b 69 6e 64 20 6f 66 20 6f 70 65 72 61 74 69 | kind of operati| 00000400 6f 6e 2e 20 20 4d 61 6e 79 20 6f 66 20 74 68 65 |on. Many of the| 00000410 0d 61 73 73 65 6d 62 6c 65 72 20 6d 6f 64 75 6c |.assembler modul| 00000420 65 73 20 6f 66 20 4f 53 62 69 74 73 20 77 65 72 |es of OSbits wer| 00000430 65 20 65 64 69 74 65 64 20 75 73 69 6e 67 20 56 |e edited using V| 00000440 49 45 57 20 69 6e 20 74 68 69 73 0d 77 61 79 2e |IEW in this.way.| 00000450 0d 0d 41 6c 74 68 6f 75 67 68 20 42 41 53 49 43 |..Although BASIC| 00000460 20 64 6f 65 73 20 6e 6f 74 20 75 73 65 20 74 6f | does not use to| 00000470 6b 65 6e 73 20 66 6f 72 20 61 73 73 65 6d 62 6c |kens for assembl| 00000480 65 72 20 6d 6e 65 6d 6f 6e 69 63 73 2c 0d 74 68 |er mnemonics,.th| 00000490 69 6e 67 73 20 6c 69 6b 65 20 6c 69 6e 65 20 6e |ings like line n| 000004a0 75 6d 62 65 72 73 20 61 6e 64 20 74 68 65 20 46 |umbers and the F| 000004b0 4f 52 2f 4e 45 58 54 20 6c 6f 6f 70 20 61 72 6f |OR/NEXT loop aro| 000004c0 75 6e 64 20 79 6f 75 72 0d 61 73 73 65 6d 62 6c |und your.assembl| 000004d0 79 20 63 6f 64 65 20 61 72 65 20 73 74 69 6c 6c |y code are still| 000004e0 20 74 6f 6b 65 6e 69 73 65 64 2e 20 20 54 68 69 | tokenised. Thi| 000004f0 73 20 6d 65 61 6e 73 20 74 68 61 74 20 79 6f 75 |s means that you| 00000500 0d 63 61 6e 6e 6f 74 20 74 61 6b 65 20 61 20 42 |.cannot take a B| 00000510 41 53 49 43 20 66 69 6c 65 20 61 6e 64 20 72 65 |ASIC file and re| 00000520 61 64 20 69 74 20 64 69 72 65 63 74 6c 79 20 69 |ad it directly i| 00000530 6e 74 6f 20 61 20 77 6f 72 64 0d 70 72 6f 63 65 |nto a word.proce| 00000540 73 73 6f 72 2e 20 20 59 6f 75 20 68 61 76 65 20 |ssor. You have | 00000550 74 6f 20 68 61 76 65 20 61 20 74 65 78 74 20 76 |to have a text v| 00000560 65 72 73 69 6f 6e 20 6f 66 20 74 68 65 20 66 69 |ersion of the fi| 00000570 6c 65 2e 20 0d 42 42 43 20 42 41 53 49 43 20 69 |le. .BBC BASIC i| 00000580 73 20 75 6e 75 73 75 61 6c 20 69 6e 20 68 61 76 |s unusual in hav| 00000590 69 6e 67 20 74 6f 6b 65 6e 69 73 65 64 20 42 41 |ing tokenised BA| 000005a0 53 49 43 2e 20 20 49 74 20 6d 61 6b 65 73 0d 66 |SIC. It makes.f| 000005b0 6f 72 20 6d 6f 72 65 20 65 66 66 69 63 69 65 6e |or more efficien| 000005c0 74 20 73 74 6f 72 61 67 65 20 61 6e 64 20 61 6c |t storage and al| 000005d0 6c 6f 77 73 20 79 6f 75 20 74 6f 20 75 73 65 0d |lows you to use.| 000005e0 61 62 62 72 65 76 69 61 74 69 6f 6e 73 20 6c 69 |abbreviations li| 000005f0 6b 65 20 50 2e 20 66 6f 72 20 50 52 49 4e 54 2e |ke P. for PRINT.| 00000600 20 20 4d 6f 73 74 20 6f 74 68 65 72 20 42 41 53 | Most other BAS| 00000610 49 43 73 20 75 73 65 20 61 0d 74 65 78 74 20 66 |ICs use a.text f| 00000620 69 6c 65 20 28 73 6f 6d 65 74 69 6d 65 73 20 63 |ile (sometimes c| 00000630 61 6c 6c 65 64 20 61 6e 20 41 53 43 49 49 20 66 |alled an ASCII f| 00000640 69 6c 65 29 20 77 68 69 63 68 20 63 61 6e 20 62 |ile) which can b| 00000650 65 20 75 73 65 64 0d 69 6e 20 61 20 77 6f 72 64 |e used.in a word| 00000660 20 70 72 6f 63 65 73 73 6f 72 2e 20 20 49 6e 20 | processor. In | 00000670 66 61 63 74 2c 20 6f 6e 20 74 68 65 20 42 42 43 |fact, on the BBC| 00000680 2c 20 74 68 65 20 73 6f 75 72 63 65 20 66 69 6c |, the source fil| 00000690 65 73 0d 66 6f 72 20 68 69 67 68 20 6c 65 76 65 |es.for high leve| 000006a0 6c 20 63 6f 6d 70 69 6c 65 64 20 6c 61 6e 67 75 |l compiled langu| 000006b0 61 67 65 73 20 6c 69 6b 65 20 46 4f 52 54 52 41 |ages like FORTRA| 000006c0 4e 20 61 6e 64 20 42 43 50 4c 20 61 72 65 0d 73 |N and BCPL are.s| 000006d0 74 72 61 69 67 68 74 20 74 65 78 74 20 66 69 6c |traight text fil| 000006e0 65 73 2c 20 73 69 6e 63 65 20 77 69 74 68 20 61 |es, since with a| 000006f0 20 63 6f 6d 70 69 6c 65 64 20 6c 61 6e 67 75 61 | compiled langua| 00000700 67 65 20 28 61 73 0d 6f 70 70 6f 73 65 64 20 74 |ge (as.opposed t| 00000710 6f 20 61 6e 20 69 6e 74 65 72 70 72 65 74 65 64 |o an interpreted| 00000720 20 6f 6e 65 20 6c 69 6b 65 20 42 42 43 20 42 41 | one like BBC BA| 00000730 53 49 43 29 20 74 68 65 72 65 20 69 73 0d 6c 69 |SIC) there is.li| 00000740 74 74 6c 65 20 62 65 6e 65 66 69 74 20 69 6e 20 |ttle benefit in | 00000750 63 6f 6d 70 72 65 73 73 69 6e 67 20 74 68 65 20 |compressing the | 00000760 73 6f 75 72 63 65 20 63 6f 64 65 2e 0d 0d 53 6f |source code...So| 00000770 2c 20 68 6f 77 20 64 6f 20 79 6f 75 20 70 72 6f |, how do you pro| 00000780 64 75 63 65 20 61 20 74 65 78 74 20 66 69 6c 65 |duce a text file| 00000790 20 76 65 72 73 69 6f 6e 20 6f 66 20 79 6f 75 72 | version of your| 000007a0 20 42 41 53 49 43 0d 70 72 6f 67 72 61 6d 2e 20 | BASIC.program. | 000007b0 20 49 74 27 73 20 73 69 6d 70 6c 65 20 2e 2e 2e | It's simple ...| 000007c0 2e 20 79 6f 75 20 2a 53 50 4f 4f 4c 20 6f 6e 65 |. you *SPOOL one| 000007d0 2e 20 20 41 73 20 49 20 75 73 65 20 56 49 45 57 |. As I use VIEW| 000007e0 0d 65 78 63 6c 75 73 69 76 65 6c 79 20 49 20 77 |.exclusively I w| 000007f0 69 6c 6c 20 74 65 6c 6c 20 79 6f 75 20 61 62 6f |ill tell you abo| 00000800 75 74 20 75 73 69 6e 67 20 74 68 69 73 20 70 61 |ut using this pa| 00000810 72 74 69 63 75 6c 61 72 20 77 6f 72 64 0d 70 72 |rticular word.pr| 00000820 6f 63 65 73 73 6f 72 2c 20 62 75 74 20 74 68 65 |ocessor, but the| 00000830 20 70 72 69 6e 63 69 70 6c 65 73 20 66 6f 72 20 | principles for | 00000840 75 73 69 6e 67 20 57 4f 52 44 57 49 53 45 20 6f |using WORDWISE o| 00000850 72 0d 49 4e 54 45 52 2d 57 4f 52 44 20 6f 72 20 |r.INTER-WORD or | 00000860 77 68 61 74 65 76 65 72 20 77 69 6c 6c 20 62 65 |whatever will be| 00000870 20 73 69 6d 69 6c 61 72 2e 0d 0d 57 69 74 68 20 | similar...With | 00000880 79 6f 75 72 20 70 72 6f 67 72 61 6d 20 69 6e 20 |your program in | 00000890 6d 65 6d 6f 72 79 2c 20 61 6e 64 20 79 6f 75 72 |memory, and your| 000008a0 20 4c 49 53 54 4f 20 6f 70 74 69 6f 6e 20 73 65 | LISTO option se| 000008b0 74 20 74 6f 20 30 2c 0d 79 6f 75 20 74 79 70 65 |t to 0,.you type| 000008c0 20 2a 53 50 4f 4f 4c 20 3c 66 69 6c 65 6e 61 6d | *SPOOL <filenam| 000008d0 65 3e 2e 20 20 54 68 65 6e 20 79 6f 75 20 4c 49 |e>. Then you LI| 000008e0 53 54 20 74 68 65 20 70 72 6f 67 72 61 6d 2c 20 |ST the program, | 000008f0 61 6e 64 0d 61 73 20 77 65 6c 6c 20 61 73 20 62 |and.as well as b| 00000900 65 69 6e 67 20 6f 75 74 70 75 74 20 74 6f 20 74 |eing output to t| 00000910 68 65 20 73 63 72 65 65 6e 20 74 68 65 20 70 72 |he screen the pr| 00000920 6f 67 72 61 6d 20 6c 69 73 74 69 6e 67 20 69 73 |ogram listing is| 00000930 0d 73 61 76 65 64 20 74 6f 20 61 20 66 69 6c 65 |.saved to a file| 00000940 2e 20 20 57 68 65 6e 20 79 6f 75 20 68 61 76 65 |. When you have| 00000950 20 66 69 6e 69 73 68 65 64 20 79 6f 75 20 74 79 | finished you ty| 00000960 70 65 20 2a 53 50 4f 4f 4c 20 74 6f 0d 73 74 6f |pe *SPOOL to.sto| 00000970 70 20 74 68 65 20 53 50 4f 4f 4c 69 6e 67 20 61 |p the SPOOLing a| 00000980 6e 64 20 74 68 65 20 66 69 6c 65 20 3c 66 69 6c |nd the file <fil| 00000990 65 6e 61 6d 65 3e 20 63 6f 6e 74 61 69 6e 73 20 |ename> contains | 000009a0 61 20 74 65 78 74 0d 76 65 72 73 69 6f 6e 20 6f |a text.version o| 000009b0 66 20 79 6f 75 72 20 42 41 53 49 43 20 70 72 6f |f your BASIC pro| 000009c0 67 72 61 6d 2e 0d 0d 54 6f 20 6c 6f 61 64 20 74 |gram...To load t| 000009d0 68 69 73 20 66 69 6c 65 20 69 6e 74 6f 20 56 49 |his file into VI| 000009e0 45 57 20 79 6f 75 20 73 65 6c 65 63 74 20 69 74 |EW you select it| 000009f0 20 77 69 74 68 20 2a 57 4f 52 44 2e 20 20 4f 6e | with *WORD. On| 00000a00 0d 76 65 72 73 69 6f 6e 73 20 75 70 20 74 6f 20 |.versions up to | 00000a10 32 2e 31 20 79 6f 75 20 74 68 65 6e 20 68 61 76 |2.1 you then hav| 00000a20 65 20 74 6f 20 74 79 70 65 20 4e 45 57 2c 20 61 |e to type NEW, a| 00000a30 6e 64 20 66 69 6e 61 6c 6c 79 0d 79 6f 75 20 52 |nd finally.you R| 00000a40 45 41 44 20 3c 66 69 6c 65 6e 61 6d 65 3e 2e 20 |EAD <filename>. | 00000a50 20 54 72 79 69 6e 67 20 74 6f 20 4c 4f 41 44 20 | Trying to LOAD | 00000a60 3c 66 69 6c 65 6e 61 6d 65 3e 20 77 69 6c 6c 20 |<filename> will | 00000a70 6e 6f 74 0d 77 6f 72 6b 20 63 6f 72 72 65 63 74 |not.work correct| 00000a80 6c 79 20 77 69 74 68 20 61 20 53 50 4f 4f 4c 65 |ly with a SPOOLe| 00000a90 64 20 66 69 6c 65 2e 20 20 54 68 65 20 70 72 6f |d file. The pro| 00000aa0 67 72 61 6d 20 77 69 6c 6c 20 6e 6f 77 20 62 65 |gram will now be| 00000ab0 0d 6c 6f 61 64 65 64 20 69 6e 74 6f 20 79 6f 75 |.loaded into you| 00000ac0 72 20 77 6f 72 64 20 70 72 6f 63 65 73 73 6f 72 |r word processor| 00000ad0 2e 0d 0d 49 64 65 61 6c 6c 79 20 79 6f 75 20 77 |...Ideally you w| 00000ae0 61 6e 74 20 74 6f 20 77 6f 72 6b 20 77 69 74 68 |ant to work with| 00000af0 6f 75 74 20 6c 69 6e 65 20 6e 75 6d 62 65 72 73 |out line numbers| 00000b00 20 62 65 63 61 75 73 65 20 74 68 69 73 0d 6d 61 | because this.ma| 00000b10 6b 65 73 20 69 74 20 65 61 73 69 65 72 20 74 6f |kes it easier to| 00000b20 20 6d 6f 76 65 20 62 6c 6f 63 6b 73 20 6f 66 20 | move blocks of | 00000b30 74 68 65 20 70 72 6f 67 72 61 6d 20 61 72 6f 75 |the program arou| 00000b40 6e 64 2e 20 0d 52 65 6d 6f 76 69 6e 67 20 74 68 |nd. .Removing th| 00000b50 65 6d 20 72 65 6c 69 65 73 20 6f 6e 20 42 41 53 |em relies on BAS| 00000b60 49 43 27 73 20 6c 69 6e 65 20 6e 75 6d 62 65 72 |IC's line number| 00000b70 73 2c 20 77 68 65 6e 0d 64 69 73 70 6c 61 79 65 |s, when.displaye| 00000b80 64 2c 20 61 6c 77 61 79 73 20 6f 63 63 75 70 79 |d, always occupy| 00000b90 69 6e 67 20 35 20 63 68 61 72 61 63 74 65 72 20 |ing 5 character | 00000ba0 73 70 61 63 65 73 2e 20 20 49 66 20 74 68 65 72 |spaces. If ther| 00000bb0 65 0d 61 72 65 20 6c 65 73 73 20 74 68 61 6e 20 |e.are less than | 00000bc0 66 69 76 65 20 64 69 67 69 74 73 20 69 6e 20 74 |five digits in t| 00000bd0 68 65 20 6c 69 6e 65 20 6e 75 6d 62 65 72 20 69 |he line number i| 00000be0 74 20 69 73 20 70 61 64 64 65 64 0d 77 69 74 68 |t is padded.with| 00000bf0 20 6c 65 61 64 69 6e 67 20 62 6c 61 6e 6b 73 2e | leading blanks.| 00000c00 20 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 | This means tha| 00000c10 74 20 61 6e 79 20 67 72 6f 75 70 20 6f 66 20 66 |t any group of f| 00000c20 69 76 65 0d 63 68 61 72 61 63 74 65 72 73 20 66 |ive.characters f| 00000c30 6f 6c 6c 6f 77 69 6e 67 20 61 20 63 61 72 72 69 |ollowing a carri| 00000c40 61 67 65 20 72 65 74 75 72 6e 20 69 6e 20 61 20 |age return in a | 00000c50 73 70 6f 6f 6c 65 64 20 42 41 53 49 43 0d 70 72 |spooled BASIC.pr| 00000c60 6f 67 72 61 6d 20 61 72 65 20 62 6f 75 6e 64 20 |ogram are bound | 00000c70 74 6f 20 62 65 20 6c 69 6e 65 20 6e 75 6d 62 65 |to be line numbe| 00000c80 72 73 2e 0d 0d 53 6f 2c 20 69 6e 20 56 49 45 57 |rs...So, in VIEW| 00000c90 20 32 2e 31 2c 20 79 6f 75 20 74 79 70 65 0d 0d | 2.1, you type..| 00000ca0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000cb0 20 20 43 48 41 4e 47 45 20 7c 3f 3f 3f 3f 3f 20 | CHANGE |????? | 00000cc0 7c 0d 0d 6f 6e 20 74 68 65 20 63 6f 6d 6d 61 6e ||..on the comman| 00000cd0 64 20 73 63 72 65 65 6e 2e 20 20 54 68 65 20 7c |d screen. The || 00000ce0 20 28 76 65 72 74 69 63 61 6c 20 62 61 72 2c 20 | (vertical bar, | 00000cf0 77 68 69 63 68 20 69 73 0d 53 48 49 46 54 28 5c |which is.SHIFT(\| 00000d00 29 20 6f 6e 20 79 6f 75 72 20 6d 69 63 72 6f 29 |) on your micro)| 00000d10 20 72 65 70 72 65 73 65 6e 74 73 20 61 20 63 61 | represents a ca| 00000d20 72 72 69 61 67 65 20 72 65 74 75 72 6e 20 61 6e |rriage return an| 00000d30 64 0d 65 61 63 68 20 3f 20 69 73 20 61 20 77 69 |d.each ? is a wi| 00000d40 6c 64 20 63 61 72 64 20 66 6f 72 20 61 6e 79 20 |ld card for any | 00000d50 64 69 67 69 74 2e 20 20 53 6f 20 63 68 61 6e 67 |digit. So chang| 00000d60 69 6e 67 20 7c 3f 3f 3f 3f 3f 0d 69 6e 74 6f 20 |ing |?????.into | 00000d70 7c 20 63 68 61 6e 67 65 73 20 61 6e 79 20 6f 63 || changes any oc| 00000d80 63 75 72 72 65 6e 63 65 20 6f 66 20 61 20 63 61 |currence of a ca| 00000d90 72 72 69 61 67 65 20 72 65 74 75 72 6e 20 66 6f |rriage return fo| 00000da0 6c 6c 6f 77 65 64 0d 62 79 20 66 69 76 65 20 63 |llowed.by five c| 00000db0 68 61 72 61 63 74 65 72 73 20 28 77 68 69 63 68 |haracters (which| 00000dc0 20 69 6e 63 6c 75 64 65 73 20 62 6c 61 6e 6b 20 | includes blank | 00000dd0 73 70 61 63 65 73 29 20 69 6e 74 6f 20 61 0d 63 |spaces) into a.c| 00000de0 61 72 72 69 61 67 65 20 72 65 74 75 72 6e 20 62 |arriage return b| 00000df0 79 20 69 74 73 65 6c 66 2e 20 20 54 68 69 73 20 |y itself. This | 00000e00 6a 75 73 74 20 72 65 6d 6f 76 65 73 20 61 6e 79 |just removes any| 00000e10 20 66 69 76 65 0d 63 68 61 72 61 63 74 65 72 73 | five.characters| 00000e20 20 66 6f 75 6e 64 20 69 6d 6d 65 64 69 61 74 65 | found immediate| 00000e30 6c 79 20 66 6f 6c 6c 6f 77 69 6e 67 20 61 6e 79 |ly following any| 00000e40 20 63 61 72 72 69 61 67 65 20 72 65 74 75 72 6e | carriage return| 00000e50 2c 0d 77 68 69 63 68 20 6d 65 61 6e 73 20 74 68 |,.which means th| 00000e60 65 20 66 69 72 73 74 20 66 69 76 65 20 63 68 61 |e first five cha| 00000e70 72 61 63 74 65 72 73 20 6f 66 20 61 6e 79 20 6c |racters of any l| 00000e80 69 6e 65 20 65 78 63 65 70 74 20 74 68 65 0d 74 |ine except the.t| 00000e90 6f 70 20 6f 6e 65 2e 0d 0d 57 69 74 68 20 56 49 |op one...With VI| 00000ea0 45 57 20 33 2e 30 20 79 6f 75 20 65 6e 74 65 72 |EW 3.0 you enter| 00000eb0 20 43 48 41 4e 47 45 20 5e 43 5e 3f 5e 3f 5e 3f | CHANGE ^C^?^?^?| 00000ec0 5e 3f 5e 3f 20 5e 43 20 61 6e 64 20 77 69 74 68 |^?^? ^C and with| 00000ed0 0d 57 6f 72 64 77 69 73 65 20 50 6c 75 73 20 79 |.Wordwise Plus y| 00000ee0 6f 75 20 75 73 65 20 74 68 65 20 67 6c 6f 62 61 |ou use the globa| 00000ef0 6c 20 73 65 61 72 63 68 20 61 6e 64 20 72 65 70 |l search and rep| 00000f00 6c 61 63 65 20 66 61 63 69 6c 69 74 79 0d 28 6f |lace facility.(o| 00000f10 70 74 69 6f 6e 20 35 29 20 77 69 74 68 20 7c 7c |ption 5) with ||| 00000f20 7c 52 23 23 23 23 23 20 61 73 20 74 68 65 20 73 ||R##### as the s| 00000f30 65 61 72 63 68 20 73 74 72 69 6e 67 20 61 6e 64 |earch string and| 00000f40 20 7c 52 20 61 73 20 74 68 65 0d 72 65 70 6c 61 | |R as the.repla| 00000f50 63 65 20 73 74 72 69 6e 67 2e 20 20 57 69 74 68 |ce string. With| 00000f60 20 49 6e 74 65 72 2d 57 6f 72 64 20 79 6f 75 20 | Inter-Word you | 00000f70 73 65 6c 65 63 74 20 74 68 65 20 27 53 65 61 72 |select the 'Sear| 00000f80 63 68 20 61 6e 64 0d 52 65 70 6c 61 63 65 27 20 |ch and.Replace' | 00000f90 6d 65 6e 75 20 77 69 74 68 20 43 54 52 4c 2d 66 |menu with CTRL-f| 00000fa0 33 2c 20 61 6e 64 20 72 65 70 6c 61 63 65 20 7c |3, and replace || 00000fb0 4d 23 23 23 23 23 20 77 69 74 68 20 7c 4d 2e 20 |M##### with |M. | 00000fc0 20 49 6e 0d 74 68 69 73 20 63 61 73 65 20 79 6f | In.this case yo| 00000fd0 75 20 61 6c 73 6f 20 68 61 76 65 20 74 6f 20 73 |u also have to s| 00000fe0 77 69 74 63 68 20 6f 66 66 20 74 68 65 20 63 68 |witch off the ch| 00000ff0 61 6e 67 65 0d 63 6f 6e 66 69 72 6d 61 74 69 6f |ange.confirmatio| 00001000 6e 2e 0d 0d 57 68 65 6e 20 74 68 69 73 20 68 61 |n...When this ha| 00001010 73 20 62 65 65 6e 20 64 6f 6e 65 20 61 6e 64 20 |s been done and | 00001020 79 6f 75 20 6c 6f 6f 6b 20 61 74 20 79 6f 75 72 |you look at your| 00001030 20 74 65 78 74 20 79 6f 75 20 77 69 6c 6c 0d 73 | text you will.s| 00001040 65 65 20 74 68 61 74 20 74 68 65 20 6c 69 6e 65 |ee that the line| 00001050 20 6e 75 6d 62 65 72 73 20 68 61 76 65 20 67 6f | numbers have go| 00001060 6e 65 2e 20 20 4e 6f 77 20 79 6f 75 20 68 61 76 |ne. Now you hav| 00001070 65 20 74 6f 20 61 64 6a 75 73 74 0d 74 68 65 20 |e to adjust.the | 00001080 74 6f 70 20 61 6e 64 20 62 6f 74 74 6f 6d 20 6f |top and bottom o| 00001090 66 20 74 68 65 20 74 65 78 74 2e 20 20 41 74 20 |f the text. At | 000010a0 74 68 65 20 62 6f 74 74 6f 6d 20 79 6f 75 20 77 |the bottom you w| 000010b0 69 6c 6c 0d 70 72 6f 62 61 62 6c 79 20 66 69 6e |ill.probably fin| 000010c0 64 20 74 68 65 20 6c 65 74 74 65 72 73 20 4f 4c |d the letters OL| 000010d0 20 6f 6e 20 74 68 65 69 72 20 6f 77 6e 20 6f 6e | on their own on| 000010e0 20 74 68 65 20 6c 61 73 74 20 6c 69 6e 65 2e 20 | the last line. | 000010f0 0d 54 68 69 73 20 69 73 20 77 68 61 74 27 73 20 |.This is what's | 00001100 6c 65 66 74 20 6f 66 20 74 68 65 20 2a 53 50 4f |left of the *SPO| 00001110 4f 4c 20 79 6f 75 20 74 79 70 65 64 20 61 74 20 |OL you typed at | 00001120 74 68 65 20 65 6e 64 20 6f 66 0d 79 6f 75 72 20 |the end of.your | 00001130 6c 69 73 74 69 6e 67 20 61 6e 64 20 79 6f 75 20 |listing and you | 00001140 6a 75 73 74 20 64 65 6c 65 74 65 20 74 68 69 73 |just delete this| 00001150 20 6c 69 6e 65 2e 20 20 59 6f 75 20 77 69 6c 6c | line. You will| 00001160 0d 70 72 6f 62 61 62 6c 79 20 61 6c 73 6f 20 68 |.probably also h| 00001170 61 76 65 20 74 6f 20 6d 61 6e 75 61 6c 6c 79 20 |ave to manually | 00001180 61 64 6a 75 73 74 20 74 68 65 20 74 6f 70 20 6c |adjust the top l| 00001190 69 6e 65 20 6f 66 20 74 68 65 0d 70 72 6f 67 72 |ine of the.progr| 000011a0 61 6d 20 74 6f 20 72 65 6d 6f 76 65 20 69 74 73 |am to remove its| 000011b0 20 6c 69 6e 65 20 6e 75 6d 62 65 72 2e 0d 0d 54 | line number...T| 000011c0 6f 20 6d 61 6b 65 20 74 68 65 20 74 65 78 74 20 |o make the text | 000011d0 73 75 69 74 61 62 6c 65 20 66 6f 72 20 72 65 74 |suitable for ret| 000011e0 75 72 6e 69 6e 67 20 74 6f 20 61 20 42 41 53 49 |urning to a BASI| 000011f0 43 20 70 72 6f 67 72 61 6d 0d 66 6f 72 6d 20 61 |C program.form a| 00001200 66 74 65 72 20 79 6f 75 20 68 61 76 65 20 65 64 |fter you have ed| 00001210 69 74 65 64 20 69 74 2c 20 79 6f 75 20 73 68 6f |ited it, you sho| 00001220 75 6c 64 20 65 6e 74 65 72 20 61 20 63 6f 75 70 |uld enter a coup| 00001230 6c 65 20 6f 66 0d 63 6f 6d 6d 61 6e 64 73 20 61 |le of.commands a| 00001240 74 20 74 68 65 20 74 6f 70 20 6f 66 20 74 68 65 |t the top of the| 00001250 20 74 65 78 74 2e 20 20 45 61 63 68 20 6f 6e 20 | text. Each on | 00001260 61 20 6c 69 6e 65 20 6f 66 20 74 68 65 69 72 0d |a line of their.| 00001270 6f 77 6e 20 73 68 6f 75 6c 64 20 67 6f 20 2a 42 |own should go *B| 00001280 41 53 49 43 20 28 6f 72 20 2a 42 2e 29 20 66 6f |ASIC (or *B.) fo| 00001290 6c 6c 6f 77 65 64 20 62 79 20 41 55 54 4f 2e 20 |llowed by AUTO. | 000012a0 20 54 68 69 73 20 69 73 0d 62 65 63 61 75 73 65 | This is.because| 000012b0 20 74 68 69 73 20 74 65 78 74 20 77 69 6c 6c 20 | this text will | 000012c0 65 76 65 6e 74 75 61 6c 6c 79 20 62 65 20 2a 45 |eventually be *E| 000012d0 58 45 43 65 64 20 69 6e 74 6f 20 74 68 65 0d 63 |XECed into the.c| 000012e0 6f 6d 70 75 74 65 72 20 61 6e 64 20 2a 42 41 53 |omputer and *BAS| 000012f0 49 43 20 73 65 6c 65 63 74 73 20 74 68 65 20 72 |IC selects the r| 00001300 69 67 68 74 20 6c 61 6e 67 75 61 67 65 20 77 68 |ight language wh| 00001310 69 6c 65 20 41 55 54 4f 0d 77 69 6c 6c 20 74 75 |ile AUTO.will tu| 00001320 72 6e 20 6f 6e 20 74 68 65 20 61 75 74 6f 6d 61 |rn on the automa| 00001330 74 69 63 20 6c 69 6e 65 20 6e 75 6d 62 65 72 69 |tic line numberi| 00001340 6e 67 2e 0d 0d 49 6e 20 65 64 69 74 69 6e 67 20 |ng...In editing | 00001350 74 68 65 20 74 65 78 74 20 79 6f 75 20 63 61 6e |the text you can| 00001360 20 77 6f 72 6b 20 77 69 74 68 20 6d 6f 73 74 20 | work with most | 00001370 6f 66 20 74 68 65 20 66 61 63 69 6c 69 74 69 65 |of the facilitie| 00001380 73 0d 6f 66 20 74 68 65 20 77 6f 72 64 20 70 72 |s.of the word pr| 00001390 6f 63 65 73 73 6f 72 2c 20 73 75 63 68 20 61 73 |ocessor, such as| 000013a0 20 72 65 70 6c 61 63 69 6e 67 20 77 6f 72 64 73 | replacing words| 000013b0 20 6f 72 20 6d 6f 76 69 6e 67 0d 62 6c 6f 63 6b | or moving.block| 000013c0 73 20 6f 66 20 74 65 78 74 20 61 62 6f 75 74 20 |s of text about | 000013d0 6f 72 20 69 6e 73 65 72 74 69 6e 67 20 6c 69 6e |or inserting lin| 000013e0 65 73 2e 20 20 59 6f 75 20 6d 75 73 74 2c 20 68 |es. You must, h| 000013f0 6f 77 65 76 65 72 2c 0d 6d 61 6b 65 20 73 75 72 |owever,.make sur| 00001400 65 20 79 6f 75 20 74 75 72 6e 20 6f 66 66 20 74 |e you turn off t| 00001410 68 65 20 66 6f 72 6d 61 74 74 69 6e 67 20 61 6e |he formatting an| 00001420 64 20 6a 75 73 74 69 66 79 69 6e 67 20 73 69 6e |d justifying sin| 00001430 63 65 0d 79 6f 75 20 68 61 76 65 20 74 6f 20 6b |ce.you have to k| 00001440 65 65 70 20 79 6f 75 72 20 6c 69 6e 65 73 20 73 |eep your lines s| 00001450 65 70 61 72 61 74 65 2e 20 20 41 6c 74 68 6f 75 |eparate. Althou| 00001460 67 68 20 42 41 53 49 43 20 77 69 6c 6c 0d 61 63 |gh BASIC will.ac| 00001470 63 65 70 74 20 6c 69 6e 65 73 20 74 68 61 74 20 |cept lines that | 00001480 61 72 65 20 75 70 20 74 6f 20 32 35 35 20 63 68 |are up to 255 ch| 00001490 61 72 61 63 74 65 72 73 20 6c 6f 6e 67 2c 20 61 |aracters long, a| 000014a0 0d 6c 69 6d 69 74 61 74 69 6f 6e 20 6f 66 20 75 |.limitation of u| 000014b0 73 69 6e 67 20 56 49 45 57 20 74 6f 20 65 64 69 |sing VIEW to edi| 000014c0 74 20 73 6f 75 72 63 65 20 66 69 6c 65 73 20 69 |t source files i| 000014d0 73 20 74 68 61 74 20 79 6f 75 0d 63 61 6e 6e 6f |s that you.canno| 000014e0 74 20 68 61 76 65 20 6c 69 6e 65 73 20 6c 6f 6e |t have lines lon| 000014f0 67 65 72 20 74 68 61 6e 20 31 33 32 20 63 68 61 |ger than 132 cha| 00001500 72 61 63 74 65 72 73 2e 20 20 41 6c 73 6f 20 79 |racters. Also y| 00001510 6f 75 72 0d 6c 69 6e 65 73 20 77 69 6c 6c 20 6e |our.lines will n| 00001520 6f 74 20 77 72 61 70 20 61 72 6f 75 6e 64 20 6f |ot wrap around o| 00001530 6e 20 74 68 65 20 73 63 72 65 65 6e 2c 20 73 6f |n the screen, so| 00001540 20 6c 69 6e 65 73 20 6f 76 65 72 20 37 34 0d 63 | lines over 74.c| 00001550 68 61 72 61 63 74 65 72 73 20 6c 6f 6e 67 20 28 |haracters long (| 00001560 69 66 20 79 6f 75 20 77 6f 72 6b 20 69 6e 20 4d |if you work in M| 00001570 6f 64 65 20 33 2c 20 77 68 69 63 68 20 49 20 72 |ode 3, which I r| 00001580 65 63 6f 6d 6d 65 6e 64 29 0d 77 69 6c 6c 20 72 |ecommend).will r| 00001590 75 6e 20 6f 66 66 20 74 68 65 20 72 69 67 68 74 |un off the right| 000015a0 20 68 61 6e 64 20 65 6e 64 20 6f 66 20 74 68 65 | hand end of the| 000015b0 20 73 63 72 65 65 6e 2e 0d 0d 59 6f 75 20 61 6c | screen...You al| 000015c0 73 6f 20 68 61 76 65 20 74 6f 20 74 61 6b 65 20 |so have to take | 000015d0 63 61 72 65 20 77 69 74 68 20 62 6c 61 6e 6b 20 |care with blank | 000015e0 6c 69 6e 65 73 2e 20 20 49 66 20 79 6f 75 20 77 |lines. If you w| 000015f0 61 6e 74 20 74 6f 0d 69 6e 63 6c 75 64 65 20 62 |ant to.include b| 00001600 6c 61 6e 6b 20 6c 69 6e 65 73 20 69 6e 20 79 6f |lank lines in yo| 00001610 75 72 20 66 69 6e 61 6c 20 42 41 53 49 43 20 6f |ur final BASIC o| 00001620 72 20 61 73 73 65 6d 62 6c 65 72 20 70 72 6f 67 |r assembler prog| 00001630 72 61 6d 0d 79 6f 75 20 77 69 6c 6c 20 68 61 76 |ram.you will hav| 00001640 65 20 74 6f 20 6d 61 6b 65 20 73 75 72 65 20 74 |e to make sure t| 00001650 68 61 74 20 61 6e 79 20 62 6c 61 6e 6b 20 6c 69 |hat any blank li| 00001660 6e 65 73 20 69 6e 20 79 6f 75 72 20 74 65 78 74 |nes in your text| 00001670 0d 66 69 6c 65 20 63 6f 6e 74 61 69 6e 20 61 20 |.file contain a | 00001680 73 69 6e 67 6c 65 20 73 70 61 63 65 20 28 6f 72 |single space (or| 00001690 20 6d 6f 72 65 2c 20 62 75 74 20 74 68 61 74 27 | more, but that'| 000016a0 73 20 77 61 73 74 65 66 75 6c 29 2e 0d 0d 4f 6e |s wasteful)...On| 000016b0 65 20 76 65 72 79 20 69 6d 70 6f 72 74 61 6e 74 |e very important| 000016c0 20 6c 69 6d 69 74 61 74 69 6f 6e 20 6f 66 20 74 | limitation of t| 000016d0 68 69 73 20 6d 65 74 68 6f 64 20 6f 66 20 77 72 |his method of wr| 000016e0 69 74 69 6e 67 20 61 6e 64 0d 65 64 69 74 69 6e |iting and.editin| 000016f0 67 20 42 41 53 49 43 20 69 73 20 74 68 61 74 20 |g BASIC is that | 00001700 79 6f 75 20 63 61 6e 20 6e 6f 20 6c 6f 6e 67 65 |you can no longe| 00001710 72 20 75 73 65 20 47 4f 54 4f 20 6f 72 20 47 4f |r use GOTO or GO| 00001720 53 55 42 20 69 6e 0d 79 6f 75 72 20 70 72 6f 67 |SUB in.your prog| 00001730 72 61 6d 73 21 20 20 42 75 74 20 79 6f 75 20 77 |rams! But you w| 00001740 6f 75 6c 64 6e 27 74 20 77 61 6e 74 20 74 6f 20 |ouldn't want to | 00001750 61 6e 79 77 61 79 20 77 6f 75 6c 64 20 79 6f 75 |anyway would you| 00001760 3f 0d 0d 41 64 64 69 6e 67 20 68 65 61 64 65 72 |?..Adding header| 00001770 20 61 6e 64 20 66 6f 6f 74 65 72 20 61 6e 64 20 | and footer and | 00001780 66 6f 72 6d 61 74 74 69 6e 67 20 69 6e 66 6f 72 |formatting infor| 00001790 6d 61 74 69 6f 6e 2c 20 6f 72 0d 6d 61 72 67 69 |mation, or.margi| 000017a0 6e 73 2c 20 6f 72 20 75 73 69 6e 67 20 54 41 42 |ns, or using TAB| 000017b0 73 20 6f 72 20 6d 61 72 6b 65 72 73 2c 20 77 69 |s or markers, wi| 000017c0 6c 6c 20 6d 65 61 6e 20 74 68 61 74 20 79 6f 75 |ll mean that you| 000017d0 72 20 74 65 78 74 0d 66 69 6c 65 20 77 69 6c 6c |r text.file will| 000017e0 20 63 6f 6e 74 61 69 6e 20 65 78 74 72 61 20 63 | contain extra c| 000017f0 6f 6e 74 72 6f 6c 20 63 68 61 72 61 63 74 65 72 |ontrol character| 00001800 73 2e 20 20 41 6c 74 68 6f 75 67 68 20 79 6f 75 |s. Although you| 00001810 0d 63 61 6e 20 53 50 4f 4f 4c 20 74 65 78 74 20 |.can SPOOL text | 00001820 6f 75 74 20 66 72 6f 6d 20 79 6f 75 72 20 77 6f |out from your wo| 00001830 72 64 20 70 72 6f 63 65 73 73 6f 72 20 74 6f 20 |rd processor to | 00001840 70 72 6f 64 75 63 65 20 61 0d 74 65 78 74 20 66 |produce a.text f| 00001850 69 6c 65 2c 20 49 20 77 6f 72 6b 20 62 79 20 69 |ile, I work by i| 00001860 67 6e 6f 72 69 6e 67 20 61 6c 6c 20 74 68 65 73 |gnoring all thes| 00001870 65 20 66 61 63 69 6c 69 74 69 65 73 20 69 6e 20 |e facilities in | 00001880 56 49 45 57 0d 61 6e 64 20 61 69 6d 69 6e 67 20 |VIEW.and aiming | 00001890 74 6f 20 70 72 6f 64 75 63 65 20 61 20 74 65 78 |to produce a tex| 000018a0 74 20 66 69 6c 65 20 6d 6f 72 65 20 73 69 6d 70 |t file more simp| 000018b0 6c 79 2e 20 20 49 66 20 79 6f 75 20 64 6f 0d 6e |ly. If you do.n| 000018c0 6f 74 20 75 73 65 20 61 6e 79 20 73 74 6f 72 65 |ot use any store| 000018d0 64 20 63 6f 6d 6d 61 6e 64 73 20 6f 72 20 6d 61 |d commands or ma| 000018e0 72 6b 65 72 73 20 6f 72 20 54 41 42 73 20 6f 72 |rkers or TABs or| 000018f0 20 6e 65 77 20 72 75 6c 65 72 73 0d 74 68 65 6e | new rulers.then| 00001900 20 61 6e 79 20 74 65 78 74 20 66 69 6c 65 20 53 | any text file S| 00001910 41 56 45 44 20 66 72 6f 6d 20 56 49 45 57 20 77 |AVED from VIEW w| 00001920 69 6c 6c 20 6f 6e 6c 79 20 63 6f 6e 74 61 69 6e |ill only contain| 00001930 20 41 53 43 49 49 0d 74 65 78 74 20 63 68 61 72 | ASCII.text char| 00001940 61 63 74 65 72 73 2c 20 61 6e 64 20 73 6f 20 69 |acters, and so i| 00001950 73 20 73 75 69 74 61 62 6c 65 20 66 6f 72 20 74 |s suitable for t| 00001960 68 65 20 6e 65 78 74 20 73 74 61 67 65 20 6f 66 |he next stage of| 00001970 0d 74 68 65 20 6f 70 65 72 61 74 69 6f 6e 2e 0d |.the operation..| 00001980 0d 4f 6e 63 65 20 79 6f 75 20 68 61 76 65 20 65 |.Once you have e| 00001990 64 69 74 65 64 20 79 6f 75 72 20 73 6f 75 72 63 |dited your sourc| 000019a0 65 2c 20 68 6f 77 20 64 6f 20 79 6f 75 20 67 65 |e, how do you ge| 000019b0 74 20 69 74 20 62 61 63 6b 0d 69 6e 74 6f 20 74 |t it back.into t| 000019c0 68 65 20 6d 61 63 68 69 6e 65 20 72 65 61 64 79 |he machine ready| 000019d0 20 74 6f 20 63 6f 6d 70 69 6c 65 3f 20 20 54 68 | to compile? Th| 000019e0 69 73 20 74 61 6b 65 73 20 74 77 6f 20 73 74 61 |is takes two sta| 000019f0 67 65 73 2e 0d 0d 4c 65 74 27 73 20 61 73 73 75 |ges...Let's assu| 00001a00 6d 65 20 74 68 61 74 20 79 6f 75 72 20 73 6f 75 |me that your sou| 00001a10 72 63 65 20 66 69 6c 65 2c 20 69 6e 20 6d 65 6d |rce file, in mem| 00001a20 6f 72 79 20 69 6e 20 56 49 45 57 2c 20 68 61 73 |ory in VIEW, has| 00001a30 0d 6e 6f 20 73 74 6f 72 65 64 20 63 6f 6d 6d 61 |.no stored comma| 00001a40 6e 64 73 2c 20 72 75 6c 65 72 73 2c 20 6d 61 72 |nds, rulers, mar| 00001a50 6b 65 72 73 20 6f 72 20 54 41 42 53 20 61 6e 64 |kers or TABS and| 00001a60 20 73 6f 20 73 69 6d 70 6c 79 0d 73 61 79 69 6e | so simply.sayin| 00001a70 67 20 53 41 56 45 20 3c 66 69 6c 65 6e 61 6d 65 |g SAVE <filename| 00001a80 3e 20 77 69 6c 6c 20 73 61 76 65 20 61 20 74 65 |> will save a te| 00001a90 78 74 20 66 69 6c 65 2e 20 20 49 20 68 61 76 65 |xt file. I have| 00001aa0 20 61 0d 73 6d 61 6c 6c 20 73 69 6c 69 63 6f 6e | a.small silicon| 00001ab0 20 64 69 73 63 20 73 79 73 74 65 6d 20 69 6e 20 | disc system in | 00001ac0 6d 79 20 6d 69 63 72 6f 20 28 42 45 45 42 55 47 |my micro (BEEBUG| 00001ad0 27 73 20 52 4f 4d 49 54 29 20 77 68 69 63 68 0d |'s ROMIT) which.| 00001ae0 61 6c 6c 6f 77 73 20 6d 65 20 74 6f 20 75 73 65 |allows me to use| 00001af0 20 73 69 64 65 77 61 79 73 20 52 41 4d 20 74 6f | sideways RAM to| 00001b00 20 73 61 76 65 20 66 69 6c 65 73 2e 20 20 54 68 | save files. Th| 00001b10 69 73 20 73 70 65 65 64 73 20 75 70 0d 74 68 69 |is speeds up.thi| 00001b20 73 20 70 72 6f 63 65 73 73 20 61 6e 64 20 63 75 |s process and cu| 00001b30 74 73 20 64 6f 77 6e 20 6f 6e 20 64 69 73 63 20 |ts down on disc | 00001b40 75 73 65 2c 20 62 75 74 20 79 6f 75 20 63 61 6e |use, but you can| 00001b50 20 6a 75 73 74 20 61 73 0d 65 61 73 69 6c 79 20 | just as.easily | 00001b60 75 73 65 20 64 69 73 63 20 66 6f 72 20 61 6c 6c |use disc for all| 00001b70 20 74 68 65 73 65 20 73 74 61 67 65 73 2e 0d 0d | these stages...| 00001b80 57 68 65 6e 20 74 68 65 20 66 69 6c 65 20 3c 66 |When the file <f| 00001b90 69 6c 65 6e 61 6d 65 3e 20 69 73 20 73 61 76 65 |ilename> is save| 00001ba0 64 20 79 6f 75 20 65 6e 74 65 72 20 2a 45 58 45 |d you enter *EXE| 00001bb0 43 20 3c 66 69 6c 65 6e 61 6d 65 3e 0d 77 68 69 |C <filename>.whi| 00001bc0 63 68 20 74 61 6b 65 73 20 65 76 65 72 79 20 63 |ch takes every c| 00001bd0 68 61 72 61 63 74 65 72 20 69 6e 20 74 68 65 20 |haracter in the | 00001be0 66 69 6c 65 20 61 6e 64 20 74 72 65 61 74 73 20 |file and treats | 00001bf0 69 74 20 6a 75 73 74 0d 61 73 20 69 66 20 69 74 |it just.as if it| 00001c00 20 68 61 64 20 62 65 65 6e 20 74 79 70 65 64 20 | had been typed | 00001c10 69 6e 20 61 74 20 74 68 65 20 6b 65 79 62 6f 61 |in at the keyboa| 00001c20 72 64 2e 20 20 54 68 65 72 65 66 6f 72 65 20 74 |rd. Therefore t| 00001c30 68 65 0d 66 69 72 73 74 20 6c 69 6e 65 2c 20 2a |he.first line, *| 00001c40 42 41 53 49 43 2c 20 73 65 6c 65 63 74 73 20 74 |BASIC, selects t| 00001c50 68 65 20 6c 61 6e 67 75 61 67 65 20 61 6e 64 20 |he language and | 00001c60 74 68 65 20 73 65 63 6f 6e 64 2c 0d 41 55 54 4f |the second,.AUTO| 00001c70 2c 20 73 74 61 72 74 73 20 74 68 65 20 61 75 74 |, starts the aut| 00001c80 6f 6d 61 74 69 63 20 6c 69 6e 65 20 6e 75 6d 62 |omatic line numb| 00001c90 65 72 69 6e 67 2e 20 20 59 6f 75 20 77 69 6c 6c |ering. You will| 00001ca0 20 73 65 65 20 74 68 65 0d 70 72 6f 67 72 61 6d | see the.program| 00001cb0 20 67 6f 69 6e 67 20 69 6e 20 77 69 74 68 20 6c | going in with l| 00001cc0 69 6e 65 20 6e 75 6d 62 65 72 73 20 6e 6f 77 20 |ine numbers now | 00001cd0 61 64 64 65 64 2e 20 20 41 74 20 74 68 65 20 65 |added. At the e| 00001ce0 6e 64 20 6f 66 0d 74 68 65 20 66 69 6c 65 20 74 |nd of.the file t| 00001cf0 68 65 20 6d 69 63 72 6f 20 77 69 6c 6c 20 77 61 |he micro will wa| 00001d00 69 74 2c 20 73 68 6f 77 69 6e 67 20 74 68 65 20 |it, showing the | 00001d10 6e 65 78 74 20 6c 69 6e 65 20 6e 75 6d 62 65 72 |next line number| 00001d20 2e 20 0d 59 6f 75 20 70 72 65 73 73 20 45 53 43 |. .You press ESC| 00001d30 41 50 45 20 74 6f 20 66 69 6e 69 73 68 20 74 68 |APE to finish th| 00001d40 65 20 70 72 6f 63 65 73 73 2e 20 20 59 6f 75 72 |e process. Your| 00001d50 20 42 41 53 49 43 20 70 72 6f 67 72 61 6d 0d 69 | BASIC program.i| 00001d60 73 20 6e 6f 77 20 69 6e 20 6d 65 6d 6f 72 79 20 |s now in memory | 00001d70 61 6e 64 20 72 65 61 64 79 20 74 6f 20 52 55 4e |and ready to RUN| 00001d80 2e 0d 0d 41 73 20 61 6e 20 65 78 61 6d 70 6c 65 |...As an example| 00001d90 20 49 20 68 61 76 65 20 70 72 6f 76 69 64 65 64 | I have provided| 00001da0 20 61 20 73 68 6f 72 74 20 70 69 65 63 65 20 6f | a short piece o| 00001db0 66 20 73 6f 75 72 63 65 20 63 6f 64 65 0d 69 6e |f source code.in| 00001dc0 20 74 65 78 74 20 66 6f 72 6d 61 74 20 77 68 69 | text format whi| 00001dd0 63 68 20 79 6f 75 20 63 61 6e 20 65 69 74 68 65 |ch you can eithe| 00001de0 72 20 6c 6f 61 64 20 69 6e 74 6f 20 61 20 77 6f |r load into a wo| 00001df0 72 64 0d 70 72 6f 63 65 73 73 6f 72 20 6f 72 20 |rd.processor or | 00001e00 45 58 45 43 20 69 6e 74 6f 20 6d 65 6d 6f 72 79 |EXEC into memory| 00001e10 20 72 65 61 64 79 20 74 6f 20 62 65 20 72 75 6e | ready to be run| 00001e20 2e 20 20 54 68 65 20 70 72 6f 67 72 61 6d 0d 42 |. The program.B| 00001e30 2f 6f 73 62 32 36 20 69 73 20 61 20 73 69 6d 70 |/osb26 is a simp| 00001e40 6c 65 20 52 4f 4d 20 75 6e 70 6c 75 67 67 69 6e |le ROM unpluggin| 00001e50 67 20 72 6f 75 74 69 6e 65 20 74 6f 20 72 65 6d |g routine to rem| 00001e60 6f 76 65 20 61 20 52 4f 4d 0d 74 68 61 74 20 69 |ove a ROM.that i| 00001e70 73 20 63 61 75 73 69 6e 67 20 74 72 6f 75 62 6c |s causing troubl| 00001e80 65 2e 20 20 49 20 75 73 65 20 69 74 20 74 6f 20 |e. I use it to | 00001e90 72 65 6d 6f 76 65 20 41 44 46 53 20 77 68 65 6e |remove ADFS when| 00001ea0 20 49 0d 77 61 6e 74 20 74 6f 20 75 73 65 20 74 | I.want to use t| 00001eb0 68 65 20 41 4d 58 20 41 72 74 20 75 74 69 6c 69 |he AMX Art utili| 00001ec0 74 69 65 73 20 6f 72 20 74 68 65 20 41 4d 50 4c |ties or the AMPL| 00001ed0 45 20 6d 75 73 69 63 0d 6c 61 6e 67 75 61 67 65 |E music.language| 00001ee0 20 61 73 20 74 68 65 72 65 20 61 72 65 20 63 6c | as there are cl| 00001ef0 61 73 68 65 73 20 6f 76 65 72 20 77 6f 72 6b 73 |ashes over works| 00001f00 70 61 63 65 20 61 6e 64 20 6d 65 6d 6f 72 79 2c |pace and memory,| 00001f10 0d 73 69 6e 63 65 20 41 44 46 53 20 69 6e 20 61 |.since ADFS in a| 00001f20 20 42 20 72 61 69 73 65 73 20 50 41 47 45 20 75 | B raises PAGE u| 00001f30 70 20 74 6f 20 61 72 6f 75 6e 64 20 26 32 30 30 |p to around &200| 00001f40 30 2e 0d 0d 54 68 65 20 70 72 6f 67 72 61 6d 20 |0...The program | 00001f50 77 6f 72 6b 73 20 62 79 20 75 73 69 6e 67 20 4f |works by using O| 00001f60 53 42 59 54 45 73 20 32 34 37 20 74 6f 20 32 34 |SBYTEs 247 to 24| 00001f70 39 20 74 6f 20 77 72 69 74 65 20 61 20 4a 4d 50 |9 to write a JMP| 00001f80 0d 69 6e 73 74 72 75 63 74 69 6f 6e 20 28 73 74 |.instruction (st| 00001f90 61 72 74 69 6e 67 20 77 69 74 68 20 26 34 43 20 |arting with &4C | 00001fa0 77 68 69 63 68 20 69 73 20 74 68 65 20 6f 70 20 |which is the op | 00001fb0 63 6f 64 65 20 66 6f 72 20 4a 4d 50 29 0d 69 6e |code for JMP).in| 00001fc0 74 6f 20 61 20 73 65 63 74 69 6f 6e 20 6f 66 20 |to a section of | 00001fd0 6d 65 6d 6f 72 79 20 73 74 61 72 74 69 6e 67 20 |memory starting | 00001fe0 61 74 20 26 32 38 37 2e 20 20 54 68 69 73 20 6d |at &287. This m| 00001ff0 65 6d 6f 72 79 20 69 73 0d 74 65 73 74 65 64 20 |emory is.tested | 00002000 62 79 20 74 68 65 20 4f 53 20 6f 6e 20 65 76 65 |by the OS on eve| 00002010 72 79 20 72 65 73 65 74 20 28 42 52 45 41 4b 29 |ry reset (BREAK)| 00002020 20 61 6e 64 20 69 66 20 74 68 65 72 65 20 69 73 | and if there is| 00002030 20 61 0d 4a 4d 50 20 69 6e 73 74 72 75 63 74 69 | a.JMP instructi| 00002040 6f 6e 20 61 74 20 26 32 38 37 20 74 68 65 20 4f |on at &287 the O| 00002050 53 20 77 69 6c 6c 20 6f 62 65 79 20 74 68 65 20 |S will obey the | 00002060 6a 75 6d 70 20 65 61 63 68 20 74 69 6d 65 0d 74 |jump each time.t| 00002070 68 65 20 72 65 73 65 74 20 6f 63 63 75 72 73 2e |he reset occurs.| 00002080 20 20 49 6e 20 74 68 69 73 20 77 61 79 20 79 6f | In this way yo| 00002090 75 20 63 61 6e 20 61 64 64 20 79 6f 75 72 20 6f |u can add your o| 000020a0 77 6e 20 63 6f 64 65 20 74 6f 0d 74 68 65 20 72 |wn code to.the r| 000020b0 65 73 65 74 20 70 72 6f 63 65 64 75 72 65 2e 20 |eset procedure. | 000020c0 20 59 6f 75 20 6d 69 67 68 74 20 77 61 6e 74 20 | You might want | 000020d0 74 6f 20 70 72 69 6e 74 20 79 6f 75 72 20 6f 77 |to print your ow| 000020e0 6e 0d 6d 65 73 73 61 67 65 20 69 6e 20 74 68 65 |n.message in the| 000020f0 20 62 61 6e 6e 65 72 20 28 74 68 69 73 20 69 73 | banner (this is| 00002100 20 74 68 65 20 63 6f 72 72 65 63 74 20 77 61 79 | the correct way| 00002110 20 6f 66 20 64 6f 69 6e 67 0d 74 68 69 73 2c 20 | of doing.this, | 00002120 72 61 74 68 65 72 20 74 68 61 6e 20 69 6e 74 65 |rather than inte| 00002130 72 63 65 70 74 69 6e 67 20 73 65 72 76 69 63 65 |rcepting service| 00002140 20 63 61 6c 6c 20 31 20 6f 72 20 33 29 20 6f 72 | call 1 or 3) or| 00002150 20 74 68 65 72 65 0d 6d 61 79 20 62 65 20 61 20 | there.may be a | 00002160 70 69 65 63 65 20 6f 66 20 63 6f 64 65 20 74 68 |piece of code th| 00002170 61 74 20 68 61 73 20 74 6f 20 70 72 65 63 65 64 |at has to preced| 00002180 65 20 74 68 65 20 52 4f 4d 20 73 65 72 76 69 63 |e the ROM servic| 00002190 65 0d 63 61 6c 6c 73 20 74 6f 20 62 65 20 65 66 |e.calls to be ef| 000021a0 66 65 63 74 69 76 65 2e 0d 0d 54 68 61 74 20 6c |fective...That l| 000021b0 61 73 74 20 72 65 61 73 6f 6e 20 69 73 20 77 68 |ast reason is wh| 000021c0 79 20 74 68 69 73 20 63 6f 64 65 20 69 73 20 75 |y this code is u| 000021d0 73 65 64 2e 20 20 54 68 65 20 4f 53 20 63 6f 70 |sed. The OS cop| 000021e0 69 65 73 0d 74 68 65 20 52 4f 4d 20 69 6e 66 6f |ies.the ROM info| 000021f0 72 6d 61 74 69 6f 6e 20 62 79 74 65 73 20 6f 66 |rmation bytes of| 00002200 20 61 6c 6c 20 74 68 65 20 72 65 73 69 64 65 6e | all the residen| 00002210 74 20 73 69 64 65 77 61 79 73 20 52 4f 4d 73 0d |t sideways ROMs.| 00002220 69 6e 74 6f 20 61 20 52 4f 4d 20 69 6e 66 6f 72 |into a ROM infor| 00002230 6d 61 74 69 6f 6e 20 74 61 62 6c 65 20 69 6e 20 |mation table in | 00002240 52 41 4d 20 64 75 72 69 6e 67 20 74 68 65 20 72 |RAM during the r| 00002250 65 73 65 74 0d 69 6e 69 74 69 61 6c 69 73 61 74 |eset.initialisat| 00002260 69 6f 6e 2e 20 20 54 68 65 20 4f 53 20 6b 6e 6f |ion. The OS kno| 00002270 77 73 20 77 68 65 74 68 65 72 20 61 20 76 61 6c |ws whether a val| 00002280 69 64 20 52 4f 4d 20 69 73 20 69 6e 20 61 0d 70 |id ROM is in a.p| 00002290 61 72 74 69 63 75 6c 61 72 20 73 6f 63 6b 65 74 |articular socket| 000022a0 20 62 79 20 63 68 65 63 6b 69 6e 67 20 74 68 65 | by checking the| 000022b0 20 72 65 6c 65 76 61 6e 74 20 62 79 74 65 20 69 | relevant byte i| 000022c0 6e 20 74 68 65 20 52 4f 4d 0d 74 61 62 6c 65 2e |n the ROM.table.| 000022d0 20 20 49 6e 76 61 6c 69 64 20 6f 72 20 61 62 73 | Invalid or abs| 000022e0 65 6e 74 20 52 4f 4d 53 20 68 61 76 65 20 74 68 |ent ROMS have th| 000022f0 65 69 72 20 62 79 74 65 20 73 65 74 20 74 6f 20 |eir byte set to | 00002300 7a 65 72 6f 2e 20 0d 49 66 20 77 65 20 6d 61 6b |zero. .If we mak| 00002310 65 20 6f 6e 65 20 6f 66 20 74 68 65 73 65 20 62 |e one of these b| 00002320 79 74 65 73 20 7a 65 72 6f 20 61 66 74 65 72 20 |ytes zero after | 00002330 74 68 65 20 4f 53 20 68 61 73 20 73 65 74 20 69 |the OS has set i| 00002340 74 0d 6f 6e 20 69 6e 69 74 69 61 6c 69 73 61 74 |t.on initialisat| 00002350 69 6f 6e 2c 20 62 75 74 20 62 65 66 6f 72 65 20 |ion, but before | 00002360 69 74 20 73 65 6e 64 73 20 6f 75 74 20 74 68 65 |it sends out the| 00002370 20 73 65 72 76 69 63 65 0d 63 61 6c 6c 73 2c 20 | service.calls, | 00002380 74 68 65 6e 20 77 65 20 68 61 76 65 20 65 66 66 |then we have eff| 00002390 65 63 74 69 76 65 6c 79 20 72 65 6d 6f 76 65 64 |ectively removed| 000023a0 20 74 68 65 20 52 4f 4d 20 66 72 6f 6d 20 74 68 | the ROM from th| 000023b0 65 0d 4f 53 27 73 20 6b 65 6e 20 61 6e 64 20 74 |e.OS's ken and t| 000023c0 68 65 72 65 66 6f 72 65 20 66 72 6f 6d 20 74 68 |herefore from th| 000023d0 65 20 6d 61 63 68 69 6e 65 20 2e 2e 2e 2e 20 77 |e machine .... w| 000023e0 69 74 68 6f 75 74 20 68 61 76 69 6e 67 0d 74 6f |ithout having.to| 000023f0 20 61 63 74 75 61 6c 6c 79 20 74 6f 75 63 68 20 | actually touch | 00002400 69 74 21 0d 0d 54 68 65 20 6d 6f 73 74 20 6c 69 |it!..The most li| 00002410 6b 65 6c 79 20 72 65 61 73 6f 6e 73 20 66 6f 72 |kely reasons for| 00002420 20 77 61 6e 74 69 6e 67 20 74 6f 20 64 6f 20 74 | wanting to do t| 00002430 68 69 73 20 61 72 65 20 62 65 63 61 75 73 65 0d |his are because.| 00002440 6f 66 20 61 20 63 6c 61 73 68 20 6f 66 20 2a 63 |of a clash of *c| 00002450 6f 6d 6d 61 6e 64 20 6e 61 6d 65 20 77 69 74 68 |ommand name with| 00002460 20 61 6e 6f 74 68 65 72 20 52 4f 4d 20 6f 72 20 | another ROM or | 00002470 61 20 70 72 6f 62 6c 65 6d 0d 77 69 74 68 20 74 |a problem.with t| 00002480 68 65 20 77 6f 72 6b 73 70 61 63 65 20 74 68 61 |he workspace tha| 00002490 74 20 74 68 65 20 52 4f 4d 20 67 72 61 62 73 20 |t the ROM grabs | 000024a0 66 6f 72 20 69 74 73 65 6c 66 2e 0d 0d 54 68 65 |for itself...The| 000024b0 20 42 52 45 41 4b 20 69 6e 74 65 72 63 65 70 74 | BREAK intercept| 000024c0 20 63 6f 64 65 20 70 6f 69 6e 74 65 64 20 74 6f | code pointed to| 000024d0 20 62 79 20 74 68 65 20 4a 55 4d 50 2c 20 73 65 | by the JUMP, se| 000024e0 74 20 75 73 69 6e 67 0d 4f 53 42 59 54 45 73 20 |t using.OSBYTEs | 000024f0 32 34 37 2d 39 2c 20 69 73 20 65 78 65 63 75 74 |247-9, is execut| 00002500 65 64 20 74 77 69 63 65 2e 20 20 46 69 72 73 74 |ed twice. First| 00002510 6c 79 20 62 65 66 6f 72 65 20 74 68 65 20 74 75 |ly before the tu| 00002520 62 65 0d 69 6e 69 74 69 61 6c 69 73 61 74 69 6f |be.initialisatio| 00002530 6e 20 61 6e 64 20 62 61 6e 6e 65 72 20 6d 65 73 |n and banner mes| 00002540 73 61 67 65 20 77 69 74 68 20 43 41 52 52 59 20 |sage with CARRY | 00002550 63 6c 65 61 72 2c 20 61 6e 64 0d 74 68 65 6e 20 |clear, and.then | 00002560 61 66 74 65 72 20 74 68 65 20 74 75 62 65 20 69 |after the tube i| 00002570 6e 69 74 69 61 6c 69 73 61 74 69 6f 6e 20 61 6e |nitialisation an| 00002580 64 20 62 61 6e 6e 65 72 20 77 69 74 68 20 43 41 |d banner with CA| 00002590 52 52 59 0d 73 65 74 2e 20 20 54 6f 20 73 75 63 |RRY.set. To suc| 000025a0 63 65 73 73 66 75 6c 6c 79 20 72 65 6d 6f 76 65 |cessfully remove| 000025b0 20 74 68 65 20 52 4f 4d 20 77 65 20 70 75 74 20 | the ROM we put | 000025c0 74 68 65 20 7a 65 72 6f 20 69 6e 20 74 68 65 0d |the zero in the.| 000025d0 52 4f 4d 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 |ROM information | 000025e0 74 61 62 6c 65 20 77 68 65 6e 20 74 68 65 20 43 |table when the C| 000025f0 41 52 52 59 20 69 73 20 63 6c 65 61 72 2e 20 20 |ARRY is clear. | 00002600 54 68 69 73 20 77 69 6c 6c 0d 6d 65 61 6e 20 74 |This will.mean t| 00002610 68 61 74 20 74 68 65 20 7a 65 72 6f 20 69 73 20 |hat the zero is | 00002620 69 6e 20 70 6c 61 63 65 20 62 65 66 6f 72 65 20 |in place before | 00002630 74 68 65 20 4f 53 20 73 65 6e 64 73 20 6f 75 74 |the OS sends out| 00002640 20 74 68 65 0d 52 4f 4d 20 73 65 72 76 69 63 65 | the.ROM service| 00002650 20 63 61 6c 6c 73 20 61 6e 64 20 73 6f 20 74 68 | calls and so th| 00002660 65 20 52 4f 4d 20 77 69 6c 6c 20 70 6c 61 79 20 |e ROM will play | 00002670 6e 6f 20 70 61 72 74 20 69 6e 0d 67 72 61 62 62 |no part in.grabb| 00002680 69 6e 67 20 77 6f 72 6b 73 70 61 63 65 2e 20 20 |ing workspace. | 00002690 41 6c 74 68 6f 75 67 68 20 79 6f 75 20 63 61 6e |Although you can| 000026a0 20 72 65 6d 6f 76 65 20 74 68 65 20 52 4f 4d 20 | remove the ROM | 000026b0 62 79 0d 65 78 65 63 75 74 69 6e 67 20 74 68 65 |by.executing the| 000026c0 20 69 6e 74 65 72 63 65 70 74 20 63 6f 64 65 20 | intercept code | 000026d0 77 68 65 6e 20 43 41 52 52 59 20 69 73 20 73 65 |when CARRY is se| 000026e0 74 20 79 6f 75 20 77 69 6c 6c 20 66 69 6e 64 0d |t you will find.| 000026f0 74 68 61 74 20 74 68 65 20 6d 65 6d 6f 72 79 20 |that the memory | 00002700 61 6c 6c 6f 63 61 74 69 6f 6e 20 68 61 73 20 61 |allocation has a| 00002710 6c 72 65 61 64 79 20 74 61 6b 65 6e 20 70 6c 61 |lready taken pla| 00002720 63 65 20 61 6e 64 20 74 68 65 0d 4f 53 20 68 69 |ce and the.OS hi| 00002730 67 68 20 77 61 74 65 72 20 6d 61 72 6b 20 28 50 |gh water mark (P| 00002740 41 47 45 20 69 6e 20 42 41 53 49 43 29 20 69 73 |AGE in BASIC) is| 00002750 20 73 65 74 20 61 73 20 69 66 20 74 68 65 20 52 | set as if the R| 00002760 4f 4d 20 77 65 72 65 0d 73 74 69 6c 6c 20 61 63 |OM were.still ac| 00002770 74 69 76 65 2e 0d 0d 4f 6e 63 65 20 74 68 69 73 |tive...Once this| 00002780 20 63 6f 64 65 20 69 73 20 72 75 6e 20 28 69 74 | code is run (it| 00002790 20 61 73 73 65 6d 62 6c 65 73 20 61 74 20 26 33 | assembles at &3| 000027a0 38 30 20 69 6e 20 74 68 65 20 49 2f 4f 0d 70 72 |80 in the I/O.pr| 000027b0 6f 63 65 73 73 6f 72 20 6f 6e 6c 79 29 20 79 6f |ocessor only) yo| 000027c0 75 20 70 72 65 73 73 20 42 52 45 41 4b 20 61 6e |u press BREAK an| 000027d0 64 20 66 72 6f 6d 20 74 68 65 6e 20 6f 6e 20 74 |d from then on t| 000027e0 68 65 20 52 4f 4d 20 69 73 0d 61 62 73 65 6e 74 |he ROM is.absent| 000027f0 2e 20 20 49 66 20 79 6f 75 20 61 72 65 20 6e 6f |. If you are no| 00002800 74 20 75 73 69 6e 67 20 63 61 73 73 65 74 74 65 |t using cassette| 00002810 73 20 74 68 65 6e 20 74 68 65 20 62 6c 6f 63 6b |s then the block| 00002820 20 66 72 6f 6d 0d 26 33 38 30 20 74 6f 20 26 33 | from.&380 to &3| 00002830 44 46 20 69 73 20 61 76 61 69 6c 61 62 6c 65 20 |DF is available | 00002840 74 6f 20 79 6f 75 20 66 6f 72 20 6d 61 63 68 69 |to you for machi| 00002850 6e 65 20 63 6f 64 65 2e 0d 0d 52 65 2d 43 41 4c |ne code...Re-CAL| 00002860 4c 69 6e 67 20 74 68 65 20 63 6f 64 65 20 61 74 |Ling the code at| 00002870 20 26 33 38 30 20 77 69 6c 6c 20 63 72 61 73 68 | &380 will crash| 00002880 20 74 68 65 20 6d 61 63 68 69 6e 65 20 61 6e 64 | the machine and| 00002890 20 6f 6e 6c 79 0d 61 20 70 6f 77 65 72 20 64 6f | only.a power do| 000028a0 77 6e 20 77 69 6c 6c 20 72 65 73 63 75 65 20 74 |wn will rescue t| 000028b0 68 65 20 73 69 74 75 61 74 69 6f 6e 2e 20 20 41 |he situation. A| 000028c0 6c 73 6f 20 61 73 73 65 6d 62 6c 69 6e 67 20 61 |lso assembling a| 000028d0 6e 79 0d 6f 74 68 65 72 20 63 6f 64 65 20 61 74 |ny.other code at| 000028e0 20 26 33 38 30 20 77 69 6c 6c 20 63 72 61 73 68 | &380 will crash| 000028f0 20 74 68 65 20 6d 61 63 68 69 6e 65 2e 20 20 59 | the machine. Y| 00002900 6f 75 20 6e 65 65 64 20 74 6f 20 66 69 6e 64 0d |ou need to find.| 00002910 69 6e 20 77 68 69 63 68 20 73 6f 63 6b 65 74 20 |in which socket | 00002920 79 6f 75 72 20 65 72 72 61 6e 74 20 52 4f 4d 20 |your errant ROM | 00002930 6c 69 76 65 73 20 28 70 6f 73 73 69 62 6c 79 20 |lives (possibly | 00002940 75 73 69 6e 67 20 2a 52 4f 4d 53 0d 6f 72 20 65 |using *ROMS.or e| 00002950 76 65 6e 20 2a 52 4f 4d 4c 49 53 54 20 66 72 6f |ven *ROMLIST fro| 00002960 6d 20 6d 6f 64 75 6c 65 20 39 29 20 61 6e 64 20 |m module 9) and | 00002970 73 65 74 20 74 68 65 20 76 61 72 69 61 62 6c 65 |set the variable| 00002980 0d 27 72 6f 6d 5f 6c 69 73 74 27 20 61 63 63 6f |.'rom_list' acco| 00002990 72 64 69 6e 67 6c 79 2e 20 20 4e 6f 74 65 20 74 |rdingly. Note t| 000029a0 68 61 74 20 74 68 69 73 20 70 72 6f 67 72 61 6d |hat this program| 000029b0 20 63 61 6e 20 6f 6e 6c 79 0d 75 6e 70 6c 75 67 | can only.unplug| 000029c0 20 6f 6e 65 20 52 4f 4d 20 61 74 20 61 20 74 69 | one ROM at a ti| 000029d0 6d 65 2e 20 20 59 6f 75 20 63 6f 75 6c 64 20 6d |me. You could m| 000029e0 6f 64 69 66 79 20 69 74 20 74 6f 20 75 6e 70 6c |odify it to unpl| 000029f0 75 67 0d 6d 6f 72 65 20 62 75 74 20 62 65 20 63 |ug.more but be c| 00002a00 61 72 65 66 75 6c 2c 20 69 74 20 69 73 20 76 65 |areful, it is ve| 00002a10 72 79 20 65 61 73 79 20 74 6f 20 63 72 61 73 68 |ry easy to crash| 00002a20 20 74 68 65 20 6d 61 63 68 69 6e 65 0d 77 68 65 | the machine.whe| 00002a30 6e 20 69 6e 74 65 72 63 65 70 74 69 6e 67 20 42 |n intercepting B| 00002a40 52 45 41 4b 21 0d 0d 59 6f 75 20 63 61 6e 20 64 |REAK!..You can d| 00002a50 6f 20 61 20 2a 46 58 32 34 37 2c 30 20 74 6f 20 |o a *FX247,0 to | 00002a60 62 72 69 6e 67 20 74 68 65 20 52 4f 4d 20 62 61 |bring the ROM ba| 00002a70 63 6b 20 61 6e 64 20 61 20 2a 46 58 32 34 37 2c |ck and a *FX247,| 00002a80 37 36 0d 74 6f 20 72 65 6d 6f 76 65 20 69 74 20 |76.to remove it | 00002a90 61 67 61 69 6e 20 2d 20 37 36 20 69 73 20 26 34 |again - 76 is &4| 00002aa0 43 20 77 68 69 63 68 20 69 73 20 36 35 30 32 2d |C which is 6502-| 00002ab0 73 70 65 61 6b 20 66 6f 72 20 4a 4d 50 2e 20 0d |speak for JMP. .| 00002ac0 41 20 63 6f 6d 70 6c 65 74 65 20 63 75 72 65 20 |A complete cure | 00002ad0 66 6f 72 20 74 68 69 73 20 69 6e 74 65 72 63 65 |for this interce| 00002ae0 70 74 20 69 73 20 62 65 73 74 20 61 63 68 69 65 |pt is best achie| 00002af0 76 65 64 20 62 79 0d 73 77 69 74 63 68 69 6e 67 |ved by.switching| 00002b00 20 6f 66 66 2e 20 20 59 6f 75 72 20 61 64 76 61 | off. Your adva| 00002b10 6e 63 65 64 20 67 75 69 64 65 20 77 69 6c 6c 20 |nced guide will | 00002b20 74 65 6c 6c 20 79 6f 75 20 6d 6f 72 65 20 61 62 |tell you more ab| 00002b30 6f 75 74 0d 4f 53 42 59 54 45 73 20 32 34 37 2d |out.OSBYTEs 247-| 00002b40 39 2e 0d 0d 0d 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e |9...............| 00002b50 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e |................| * 00002b80 2e 0d 0d 0d 53 6f 2c 20 74 68 61 74 27 73 20 69 |....So, that's i| 00002b90 74 20 66 6f 72 20 4f 53 62 69 74 73 2e 20 20 49 |t for OSbits. I| 00002ba0 20 68 6f 70 65 20 79 6f 75 20 68 61 76 65 20 65 | hope you have e| 00002bb0 6e 6a 6f 79 65 64 20 74 6f 79 69 6e 67 0d 61 72 |njoyed toying.ar| 00002bc0 6f 75 6e 64 20 77 69 74 68 20 74 68 65 20 61 73 |ound with the as| 00002bd0 73 65 6d 62 6c 65 72 20 61 6e 64 20 68 61 76 65 |sembler and have| 00002be0 20 66 6f 75 6e 64 20 73 6f 6d 65 20 6f 66 20 74 | found some of t| 00002bf0 68 65 0d 62 65 6e 65 66 69 74 73 20 61 6e 64 20 |he.benefits and | 00002c00 66 75 6e 20 74 6f 20 62 65 20 68 61 64 20 70 72 |fun to be had pr| 00002c10 6f 67 72 61 6d 6d 69 6e 67 20 79 6f 75 72 20 6d |ogramming your m| 00002c20 61 63 68 69 6e 65 20 69 6e 20 69 74 73 0d 6f 77 |achine in its.ow| 00002c30 6e 20 6c 61 6e 67 75 61 67 65 2e 0d 0d 4d 79 20 |n language...My | 00002c40 74 68 61 6e 6b 73 20 74 6f 20 74 68 6f 73 65 20 |thanks to those | 00002c50 6f 66 20 79 6f 75 20 77 68 6f 20 68 61 76 65 20 |of you who have | 00002c60 63 6f 6d 6d 65 6e 74 65 64 20 6f 6e 20 74 68 65 |commented on the| 00002c70 20 73 65 72 69 65 73 2c 0d 65 73 70 65 63 69 61 | series,.especia| 00002c80 6c 6c 79 20 50 65 74 65 20 56 69 6e 63 65 20 77 |lly Pete Vince w| 00002c90 68 6f 20 68 61 73 20 70 72 6f 76 69 64 65 64 20 |ho has provided | 00002ca0 6d 75 63 68 20 63 6f 6e 73 74 72 75 63 74 69 76 |much constructiv| 00002cb0 65 0d 63 72 69 74 69 63 69 73 6d 20 6f 66 20 6d |e.criticism of m| 00002cc0 79 20 63 6f 6d 6d 75 6e 69 63 61 74 69 76 65 20 |y communicative | 00002cd0 61 62 69 6c 69 74 69 65 73 2e 20 20 41 6c 6c 20 |abilities. All | 00002ce0 49 20 63 61 6e 20 73 61 79 20 69 73 0d 4c 44 41 |I can say is.LDA| 00002cf0 20 23 70 69 6e 74 2c 20 53 54 41 20 50 65 74 65 | #pint, STA Pete| 00002d00 2e 0d 0d 49 66 20 79 6f 75 20 6d 69 73 73 65 64 |...If you missed| 00002d10 20 61 6e 79 20 6d 6f 64 75 6c 65 73 20 6f 66 20 | any modules of | 00002d20 4f 53 62 69 74 73 2c 20 74 68 65 6e 20 77 61 74 |OSbits, then wat| 00002d30 63 68 20 6f 75 74 20 66 6f 72 20 61 0d 72 65 2d |ch out for a.re-| 00002d40 74 72 61 6e 73 6d 69 73 73 69 6f 6e 20 6f 66 20 |transmission of | 00002d50 74 68 65 20 77 68 6f 6c 65 20 73 65 72 69 65 73 |the whole series| 00002d60 20 66 72 6f 6d 20 53 65 70 74 65 6d 62 65 72 2e | from September.| 00002d70 20 20 54 68 65 0d 72 65 2d 74 72 61 6e 73 6d 69 | The.re-transmi| 00002d80 73 73 69 6f 6e 73 20 77 69 6c 6c 20 68 61 76 65 |ssions will have| 00002d90 20 6d 69 6e 6f 72 20 6d 6f 64 69 66 69 63 61 74 | minor modificat| 00002da0 69 6f 6e 73 20 74 6f 20 73 6f 6d 65 20 6f 66 0d |ions to some of.| 00002db0 74 68 65 20 66 69 6c 65 73 20 28 61 20 6b 69 6e |the files (a kin| 00002dc0 64 20 6f 66 20 73 65 63 6f 6e 64 20 65 64 69 74 |d of second edit| 00002dd0 69 6f 6e 29 20 74 61 6b 69 6e 67 20 6e 6f 74 65 |ion) taking note| 00002de0 20 6f 66 20 79 6f 75 72 0d 63 6f 6d 6d 65 6e 74 | of your.comment| 00002df0 73 20 61 6e 64 20 61 6e 79 20 73 65 63 6f 6e 64 |s and any second| 00002e00 20 74 68 6f 75 67 68 74 73 20 49 20 68 61 64 20 | thoughts I had | 00002e10 61 6c 6f 6e 67 20 74 68 65 20 77 61 79 2e 0d 0d |along the way...| 00002e20 55 6e 74 69 6c 20 77 65 20 6d 65 65 74 20 61 67 |Until we meet ag| 00002e30 61 69 6e 20 6f 6e 20 74 68 65 20 64 61 74 61 73 |ain on the datas| 00002e40 74 72 65 61 6d 20 74 68 65 6e 2c 20 74 68 61 6e |tream then, than| 00002e50 6b 73 20 66 6f 72 0d 74 61 6b 69 6e 67 20 74 68 |ks for.taking th| 00002e60 65 20 74 72 6f 75 62 6c 65 20 74 6f 20 64 6f 77 |e trouble to dow| 00002e70 6e 6c 6f 61 64 20 61 6e 64 20 72 65 61 64 2c 20 |nload and read, | 00002e80 61 6e 64 20 68 61 70 70 79 0d 61 73 73 65 6d 62 |and happy.assemb| 00002e90 6c 69 6e 67 2e 0d 0d 0d 41 6e 64 79 20 46 69 6e |ling....Andy Fin| 00002ea0 6e 65 79 0d 4c 6f 6e 64 6f 6e 20 37 20 4a 75 6e |ney.London 7 Jun| 00002eb0 65 20 31 39 38 37 0d |e 1987.| 00002eb7