Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_32.ADF » P/+Code1
P/+Code1
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 » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_32.ADF |
Filename: | P/+Code1 |
Read OK: | ✔ |
File size: | 0A63 bytes |
Load address: | 2B206576 |
Exec address: | 65646F43 |
File contents
FURTHER THOUGHTS ON CODE 5 ~~~~~~~~~~~~~~~~~~~~~~~~~~ by Richard Dimond I was very interested in the comments from Robert Sprowson regarding my coding and this set me thinking on further improvements I had been working on some time ago but had run into some problems. I have now re-written the assembler for this new coding - now CODE6. This gives a much clearer printing but some lines seem to be too short and an extra blank line is added occasionally. The only disadvantage, perhaps, is that it depends a lot on the use of the space. I always put one after a comma and two after a full stop as this gives a clearer printing. For 40 column printing, the routine starts at line 680 and leading spaces are skipped by the loop at line 700. The comparison at line 760 checks for the number of characters printed and, if there are no leading spaces it will remain at the value of 39. The value is increased in line 700 for each space found. Titles and underlines are printed as before. I have added the routine 'chkchr' at line 1080. This sets the carry flag if one of the three special characters is found and this the branches in the test routine for printing the title and the routine for dividing lines. I found that titles were printed with an initial space and I have corrected this by amending line 800. This checks the print position held in address &318 and, if this is zero, skips the printing of a space but a space is printed to separate words. If a line is completed (when the comparison at line 760 is equal) the routine 'next' is called. If one of the three characters is found then a jump is made to 'skipchr' in line 1050. This increases the index to point to the start of the next line. The value of the index Y is added to 'addr' in lines 1010 - 1030 and a jump made to 'line' for printing the next line. This ensures that only 40 of these characters are printed. If none of these characters is found, a check for a space is made and, if found, osnewl (&FFE7) is called at line 1000 and 'addr' increased as above. If a space is not found, ie the word is not completed, the routine 'delete' is called and the characters deleted until a space is found. The index is then pointing to the beginning of the word for printing on the next line as before. I hope this explains the new routine all right. The remainder of the coding is as before except that I have put the coding forthe fonts at the end and also aded the modifications suggested by Robert Sprowson. **************************************************************************
00000000 0d 46 55 52 54 48 45 52 20 54 48 4f 55 47 48 54 |.FURTHER THOUGHT| 00000010 53 20 4f 4e 20 43 4f 44 45 20 35 0d 7e 7e 7e 7e |S ON CODE 5.~~~~| 00000020 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~~~~~~~~~| 00000030 7e 7e 7e 7e 7e 7e 0d 62 79 20 52 69 63 68 61 72 |~~~~~~.by Richar| 00000040 64 20 44 69 6d 6f 6e 64 0d 0d 49 20 77 61 73 1a |d Dimond..I was.| 00000050 20 76 65 72 79 1a 20 69 6e 74 65 72 65 73 74 65 | very. intereste| 00000060 64 1a 20 69 6e 20 74 68 65 20 63 6f 6d 6d 65 6e |d. in the commen| 00000070 74 73 20 66 72 6f 6d 20 52 6f 62 65 72 74 20 53 |ts from Robert S| 00000080 70 72 6f 77 73 6f 6e 20 72 65 67 61 72 64 69 6e |prowson regardin| 00000090 67 20 6d 79 0d 63 6f 64 69 6e 67 20 61 6e 64 20 |g my.coding and | 000000a0 74 68 69 73 20 73 65 74 20 6d 65 20 74 68 69 6e |this set me thin| 000000b0 6b 69 6e 67 20 6f 6e 20 66 75 72 74 68 65 72 20 |king on further | 000000c0 69 6d 70 72 6f 76 65 6d 65 6e 74 73 20 49 20 68 |improvements I h| 000000d0 61 64 20 62 65 65 6e 20 77 6f 72 6b 69 6e 67 0d |ad been working.| 000000e0 6f 6e 20 73 6f 6d 65 20 74 69 6d 65 20 61 67 6f |on some time ago| 000000f0 20 62 75 74 20 68 61 64 20 72 75 6e 20 69 6e 74 | but had run int| 00000100 6f 20 73 6f 6d 65 20 70 72 6f 62 6c 65 6d 73 2e |o some problems.| 00000110 0d 0d 49 20 68 61 76 65 20 6e 6f 77 20 72 65 2d |..I have now re-| 00000120 77 72 69 74 74 65 6e 20 74 68 65 20 61 73 73 65 |written the asse| 00000130 6d 62 6c 65 72 20 66 6f 72 20 74 68 69 73 20 6e |mbler for this n| 00000140 65 77 20 63 6f 64 69 6e 67 20 2d 20 6e 6f 77 20 |ew coding - now | 00000150 43 4f 44 45 36 2e 20 20 54 68 69 73 0d 67 69 76 |CODE6. This.giv| 00000160 65 73 1a 20 61 20 6d 75 63 68 20 63 6c 65 61 72 |es. a much clear| 00000170 65 72 20 70 72 69 6e 74 69 6e 67 20 62 75 74 20 |er printing but | 00000180 73 6f 6d 65 20 6c 69 6e 65 73 20 73 65 65 6d 20 |some lines seem | 00000190 20 74 6f 20 62 65 20 74 6f 6f 20 73 68 6f 72 74 | to be too short| 000001a0 20 61 6e 64 20 61 6e 0d 65 78 74 72 61 20 62 6c | and an.extra bl| 000001b0 61 6e 6b 20 6c 69 6e 65 20 69 73 20 61 64 64 65 |ank line is adde| 000001c0 64 20 6f 63 63 61 73 69 6f 6e 61 6c 6c 79 2e 0d |d occasionally..| 000001d0 0d 54 68 65 20 6f 6e 6c 79 20 64 69 73 61 64 76 |.The only disadv| 000001e0 61 6e 74 61 67 65 2c 20 70 65 72 68 61 70 73 2c |antage, perhaps,| 000001f0 20 69 73 20 74 68 61 74 20 69 74 20 64 65 70 65 | is that it depe| 00000200 6e 64 73 20 61 20 6c 6f 74 20 6f 6e 20 74 68 65 |nds a lot on the| 00000210 20 75 73 65 20 6f 66 20 74 68 65 0d 73 70 61 63 | use of the.spac| 00000220 65 2e 20 20 49 20 61 6c 77 61 79 73 20 70 75 74 |e. I always put| 00000230 20 6f 6e 65 1a 20 61 66 74 65 72 1a 20 61 20 63 | one. after. a c| 00000240 6f 6d 6d 61 20 61 6e 64 20 74 77 6f 20 61 66 74 |omma and two aft| 00000250 65 72 20 61 20 66 75 6c 6c 20 73 74 6f 70 20 61 |er a full stop a| 00000260 73 20 74 68 69 73 0d 67 69 76 65 73 20 61 20 63 |s this.gives a c| 00000270 6c 65 61 72 65 72 20 70 72 69 6e 74 69 6e 67 2e |learer printing.| 00000280 0d 0d 46 6f 72 20 34 30 20 63 6f 6c 75 6d 6e 20 |..For 40 column | 00000290 70 72 69 6e 74 69 6e 67 2c 20 74 68 65 1a 20 72 |printing, the. r| 000002a0 6f 75 74 69 6e 65 20 73 74 61 72 74 73 20 61 74 |outine starts at| 000002b0 20 6c 69 6e 65 20 36 38 30 20 61 6e 64 20 6c 65 | line 680 and le| 000002c0 61 64 69 6e 67 20 73 70 61 63 65 73 0d 61 72 65 |ading spaces.are| 000002d0 1a 20 73 6b 69 70 70 65 64 20 62 79 20 74 68 65 |. skipped by the| 000002e0 20 6c 6f 6f 70 20 61 74 20 6c 69 6e 65 20 37 30 | loop at line 70| 000002f0 30 2e 20 20 54 68 65 20 63 6f 6d 70 61 72 69 73 |0. The comparis| 00000300 6f 6e 20 61 74 20 6c 69 6e 65 1a 20 37 36 30 1a |on at line. 760.| 00000310 20 63 68 65 63 6b 73 0d 66 6f 72 20 74 68 65 1a | checks.for the.| 00000320 20 6e 75 6d 62 65 72 1a 20 6f 66 20 63 68 61 72 | number. of char| 00000330 61 63 74 65 72 73 20 70 72 69 6e 74 65 64 20 61 |acters printed a| 00000340 6e 64 2c 20 69 66 20 74 68 65 72 65 20 61 72 65 |nd, if there are| 00000350 20 6e 6f 20 6c 65 61 64 69 6e 67 20 73 70 61 63 | no leading spac| 00000360 65 73 0d 69 74 20 77 69 6c 6c 20 72 65 6d 61 69 |es.it will remai| 00000370 6e 20 61 74 20 74 68 65 1a 20 76 61 6c 75 65 1a |n at the. value.| 00000380 20 6f 66 1a 20 33 39 2e 1a 20 20 54 68 65 20 76 | of. 39.. The v| 00000390 61 6c 75 65 20 69 73 20 69 6e 63 72 65 61 73 65 |alue is increase| 000003a0 64 20 69 6e 20 6c 69 6e 65 20 37 30 30 20 0d 66 |d in line 700 .f| 000003b0 6f 72 20 65 61 63 68 20 73 70 61 63 65 20 66 6f |or each space fo| 000003c0 75 6e 64 2e 0d 0d 54 69 74 6c 65 73 20 61 6e 64 |und...Titles and| 000003d0 20 75 6e 64 65 72 6c 69 6e 65 73 20 61 72 65 20 | underlines are | 000003e0 70 72 69 6e 74 65 64 1a 20 61 73 1a 20 62 65 66 |printed. as. bef| 000003f0 6f 72 65 2e 1a 20 20 49 1a 20 68 61 76 65 20 61 |ore.. I. have a| 00000400 64 64 65 64 20 74 68 65 20 72 6f 75 74 69 6e 65 |dded the routine| 00000410 0d 27 63 68 6b 63 68 72 27 1a 20 61 74 20 6c 69 |.'chkchr'. at li| 00000420 6e 65 20 31 30 38 30 2e 20 20 54 68 69 73 20 73 |ne 1080. This s| 00000430 65 74 73 20 74 68 65 20 63 61 72 72 79 20 66 6c |ets the carry fl| 00000440 61 67 1a 20 69 66 1a 20 6f 6e 65 1a 20 6f 66 1a |ag. if. one. of.| 00000450 20 74 68 65 1a 20 74 68 72 65 65 0d 73 70 65 63 | the. three.spec| 00000460 69 61 6c 20 63 68 61 72 61 63 74 65 72 73 20 69 |ial characters i| 00000470 73 20 66 6f 75 6e 64 20 61 6e 64 1a 20 74 68 69 |s found and. thi| 00000480 73 20 74 68 65 20 62 72 61 6e 63 68 65 73 20 69 |s the branches i| 00000490 6e 20 74 68 65 20 74 65 73 74 20 72 6f 75 74 69 |n the test routi| 000004a0 6e 65 20 66 6f 72 0d 70 72 69 6e 74 69 6e 67 20 |ne for.printing | 000004b0 74 68 65 20 74 69 74 6c 65 20 61 6e 64 20 74 68 |the title and th| 000004c0 65 20 72 6f 75 74 69 6e 65 20 66 6f 72 20 64 69 |e routine for di| 000004d0 76 69 64 69 6e 67 20 6c 69 6e 65 73 2e 0d 0d 49 |viding lines...I| 000004e0 1a 20 66 6f 75 6e 64 1a 20 74 68 61 74 1a 20 74 |. found. that. t| 000004f0 69 74 6c 65 73 20 77 65 72 65 20 70 72 69 6e 74 |itles were print| 00000500 65 64 20 77 69 74 68 1a 20 61 6e 1a 20 69 6e 69 |ed with. an. ini| 00000510 74 69 61 6c 1a 20 73 70 61 63 65 1a 20 61 6e 64 |tial. space. and| 00000520 1a 20 49 1a 20 68 61 76 65 0d 63 6f 72 72 65 63 |. I. have.correc| 00000530 74 65 64 20 74 68 69 73 20 62 79 20 61 6d 65 6e |ted this by amen| 00000540 64 69 6e 67 1a 20 6c 69 6e 65 20 38 30 30 2e 20 |ding. line 800. | 00000550 20 54 68 69 73 20 63 68 65 63 6b 73 20 74 68 65 | This checks the| 00000560 20 70 72 69 6e 74 20 70 6f 73 69 74 69 6f 6e 20 | print position | 00000570 68 65 6c 64 0d 69 6e 20 61 64 64 72 65 73 73 20 |held.in address | 00000580 26 33 31 38 20 61 6e 64 2c 20 69 66 1a 20 74 68 |&318 and, if. th| 00000590 69 73 20 69 73 20 7a 65 72 6f 2c 20 73 6b 69 70 |is is zero, skip| 000005a0 73 20 74 68 65 20 70 72 69 6e 74 69 6e 67 20 6f |s the printing o| 000005b0 66 20 61 20 73 70 61 63 65 20 62 75 74 20 61 0d |f a space but a.| 000005c0 73 70 61 63 65 20 69 73 20 70 72 69 6e 74 65 64 |space is printed| 000005d0 20 74 6f 20 73 65 70 61 72 61 74 65 20 77 6f 72 | to separate wor| 000005e0 64 73 2e 0d 0d 49 66 20 61 20 6c 69 6e 65 20 69 |ds...If a line i| 000005f0 73 20 63 6f 6d 70 6c 65 74 65 64 1a 20 28 77 68 |s completed. (wh| 00000600 65 6e 1a 20 74 68 65 1a 20 63 6f 6d 70 61 72 69 |en. the. compari| 00000610 73 6f 6e 1a 20 61 74 1a 20 6c 69 6e 65 20 37 36 |son. at. line 76| 00000620 30 20 69 73 20 65 71 75 61 6c 29 20 74 68 65 0d |0 is equal) the.| 00000630 72 6f 75 74 69 6e 65 1a 20 27 6e 65 78 74 27 1a |routine. 'next'.| 00000640 20 69 73 20 63 61 6c 6c 65 64 2e 0d 0d 49 66 1a | is called...If.| 00000650 1a 20 6f 6e 65 1a 20 6f 66 1a 20 74 68 65 20 74 |. one. of. the t| 00000660 68 72 65 65 20 63 68 61 72 61 63 74 65 72 73 1a |hree characters.| 00000670 20 69 73 1a 20 66 6f 75 6e 64 1a 20 74 68 65 6e | is. found. then| 00000680 1a 20 61 1a 20 6a 75 6d 70 1a 20 69 73 1a 20 6d |. a. jump. is. m| 00000690 61 64 65 1a 20 74 6f 0d 27 73 6b 69 70 63 68 72 |ade. to.'skipchr| 000006a0 27 20 69 6e 20 6c 69 6e 65 20 31 30 35 30 2e 20 |' in line 1050. | 000006b0 20 54 68 69 73 20 69 6e 63 72 65 61 73 65 73 20 | This increases | 000006c0 74 68 65 20 69 6e 64 65 78 20 74 6f 20 70 6f 69 |the index to poi| 000006d0 6e 74 20 74 6f 20 74 68 65 20 73 74 61 72 74 20 |nt to the start | 000006e0 6f 66 0d 74 68 65 20 6e 65 78 74 20 6c 69 6e 65 |of.the next line| 000006f0 2e 20 20 54 68 65 20 76 61 6c 75 65 1a 20 6f 66 |. The value. of| 00000700 20 74 68 65 20 69 6e 64 65 78 20 59 20 69 73 20 | the index Y is | 00000710 61 64 64 65 64 20 74 6f 20 27 61 64 64 72 27 20 |added to 'addr' | 00000720 69 6e 20 6c 69 6e 65 73 20 31 30 31 30 0d 2d 20 |in lines 1010.- | 00000730 31 30 33 30 20 61 6e 64 20 61 20 6a 75 6d 70 20 |1030 and a jump | 00000740 6d 61 64 65 20 74 6f 20 27 6c 69 6e 65 27 20 66 |made to 'line' f| 00000750 6f 72 20 70 72 69 6e 74 69 6e 67 20 74 68 65 20 |or printing the | 00000760 6e 65 78 74 20 6c 69 6e 65 2e 20 20 54 68 69 73 |next line. This| 00000770 20 65 6e 73 75 72 65 73 0d 74 68 61 74 20 6f 6e | ensures.that on| 00000780 6c 79 20 34 30 20 6f 66 20 74 68 65 73 65 20 63 |ly 40 of these c| 00000790 68 61 72 61 63 74 65 72 73 20 61 72 65 20 70 72 |haracters are pr| 000007a0 69 6e 74 65 64 2e 0d 20 0d 49 66 20 6e 6f 6e 65 |inted.. .If none| 000007b0 20 6f 66 20 74 68 65 73 65 20 63 68 61 72 61 63 | of these charac| 000007c0 74 65 72 73 20 69 73 20 66 6f 75 6e 64 2c 20 61 |ters is found, a| 000007d0 20 63 68 65 63 6b 20 66 6f 72 20 61 20 73 70 61 | check for a spa| 000007e0 63 65 20 69 73 20 6d 61 64 65 1a 20 61 6e 64 2c |ce is made. and,| 000007f0 20 69 66 0d 66 6f 75 6e 64 2c 20 6f 73 6e 65 77 | if.found, osnew| 00000800 6c 20 28 26 46 46 45 37 29 20 69 73 20 63 61 6c |l (&FFE7) is cal| 00000810 6c 65 64 1a 20 61 74 1a 20 6c 69 6e 65 1a 20 31 |led. at. line. 1| 00000820 30 30 30 1a 20 61 6e 64 1a 20 27 61 64 64 72 27 |000. and. 'addr'| 00000830 1a 20 69 6e 63 72 65 61 73 65 64 20 61 73 0d 61 |. increased as.a| 00000840 62 6f 76 65 2e 0d 0d 49 66 20 61 20 73 70 61 63 |bove...If a spac| 00000850 65 20 69 73 20 6e 6f 74 20 66 6f 75 6e 64 2c 1a |e is not found,.| 00000860 20 69 65 1a 20 74 68 65 1a 20 77 6f 72 64 1a 1a | ie. the. word..| 00000870 20 69 73 1a 1a 20 6e 6f 74 1a 20 63 6f 6d 70 6c | is.. not. compl| 00000880 65 74 65 64 2c 20 74 68 65 20 72 6f 75 74 69 6e |eted, the routin| 00000890 65 0d 27 64 65 6c 65 74 65 27 20 69 73 20 63 61 |e.'delete' is ca| 000008a0 6c 6c 65 64 20 61 6e 64 20 74 68 65 20 63 68 61 |lled and the cha| 000008b0 72 61 63 74 65 72 73 20 64 65 6c 65 74 65 64 20 |racters deleted | 000008c0 75 6e 74 69 6c 20 61 20 73 70 61 63 65 20 69 73 |until a space is| 000008d0 20 66 6f 75 6e 64 2e 20 20 54 68 65 0d 69 6e 64 | found. The.ind| 000008e0 65 78 1a 20 69 73 1a 20 74 68 65 6e 1a 20 70 6f |ex. is. then. po| 000008f0 69 6e 74 69 6e 67 20 74 6f 20 74 68 65 20 62 65 |inting to the be| 00000900 67 69 6e 6e 69 6e 67 20 6f 66 20 74 68 65 20 77 |ginning of the w| 00000910 6f 72 64 20 66 6f 72 20 70 72 69 6e 74 69 6e 67 |ord for printing| 00000920 20 6f 6e 20 74 68 65 0d 6e 65 78 74 20 6c 69 6e | on the.next lin| 00000930 65 20 61 73 20 62 65 66 6f 72 65 2e 0d 0d 49 20 |e as before...I | 00000940 68 6f 70 65 20 74 68 69 73 20 65 78 70 6c 61 69 |hope this explai| 00000950 6e 73 1a 20 74 68 65 1a 20 6e 65 77 1a 20 72 6f |ns. the. new. ro| 00000960 75 74 69 6e 65 1a 20 61 6c 6c 1a 20 72 69 67 68 |utine. all. righ| 00000970 74 2e 20 20 54 68 65 20 72 65 6d 61 69 6e 64 65 |t. The remainde| 00000980 72 20 6f 66 20 74 68 65 0d 63 6f 64 69 6e 67 20 |r of the.coding | 00000990 69 73 20 61 73 20 62 65 66 6f 72 65 20 65 78 63 |is as before exc| 000009a0 65 70 74 20 74 68 61 74 20 49 20 68 61 76 65 20 |ept that I have | 000009b0 70 75 74 20 74 68 65 20 63 6f 64 69 6e 67 20 66 |put the coding f| 000009c0 6f 72 1a 74 68 65 20 66 6f 6e 74 73 20 61 74 20 |or.the fonts at | 000009d0 74 68 65 0d 65 6e 64 20 61 6e 64 20 61 6c 73 6f |the.end and also| 000009e0 20 61 64 65 64 20 74 68 65 20 6d 6f 64 69 66 69 | aded the modifi| 000009f0 63 61 74 69 6f 6e 73 20 73 75 67 67 65 73 74 65 |cations suggeste| 00000a00 64 20 62 79 20 52 6f 62 65 72 74 20 53 70 72 6f |d by Robert Spro| 00000a10 77 73 6f 6e 2e 0d 0d 2a 2a 2a 2a 2a 2a 2a 2a 2a |wson...*********| 00000a20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000a60 2a 0d 0d |*..| 00000a63