Home » Archimedes archive » Acorn User » AU 1997-10 A.adf » Extras » Apple][e/PD/PIC/!PICbasic/Docs/Limits
Apple][e/PD/PIC/!PICbasic/Docs/Limits
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 » Archimedes archive » Acorn User » AU 1997-10 A.adf » Extras |
Filename: | Apple][e/PD/PIC/!PICbasic/Docs/Limits |
Read OK: | ✔ |
File size: | 14D5 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Technicalities limits ===================== Binary numeric range is upto 14 bits and the interpretter obeys the following rules: A '1' (ASCii value &31) is read as a set bit A ' ' (ASCii value &20) is ignored and has NO EFFECT Any other character is interpretted as a clear bit So for example: 11xxxxxx = 128+64 11 xxxxx 0 = 128+64 11000 000 = 128+64 too If possible,BASIC tokenises the assembler statements,so ANDLW k will be tokenised as 'AND' then 'LW k'.So GOTOs (which is a PIC mnemonic anyway) must have line labels after them,and not absolute numbers. So for example: GOTO label IS ACCEPTABLE GOTO 9999 IS NOT ACCEPTABLE As a result of the above,the PIC mnemonic SWAPF is tokenised to 'SWAP' then 'F' under BBC basic V.However my lookup table of tokens is for BBC basic II so that it works on a BBC too,and the token 'SWAP' doesn't exist on a BBC.To avoid this problem if authoring the source code for your PIC chip on an Archimedes or above,use some lower case.So 'SWaPF' is what I use.Indeed this reminds you that mnemonics are not case sensitive anyway. The most recent code assembled is saved automatically on QUITting and will be saved in the current directory as "OUTPUT",filetyped "Absolute" if using Risc OS. Putting a number after a mnemonic such as NOP results in the number being ignored,as per the 6502 assembler on BBCs. There are NO reserved global variables as variables are assigned using my own assigner.A limit is applied though,set by 'allow%' at the beginning of the main PICbasic program.Set to 64 at the moment,reduce this if memory is a problem,or increase it if you've got a larger program with > 64 variables. So called 'special instruction mnemonics',which appear listed in the file containing the 16Cxx instruction set are NOT available. The assembler pseudo mnemonics EQUS,EQUD,EQUW,EQUB are not accepted and cause an error since placing data in the program memory is silly - that's the whole idea of a Harvard architechture. Resulting output is of the form <LO><HI> ready to be programmed into the chip, none of this 'Intel hex object format' business.Because the program bus is 14 bits wide in a PIC but bytes on a disk are 8 bits wide then the top 2 bits of every high byte will of course be set to zero. When DIMing memory,base the amount required on the number of 14 bit words that you expect to need.So,if your program is about 200 instructions long use something like DIM myprog% 256 However,because of the 14 bit .v. 8 bit differences,you must have at least TWICE that much memory free.This is only really a problem on the BBCs as memory is of a premium there. Limits that will be sorted out ============================== You can't define a string variable in terms of another.ie stringone$="abcdef" stringtwo$=stringone$+"ghijk" WONT WORK During program execution the following keywords will cause the error of 'Command not supported' and execution will stop: &85 - ERROR &86 - LINE &87 - OFF &89 - SPC &8A - TAB &8B - ELSE &8C - THEN &8E - OPENIN &8F - PTR &90 - PAGE &92 - LOMEM &93 - HIMEM &96 - ADVAL &9A - BGET &9C - COUNT &9E - ERL &9F - ERR &A0 - EVAL &A2 - EXT &A4 - FN &A5 - GET &A6 - INKEY &AD - OPENUP &AE - OPENOUT &B0 - POINT( &B1 - POS &BA - USR &BE - GET$ &BF - INKEY$ &C5 - EOF &C6 - AUTO &C7 - DELETE &C8 - LOAD &C9 - LIST &CA - NEW &CB - OLD &CC - RENUMBER &CD - SAVE &CF - PTR &D0 - PAGE &D2 - LOMEM &D3 - HIMEM &D4 - SOUND &D5 - BPUT &D6 - CALL &D7 - CHAIN &D8 - CLEAR &D9 - CLOSE &DA - CLG &DC - DATA &DD - DEF &DF - DRAW &E1 - ENDPROC &E2 - ENVELOPE &E4 - GOSUB &E5 - GOTO &E6 - GCOL &E7 - IF &E8 - INPUT &EA - LOCAL &EB - MODE &EC - MOVE &EE - ON &EF - VDU &F0 - PLOT &F2 - PROC &F3 - READ &F5 - REPEAT &F6 - REPORT &F7 - RESTORE &F8 - RETURN &F9 - RUN &FB - COLOUR or COLOR &FC - TRACE &FD - UNTIL &FF - OSCLI Single line statements only are allowed,but a ':' will be interpretted as a REM The assembler pseudo mnemonic OPT is used only to see whether or not you want the code printing out or not.Use it as per normal as future versions will support it more fully. Spaces ARE stripped from numerical constants,eg. XORLW #128 XORLW # 1 2 8 ARE BOTH EQUIVALENT RUNing a program twice results in corrupt code The FOR...NEXT stack is only 1 deep,attempting to nest FOR...NEXTs will give the error 'Too many FORs'.Also,negative STEPs aren't handled,since FOR...NEXT is only used to set 'OPT' isn't it? Errors don't tell you ERL an don't set ERR or ERL. No check is made to ensure that the file numbers or literals are within range so that: XORLW #999999 WONT CAUSE AN ERROR MOVF 999999,W WONT CAUSE AN ERROR
00000000 54 65 63 68 6e 69 63 61 6c 69 74 69 65 73 20 6c |Technicalities l| 00000010 69 6d 69 74 73 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |imits.==========| 00000020 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 0a 42 69 6e |===========..Bin| 00000030 61 72 79 20 6e 75 6d 65 72 69 63 20 72 61 6e 67 |ary numeric rang| 00000040 65 20 69 73 20 75 70 74 6f 20 31 34 20 62 69 74 |e is upto 14 bit| 00000050 73 20 61 6e 64 20 74 68 65 20 69 6e 74 65 72 70 |s and the interp| 00000060 72 65 74 74 65 72 20 6f 62 65 79 73 20 74 68 65 |retter obeys the| 00000070 20 66 6f 6c 6c 6f 77 69 6e 67 20 0a 72 75 6c 65 | following .rule| 00000080 73 3a 0a 41 20 27 31 27 20 28 41 53 43 69 69 20 |s:.A '1' (ASCii | 00000090 76 61 6c 75 65 20 26 33 31 29 20 69 73 20 72 65 |value &31) is re| 000000a0 61 64 20 61 73 20 61 20 73 65 74 20 62 69 74 0a |ad as a set bit.| 000000b0 41 20 27 20 27 20 28 41 53 43 69 69 20 76 61 6c |A ' ' (ASCii val| 000000c0 75 65 20 26 32 30 29 20 69 73 20 69 67 6e 6f 72 |ue &20) is ignor| 000000d0 65 64 20 61 6e 64 20 68 61 73 20 4e 4f 20 45 46 |ed and has NO EF| 000000e0 46 45 43 54 0a 41 6e 79 20 6f 74 68 65 72 20 63 |FECT.Any other c| 000000f0 68 61 72 61 63 74 65 72 20 69 73 20 69 6e 74 65 |haracter is inte| 00000100 72 70 72 65 74 74 65 64 20 61 73 20 61 20 63 6c |rpretted as a cl| 00000110 65 61 72 20 62 69 74 20 0a 53 6f 20 66 6f 72 20 |ear bit .So for | 00000120 65 78 61 6d 70 6c 65 3a 0a 31 31 78 78 78 78 78 |example:.11xxxxx| 00000130 78 20 3d 20 31 32 38 2b 36 34 0a 31 31 20 78 78 |x = 128+64.11 xx| 00000140 78 78 78 20 30 20 3d 20 31 32 38 2b 36 34 0a 31 |xxx 0 = 128+64.1| 00000150 31 30 30 30 20 30 30 30 20 3d 20 31 32 38 2b 36 |1000 000 = 128+6| 00000160 34 20 74 6f 6f 0a 0a 49 66 20 70 6f 73 73 69 62 |4 too..If possib| 00000170 6c 65 2c 42 41 53 49 43 20 74 6f 6b 65 6e 69 73 |le,BASIC tokenis| 00000180 65 73 20 74 68 65 20 61 73 73 65 6d 62 6c 65 72 |es the assembler| 00000190 20 73 74 61 74 65 6d 65 6e 74 73 2c 73 6f 20 41 | statements,so A| 000001a0 4e 44 4c 57 20 6b 20 77 69 6c 6c 20 62 65 20 0a |NDLW k will be .| 000001b0 74 6f 6b 65 6e 69 73 65 64 20 61 73 20 27 41 4e |tokenised as 'AN| 000001c0 44 27 20 74 68 65 6e 20 27 4c 57 20 6b 27 2e 53 |D' then 'LW k'.S| 000001d0 6f 20 47 4f 54 4f 73 20 28 77 68 69 63 68 20 69 |o GOTOs (which i| 000001e0 73 20 61 20 50 49 43 20 6d 6e 65 6d 6f 6e 69 63 |s a PIC mnemonic| 000001f0 20 61 6e 79 77 61 79 29 20 6d 75 73 74 20 0a 68 | anyway) must .h| 00000200 61 76 65 20 6c 69 6e 65 20 6c 61 62 65 6c 73 20 |ave line labels | 00000210 61 66 74 65 72 20 74 68 65 6d 2c 61 6e 64 20 6e |after them,and n| 00000220 6f 74 20 61 62 73 6f 6c 75 74 65 20 6e 75 6d 62 |ot absolute numb| 00000230 65 72 73 2e 0a 53 6f 20 66 6f 72 20 65 78 61 6d |ers..So for exam| 00000240 70 6c 65 3a 0a 47 4f 54 4f 20 6c 61 62 65 6c 20 |ple:.GOTO label | 00000250 20 20 20 20 20 20 20 20 20 49 53 20 41 43 43 45 | IS ACCE| 00000260 50 54 41 42 4c 45 0a 47 4f 54 4f 20 39 39 39 39 |PTABLE.GOTO 9999| 00000270 20 20 20 20 20 20 20 20 20 20 20 49 53 20 4e 4f | IS NO| 00000280 54 20 41 43 43 45 50 54 41 42 4c 45 0a 0a 41 73 |T ACCEPTABLE..As| 00000290 20 61 20 72 65 73 75 6c 74 20 6f 66 20 74 68 65 | a result of the| 000002a0 20 61 62 6f 76 65 2c 74 68 65 20 50 49 43 20 6d | above,the PIC m| 000002b0 6e 65 6d 6f 6e 69 63 20 53 57 41 50 46 20 69 73 |nemonic SWAPF is| 000002c0 20 74 6f 6b 65 6e 69 73 65 64 20 74 6f 20 27 53 | tokenised to 'S| 000002d0 57 41 50 27 20 74 68 65 6e 20 27 46 27 0a 75 6e |WAP' then 'F'.un| 000002e0 64 65 72 20 42 42 43 20 62 61 73 69 63 20 56 2e |der BBC basic V.| 000002f0 48 6f 77 65 76 65 72 20 6d 79 20 6c 6f 6f 6b 75 |However my looku| 00000300 70 20 74 61 62 6c 65 20 6f 66 20 74 6f 6b 65 6e |p table of token| 00000310 73 20 69 73 20 66 6f 72 20 42 42 43 20 62 61 73 |s is for BBC bas| 00000320 69 63 20 49 49 20 73 6f 0a 74 68 61 74 20 69 74 |ic II so.that it| 00000330 20 77 6f 72 6b 73 20 6f 6e 20 61 20 42 42 43 20 | works on a BBC | 00000340 74 6f 6f 2c 61 6e 64 20 74 68 65 20 74 6f 6b 65 |too,and the toke| 00000350 6e 20 27 53 57 41 50 27 20 64 6f 65 73 6e 27 74 |n 'SWAP' doesn't| 00000360 20 65 78 69 73 74 20 6f 6e 20 61 20 42 42 43 2e | exist on a BBC.| 00000370 54 6f 0a 61 76 6f 69 64 20 74 68 69 73 20 70 72 |To.avoid this pr| 00000380 6f 62 6c 65 6d 20 69 66 20 61 75 74 68 6f 72 69 |oblem if authori| 00000390 6e 67 20 74 68 65 20 73 6f 75 72 63 65 20 63 6f |ng the source co| 000003a0 64 65 20 66 6f 72 20 79 6f 75 72 20 50 49 43 20 |de for your PIC | 000003b0 63 68 69 70 20 6f 6e 20 61 6e 0a 41 72 63 68 69 |chip on an.Archi| 000003c0 6d 65 64 65 73 20 6f 72 20 61 62 6f 76 65 2c 75 |medes or above,u| 000003d0 73 65 20 73 6f 6d 65 20 6c 6f 77 65 72 20 63 61 |se some lower ca| 000003e0 73 65 2e 53 6f 20 27 53 57 61 50 46 27 20 69 73 |se.So 'SWaPF' is| 000003f0 20 77 68 61 74 20 49 20 75 73 65 2e 49 6e 64 65 | what I use.Inde| 00000400 65 64 20 0a 74 68 69 73 20 72 65 6d 69 6e 64 73 |ed .this reminds| 00000410 20 79 6f 75 20 74 68 61 74 20 6d 6e 65 6d 6f 6e | you that mnemon| 00000420 69 63 73 20 61 72 65 20 6e 6f 74 20 63 61 73 65 |ics are not case| 00000430 20 73 65 6e 73 69 74 69 76 65 20 61 6e 79 77 61 | sensitive anywa| 00000440 79 2e 0a 0a 54 68 65 20 6d 6f 73 74 20 72 65 63 |y...The most rec| 00000450 65 6e 74 20 63 6f 64 65 20 61 73 73 65 6d 62 6c |ent code assembl| 00000460 65 64 20 69 73 20 73 61 76 65 64 20 61 75 74 6f |ed is saved auto| 00000470 6d 61 74 69 63 61 6c 6c 79 20 6f 6e 20 51 55 49 |matically on QUI| 00000480 54 74 69 6e 67 20 61 6e 64 20 77 69 6c 6c 0a 62 |Tting and will.b| 00000490 65 20 73 61 76 65 64 20 69 6e 20 74 68 65 20 63 |e saved in the c| 000004a0 75 72 72 65 6e 74 20 64 69 72 65 63 74 6f 72 79 |urrent directory| 000004b0 20 61 73 20 22 4f 55 54 50 55 54 22 2c 66 69 6c | as "OUTPUT",fil| 000004c0 65 74 79 70 65 64 20 22 41 62 73 6f 6c 75 74 65 |etyped "Absolute| 000004d0 22 20 69 66 20 75 73 69 6e 67 0a 52 69 73 63 20 |" if using.Risc | 000004e0 4f 53 2e 0a 0a 50 75 74 74 69 6e 67 20 61 20 6e |OS...Putting a n| 000004f0 75 6d 62 65 72 20 61 66 74 65 72 20 61 20 6d 6e |umber after a mn| 00000500 65 6d 6f 6e 69 63 20 73 75 63 68 20 61 73 20 4e |emonic such as N| 00000510 4f 50 20 72 65 73 75 6c 74 73 20 69 6e 20 74 68 |OP results in th| 00000520 65 20 6e 75 6d 62 65 72 20 62 65 69 6e 67 20 0a |e number being .| 00000530 69 67 6e 6f 72 65 64 2c 61 73 20 70 65 72 20 74 |ignored,as per t| 00000540 68 65 20 36 35 30 32 20 61 73 73 65 6d 62 6c 65 |he 6502 assemble| 00000550 72 20 6f 6e 20 42 42 43 73 2e 0a 0a 54 68 65 72 |r on BBCs...Ther| 00000560 65 20 61 72 65 20 4e 4f 20 72 65 73 65 72 76 65 |e are NO reserve| 00000570 64 20 67 6c 6f 62 61 6c 20 76 61 72 69 61 62 6c |d global variabl| 00000580 65 73 20 61 73 20 76 61 72 69 61 62 6c 65 73 20 |es as variables | 00000590 61 72 65 20 61 73 73 69 67 6e 65 64 20 75 73 69 |are assigned usi| 000005a0 6e 67 20 6d 79 20 6f 77 6e 0a 61 73 73 69 67 6e |ng my own.assign| 000005b0 65 72 2e 41 20 6c 69 6d 69 74 20 69 73 20 61 70 |er.A limit is ap| 000005c0 70 6c 69 65 64 20 74 68 6f 75 67 68 2c 73 65 74 |plied though,set| 000005d0 20 62 79 20 27 61 6c 6c 6f 77 25 27 20 61 74 20 | by 'allow%' at | 000005e0 74 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 6f 66 |the beginning of| 000005f0 20 74 68 65 20 0a 6d 61 69 6e 20 50 49 43 62 61 | the .main PICba| 00000600 73 69 63 20 70 72 6f 67 72 61 6d 2e 53 65 74 20 |sic program.Set | 00000610 74 6f 20 36 34 20 61 74 20 74 68 65 20 6d 6f 6d |to 64 at the mom| 00000620 65 6e 74 2c 72 65 64 75 63 65 20 74 68 69 73 20 |ent,reduce this | 00000630 69 66 20 6d 65 6d 6f 72 79 20 69 73 20 61 0a 70 |if memory is a.p| 00000640 72 6f 62 6c 65 6d 2c 6f 72 20 69 6e 63 72 65 61 |roblem,or increa| 00000650 73 65 20 69 74 20 69 66 20 79 6f 75 27 76 65 20 |se it if you've | 00000660 67 6f 74 20 61 20 6c 61 72 67 65 72 20 70 72 6f |got a larger pro| 00000670 67 72 61 6d 20 77 69 74 68 20 3e 20 36 34 20 76 |gram with > 64 v| 00000680 61 72 69 61 62 6c 65 73 2e 0a 0a 53 6f 20 63 61 |ariables...So ca| 00000690 6c 6c 65 64 20 27 73 70 65 63 69 61 6c 20 69 6e |lled 'special in| 000006a0 73 74 72 75 63 74 69 6f 6e 20 6d 6e 65 6d 6f 6e |struction mnemon| 000006b0 69 63 73 27 2c 77 68 69 63 68 20 61 70 70 65 61 |ics',which appea| 000006c0 72 20 6c 69 73 74 65 64 20 69 6e 20 74 68 65 20 |r listed in the | 000006d0 66 69 6c 65 20 0a 63 6f 6e 74 61 69 6e 69 6e 67 |file .containing| 000006e0 20 74 68 65 20 31 36 43 78 78 20 69 6e 73 74 72 | the 16Cxx instr| 000006f0 75 63 74 69 6f 6e 20 73 65 74 20 61 72 65 20 4e |uction set are N| 00000700 4f 54 20 61 76 61 69 6c 61 62 6c 65 2e 0a 0a 54 |OT available...T| 00000710 68 65 20 61 73 73 65 6d 62 6c 65 72 20 70 73 65 |he assembler pse| 00000720 75 64 6f 20 6d 6e 65 6d 6f 6e 69 63 73 20 45 51 |udo mnemonics EQ| 00000730 55 53 2c 45 51 55 44 2c 45 51 55 57 2c 45 51 55 |US,EQUD,EQUW,EQU| 00000740 42 20 61 72 65 20 6e 6f 74 20 61 63 63 65 70 74 |B are not accept| 00000750 65 64 20 61 6e 64 20 63 61 75 73 65 20 0a 61 6e |ed and cause .an| 00000760 20 65 72 72 6f 72 20 73 69 6e 63 65 20 70 6c 61 | error since pla| 00000770 63 69 6e 67 20 64 61 74 61 20 69 6e 20 74 68 65 |cing data in the| 00000780 20 70 72 6f 67 72 61 6d 20 6d 65 6d 6f 72 79 20 | program memory | 00000790 69 73 20 73 69 6c 6c 79 20 2d 20 74 68 61 74 27 |is silly - that'| 000007a0 73 20 74 68 65 20 77 68 6f 6c 65 20 0a 69 64 65 |s the whole .ide| 000007b0 61 20 6f 66 20 61 20 48 61 72 76 61 72 64 20 61 |a of a Harvard a| 000007c0 72 63 68 69 74 65 63 68 74 75 72 65 2e 0a 0a 52 |rchitechture...R| 000007d0 65 73 75 6c 74 69 6e 67 20 6f 75 74 70 75 74 20 |esulting output | 000007e0 69 73 20 6f 66 20 74 68 65 20 66 6f 72 6d 20 3c |is of the form <| 000007f0 4c 4f 3e 3c 48 49 3e 20 72 65 61 64 79 20 74 6f |LO><HI> ready to| 00000800 20 62 65 20 70 72 6f 67 72 61 6d 6d 65 64 20 69 | be programmed i| 00000810 6e 74 6f 20 74 68 65 20 63 68 69 70 2c 0a 6e 6f |nto the chip,.no| 00000820 6e 65 20 6f 66 20 74 68 69 73 20 27 49 6e 74 65 |ne of this 'Inte| 00000830 6c 20 68 65 78 20 6f 62 6a 65 63 74 20 66 6f 72 |l hex object for| 00000840 6d 61 74 27 20 62 75 73 69 6e 65 73 73 2e 42 65 |mat' business.Be| 00000850 63 61 75 73 65 20 74 68 65 20 70 72 6f 67 72 61 |cause the progra| 00000860 6d 20 62 75 73 20 69 73 0a 31 34 20 62 69 74 73 |m bus is.14 bits| 00000870 20 77 69 64 65 20 69 6e 20 61 20 50 49 43 20 62 | wide in a PIC b| 00000880 75 74 20 62 79 74 65 73 20 6f 6e 20 61 20 64 69 |ut bytes on a di| 00000890 73 6b 20 61 72 65 20 38 20 62 69 74 73 20 77 69 |sk are 8 bits wi| 000008a0 64 65 20 74 68 65 6e 20 74 68 65 20 74 6f 70 20 |de then the top | 000008b0 32 20 62 69 74 73 0a 6f 66 20 65 76 65 72 79 20 |2 bits.of every | 000008c0 68 69 67 68 20 62 79 74 65 20 77 69 6c 6c 20 6f |high byte will o| 000008d0 66 20 63 6f 75 72 73 65 20 62 65 20 73 65 74 20 |f course be set | 000008e0 74 6f 20 7a 65 72 6f 2e 0a 0a 57 68 65 6e 20 44 |to zero...When D| 000008f0 49 4d 69 6e 67 20 6d 65 6d 6f 72 79 2c 62 61 73 |IMing memory,bas| 00000900 65 20 74 68 65 20 61 6d 6f 75 6e 74 20 72 65 71 |e the amount req| 00000910 75 69 72 65 64 20 6f 6e 20 74 68 65 20 6e 75 6d |uired on the num| 00000920 62 65 72 20 6f 66 20 31 34 20 62 69 74 20 77 6f |ber of 14 bit wo| 00000930 72 64 73 20 74 68 61 74 20 0a 79 6f 75 20 65 78 |rds that .you ex| 00000940 70 65 63 74 20 74 6f 20 6e 65 65 64 2e 53 6f 2c |pect to need.So,| 00000950 69 66 20 79 6f 75 72 20 70 72 6f 67 72 61 6d 20 |if your program | 00000960 69 73 20 61 62 6f 75 74 20 32 30 30 20 69 6e 73 |is about 200 ins| 00000970 74 72 75 63 74 69 6f 6e 73 20 6c 6f 6e 67 20 75 |tructions long u| 00000980 73 65 20 0a 73 6f 6d 65 74 68 69 6e 67 20 6c 69 |se .something li| 00000990 6b 65 20 20 20 20 20 20 44 49 4d 20 6d 79 70 72 |ke DIM mypr| 000009a0 6f 67 25 20 32 35 36 0a 48 6f 77 65 76 65 72 2c |og% 256.However,| 000009b0 62 65 63 61 75 73 65 20 6f 66 20 74 68 65 20 31 |because of the 1| 000009c0 34 20 62 69 74 20 2e 76 2e 20 38 20 62 69 74 20 |4 bit .v. 8 bit | 000009d0 64 69 66 66 65 72 65 6e 63 65 73 2c 79 6f 75 20 |differences,you | 000009e0 6d 75 73 74 20 68 61 76 65 20 61 74 20 6c 65 61 |must have at lea| 000009f0 73 74 20 0a 54 57 49 43 45 20 74 68 61 74 20 6d |st .TWICE that m| 00000a00 75 63 68 20 6d 65 6d 6f 72 79 20 66 72 65 65 2e |uch memory free.| 00000a10 54 68 69 73 20 69 73 20 6f 6e 6c 79 20 72 65 61 |This is only rea| 00000a20 6c 6c 79 20 61 20 70 72 6f 62 6c 65 6d 20 6f 6e |lly a problem on| 00000a30 20 74 68 65 20 42 42 43 73 20 61 73 20 6d 65 6d | the BBCs as mem| 00000a40 6f 72 79 0a 69 73 20 6f 66 20 61 20 70 72 65 6d |ory.is of a prem| 00000a50 69 75 6d 20 74 68 65 72 65 2e 0a 0a 4c 69 6d 69 |ium there...Limi| 00000a60 74 73 20 74 68 61 74 20 77 69 6c 6c 20 62 65 20 |ts that will be | 00000a70 73 6f 72 74 65 64 20 6f 75 74 0a 3d 3d 3d 3d 3d |sorted out.=====| 00000a80 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| 00000a90 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 0a 59 6f 75 20 63 |=========..You c| 00000aa0 61 6e 27 74 20 64 65 66 69 6e 65 20 61 20 73 74 |an't define a st| 00000ab0 72 69 6e 67 20 76 61 72 69 61 62 6c 65 20 69 6e |ring variable in| 00000ac0 20 74 65 72 6d 73 20 6f 66 20 61 6e 6f 74 68 65 | terms of anothe| 00000ad0 72 2e 69 65 0a 73 74 72 69 6e 67 6f 6e 65 24 3d |r.ie.stringone$=| 00000ae0 22 61 62 63 64 65 66 22 0a 73 74 72 69 6e 67 74 |"abcdef".stringt| 00000af0 77 6f 24 3d 73 74 72 69 6e 67 6f 6e 65 24 2b 22 |wo$=stringone$+"| 00000b00 67 68 69 6a 6b 22 20 20 20 20 20 20 20 20 57 4f |ghijk" WO| 00000b10 4e 54 20 57 4f 52 4b 0a 0a 44 75 72 69 6e 67 20 |NT WORK..During | 00000b20 70 72 6f 67 72 61 6d 20 65 78 65 63 75 74 69 6f |program executio| 00000b30 6e 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 |n the following | 00000b40 6b 65 79 77 6f 72 64 73 20 77 69 6c 6c 20 63 61 |keywords will ca| 00000b50 75 73 65 20 74 68 65 20 65 72 72 6f 72 0a 6f 66 |use the error.of| 00000b60 20 27 43 6f 6d 6d 61 6e 64 20 6e 6f 74 20 73 75 | 'Command not su| 00000b70 70 70 6f 72 74 65 64 27 20 61 6e 64 20 65 78 65 |pported' and exe| 00000b80 63 75 74 69 6f 6e 20 77 69 6c 6c 20 73 74 6f 70 |cution will stop| 00000b90 3a 0a 26 38 35 20 2d 20 45 52 52 4f 52 20 20 20 |:.&85 - ERROR | 00000ba0 20 20 20 20 20 20 20 20 20 20 20 26 38 36 20 2d | &86 -| 00000bb0 20 4c 49 4e 45 20 20 20 20 20 20 20 20 20 20 20 | LINE | 00000bc0 20 20 20 20 26 38 37 20 2d 20 4f 46 46 0a 26 38 | &87 - OFF.&8| 00000bd0 39 20 2d 20 53 50 43 20 20 20 20 20 20 20 20 20 |9 - SPC | 00000be0 20 20 20 20 20 20 20 26 38 41 20 2d 20 54 41 42 | &8A - TAB| 00000bf0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000c00 26 38 42 20 2d 20 45 4c 53 45 0a 26 38 43 20 2d |&8B - ELSE.&8C -| 00000c10 20 54 48 45 4e 20 20 20 20 20 20 20 20 20 20 20 | THEN | 00000c20 20 20 20 20 26 38 45 20 2d 20 4f 50 45 4e 49 4e | &8E - OPENIN| 00000c30 20 20 20 20 20 20 20 20 20 20 20 20 20 26 38 46 | &8F| 00000c40 20 2d 20 50 54 52 0a 26 39 30 20 2d 20 50 41 47 | - PTR.&90 - PAG| 00000c50 45 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |E | 00000c60 26 39 32 20 2d 20 4c 4f 4d 45 4d 20 20 20 20 20 |&92 - LOMEM | 00000c70 20 20 20 20 20 20 20 20 20 26 39 33 20 2d 20 48 | &93 - H| 00000c80 49 4d 45 4d 0a 26 39 36 20 2d 20 41 44 56 41 4c |IMEM.&96 - ADVAL| 00000c90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 26 39 | &9| 00000ca0 41 20 2d 20 42 47 45 54 20 20 20 20 20 20 20 20 |A - BGET | 00000cb0 20 20 20 20 20 20 20 26 39 43 20 2d 20 43 4f 55 | &9C - COU| 00000cc0 4e 54 0a 26 39 45 20 2d 20 45 52 4c 20 20 20 20 |NT.&9E - ERL | 00000cd0 20 20 20 20 20 20 20 20 20 20 20 20 26 39 46 20 | &9F | 00000ce0 2d 20 45 52 52 20 20 20 20 20 20 20 20 20 20 20 |- ERR | 00000cf0 20 20 20 20 20 26 41 30 20 2d 20 45 56 41 4c 0a | &A0 - EVAL.| 00000d00 26 41 32 20 2d 20 45 58 54 20 20 20 20 20 20 20 |&A2 - EXT | 00000d10 20 20 20 20 20 20 20 20 20 26 41 34 20 2d 20 46 | &A4 - F| 00000d20 4e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |N | 00000d30 20 20 26 41 35 20 2d 20 47 45 54 0a 26 41 36 20 | &A5 - GET.&A6 | 00000d40 2d 20 49 4e 4b 45 59 20 20 20 20 20 20 20 20 20 |- INKEY | 00000d50 20 20 20 20 20 26 41 44 20 2d 20 4f 50 45 4e 55 | &AD - OPENU| 00000d60 50 20 20 20 20 20 20 20 20 20 20 20 20 20 26 41 |P &A| 00000d70 45 20 2d 20 4f 50 45 4e 4f 55 54 0a 26 42 30 20 |E - OPENOUT.&B0 | 00000d80 2d 20 50 4f 49 4e 54 28 20 20 20 20 20 20 20 20 |- POINT( | 00000d90 20 20 20 20 20 26 42 31 20 2d 20 50 4f 53 20 20 | &B1 - POS | 00000da0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 26 42 | &B| 00000db0 41 20 2d 20 55 53 52 0a 26 42 45 20 2d 20 47 45 |A - USR.&BE - GE| 00000dc0 54 24 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |T$ | 00000dd0 20 26 42 46 20 2d 20 49 4e 4b 45 59 24 20 20 20 | &BF - INKEY$ | 00000de0 20 20 20 20 20 20 20 20 20 20 26 43 35 20 2d 20 | &C5 - | 00000df0 45 4f 46 0a 26 43 36 20 2d 20 41 55 54 4f 20 20 |EOF.&C6 - AUTO | 00000e00 20 20 20 20 20 20 20 20 20 20 20 20 20 26 43 37 | &C7| 00000e10 20 2d 20 44 45 4c 45 54 45 20 20 20 20 20 20 20 | - DELETE | 00000e20 20 20 20 20 20 20 26 43 38 20 2d 20 4c 4f 41 44 | &C8 - LOAD| 00000e30 0a 26 43 39 20 2d 20 4c 49 53 54 20 20 20 20 20 |.&C9 - LIST | 00000e40 20 20 20 20 20 20 20 20 20 20 26 43 41 20 2d 20 | &CA - | 00000e50 4e 45 57 20 20 20 20 20 20 20 20 20 20 20 20 20 |NEW | 00000e60 20 20 20 26 43 42 20 2d 20 4f 4c 44 0a 26 43 43 | &CB - OLD.&CC| 00000e70 20 2d 20 52 45 4e 55 4d 42 45 52 20 20 20 20 20 | - RENUMBER | 00000e80 20 20 20 20 20 20 26 43 44 20 2d 20 53 41 56 45 | &CD - SAVE| 00000e90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 26 | &| 00000ea0 43 46 20 2d 20 50 54 52 0a 26 44 30 20 2d 20 50 |CF - PTR.&D0 - P| 00000eb0 41 47 45 20 20 20 20 20 20 20 20 20 20 20 20 20 |AGE | 00000ec0 20 20 26 44 32 20 2d 20 4c 4f 4d 45 4d 20 20 20 | &D2 - LOMEM | 00000ed0 20 20 20 20 20 20 20 20 20 20 20 26 44 33 20 2d | &D3 -| 00000ee0 20 48 49 4d 45 4d 0a 26 44 34 20 2d 20 53 4f 55 | HIMEM.&D4 - SOU| 00000ef0 4e 44 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |ND | 00000f00 26 44 35 20 2d 20 42 50 55 54 20 20 20 20 20 20 |&D5 - BPUT | 00000f10 20 20 20 20 20 20 20 20 20 26 44 36 20 2d 20 43 | &D6 - C| 00000f20 41 4c 4c 0a 26 44 37 20 2d 20 43 48 41 49 4e 20 |ALL.&D7 - CHAIN | 00000f30 20 20 20 20 20 20 20 20 20 20 20 20 20 26 44 38 | &D8| 00000f40 20 2d 20 43 4c 45 41 52 20 20 20 20 20 20 20 20 | - CLEAR | 00000f50 20 20 20 20 20 20 26 44 39 20 2d 20 43 4c 4f 53 | &D9 - CLOS| 00000f60 45 0a 26 44 41 20 2d 20 43 4c 47 20 20 20 20 20 |E.&DA - CLG | 00000f70 20 20 20 20 20 20 20 20 20 20 20 26 44 43 20 2d | &DC -| 00000f80 20 44 41 54 41 20 20 20 20 20 20 20 20 20 20 20 | DATA | 00000f90 20 20 20 20 26 44 44 20 2d 20 44 45 46 0a 26 44 | &DD - DEF.&D| 00000fa0 46 20 2d 20 44 52 41 57 20 20 20 20 20 20 20 20 |F - DRAW | 00000fb0 20 20 20 20 20 20 20 26 45 31 20 2d 20 45 4e 44 | &E1 - END| 00000fc0 50 52 4f 43 20 20 20 20 20 20 20 20 20 20 20 20 |PROC | 00000fd0 26 45 32 20 2d 20 45 4e 56 45 4c 4f 50 45 0a 26 |&E2 - ENVELOPE.&| 00000fe0 45 34 20 2d 20 47 4f 53 55 42 20 20 20 20 20 20 |E4 - GOSUB | 00000ff0 20 20 20 20 20 20 20 20 26 45 35 20 2d 20 47 4f | &E5 - GO| 00001000 54 4f 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |TO | 00001010 20 26 45 36 20 2d 20 47 43 4f 4c 0a 26 45 37 20 | &E6 - GCOL.&E7 | 00001020 2d 20 49 46 20 20 20 20 20 20 20 20 20 20 20 20 |- IF | 00001030 20 20 20 20 20 26 45 38 20 2d 20 49 4e 50 55 54 | &E8 - INPUT| 00001040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 26 45 | &E| 00001050 41 20 2d 20 4c 4f 43 41 4c 0a 26 45 42 20 2d 20 |A - LOCAL.&EB - | 00001060 4d 4f 44 45 20 20 20 20 20 20 20 20 20 20 20 20 |MODE | 00001070 20 20 20 26 45 43 20 2d 20 4d 4f 56 45 20 20 20 | &EC - MOVE | 00001080 20 20 20 20 20 20 20 20 20 20 20 20 26 45 45 20 | &EE | 00001090 2d 20 4f 4e 0a 26 45 46 20 2d 20 56 44 55 20 20 |- ON.&EF - VDU | 000010a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 26 46 | &F| 000010b0 30 20 2d 20 50 4c 4f 54 20 20 20 20 20 20 20 20 |0 - PLOT | 000010c0 20 20 20 20 20 20 20 26 46 32 20 2d 20 50 52 4f | &F2 - PRO| 000010d0 43 0a 26 46 33 20 2d 20 52 45 41 44 20 20 20 20 |C.&F3 - READ | 000010e0 20 20 20 20 20 20 20 20 20 20 20 26 46 35 20 2d | &F5 -| 000010f0 20 52 45 50 45 41 54 20 20 20 20 20 20 20 20 20 | REPEAT | 00001100 20 20 20 20 26 46 36 20 2d 20 52 45 50 4f 52 54 | &F6 - REPORT| 00001110 0a 26 46 37 20 2d 20 52 45 53 54 4f 52 45 20 20 |.&F7 - RESTORE | 00001120 20 20 20 20 20 20 20 20 20 20 26 46 38 20 2d 20 | &F8 - | 00001130 52 45 54 55 52 4e 20 20 20 20 20 20 20 20 20 20 |RETURN | 00001140 20 20 20 26 46 39 20 2d 20 52 55 4e 0a 26 46 42 | &F9 - RUN.&FB| 00001150 20 2d 20 43 4f 4c 4f 55 52 20 6f 72 20 43 4f 4c | - COLOUR or COL| 00001160 4f 52 20 20 20 20 26 46 43 20 2d 20 54 52 41 43 |OR &FC - TRAC| 00001170 45 20 20 20 20 20 20 20 20 20 20 20 20 20 20 26 |E &| 00001180 46 44 20 2d 20 55 4e 54 49 4c 0a 26 46 46 20 2d |FD - UNTIL.&FF -| 00001190 20 4f 53 43 4c 49 0a 0a 53 69 6e 67 6c 65 20 6c | OSCLI..Single l| 000011a0 69 6e 65 20 73 74 61 74 65 6d 65 6e 74 73 20 6f |ine statements o| 000011b0 6e 6c 79 20 61 72 65 20 61 6c 6c 6f 77 65 64 2c |nly are allowed,| 000011c0 62 75 74 20 61 20 27 3a 27 20 77 69 6c 6c 20 62 |but a ':' will b| 000011d0 65 20 69 6e 74 65 72 70 72 65 74 74 65 64 20 61 |e interpretted a| 000011e0 73 20 61 20 52 45 4d 0a 0a 54 68 65 20 61 73 73 |s a REM..The ass| 000011f0 65 6d 62 6c 65 72 20 70 73 65 75 64 6f 20 6d 6e |embler pseudo mn| 00001200 65 6d 6f 6e 69 63 20 4f 50 54 20 69 73 20 75 73 |emonic OPT is us| 00001210 65 64 20 6f 6e 6c 79 20 74 6f 20 73 65 65 20 77 |ed only to see w| 00001220 68 65 74 68 65 72 20 6f 72 20 6e 6f 74 20 79 6f |hether or not yo| 00001230 75 20 77 61 6e 74 0a 74 68 65 20 63 6f 64 65 20 |u want.the code | 00001240 70 72 69 6e 74 69 6e 67 20 6f 75 74 20 6f 72 20 |printing out or | 00001250 6e 6f 74 2e 55 73 65 20 69 74 20 61 73 20 70 65 |not.Use it as pe| 00001260 72 20 6e 6f 72 6d 61 6c 20 61 73 20 66 75 74 75 |r normal as futu| 00001270 72 65 20 76 65 72 73 69 6f 6e 73 20 77 69 6c 6c |re versions will| 00001280 20 0a 73 75 70 70 6f 72 74 20 69 74 20 6d 6f 72 | .support it mor| 00001290 65 20 66 75 6c 6c 79 2e 0a 0a 53 70 61 63 65 73 |e fully...Spaces| 000012a0 20 41 52 45 20 73 74 72 69 70 70 65 64 20 66 72 | ARE stripped fr| 000012b0 6f 6d 20 6e 75 6d 65 72 69 63 61 6c 20 63 6f 6e |om numerical con| 000012c0 73 74 61 6e 74 73 2c 65 67 2e 0a 58 4f 52 4c 57 |stants,eg..XORLW| 000012d0 20 23 31 32 38 0a 58 4f 52 4c 57 20 23 20 20 20 | #128.XORLW # | 000012e0 20 31 20 32 20 38 20 20 20 20 20 20 20 20 41 52 | 1 2 8 AR| 000012f0 45 20 42 4f 54 48 20 45 51 55 49 56 41 4c 45 4e |E BOTH EQUIVALEN| 00001300 54 0a 0a 52 55 4e 69 6e 67 20 61 20 70 72 6f 67 |T..RUNing a prog| 00001310 72 61 6d 20 74 77 69 63 65 20 72 65 73 75 6c 74 |ram twice result| 00001320 73 20 69 6e 20 63 6f 72 72 75 70 74 20 63 6f 64 |s in corrupt cod| 00001330 65 0a 0a 54 68 65 20 46 4f 52 2e 2e 2e 4e 45 58 |e..The FOR...NEX| 00001340 54 20 73 74 61 63 6b 20 69 73 20 6f 6e 6c 79 20 |T stack is only | 00001350 31 20 64 65 65 70 2c 61 74 74 65 6d 70 74 69 6e |1 deep,attemptin| 00001360 67 20 74 6f 20 6e 65 73 74 20 46 4f 52 2e 2e 2e |g to nest FOR...| 00001370 4e 45 58 54 73 20 77 69 6c 6c 20 67 69 76 65 0a |NEXTs will give.| 00001380 74 68 65 20 65 72 72 6f 72 20 27 54 6f 6f 20 6d |the error 'Too m| 00001390 61 6e 79 20 46 4f 52 73 27 2e 41 6c 73 6f 2c 6e |any FORs'.Also,n| 000013a0 65 67 61 74 69 76 65 20 53 54 45 50 73 20 61 72 |egative STEPs ar| 000013b0 65 6e 27 74 20 68 61 6e 64 6c 65 64 2c 73 69 6e |en't handled,sin| 000013c0 63 65 20 46 4f 52 2e 2e 2e 4e 45 58 54 0a 69 73 |ce FOR...NEXT.is| 000013d0 20 6f 6e 6c 79 20 75 73 65 64 20 74 6f 20 73 65 | only used to se| 000013e0 74 20 27 4f 50 54 27 20 69 73 6e 27 74 20 69 74 |t 'OPT' isn't it| 000013f0 3f 0a 0a 45 72 72 6f 72 73 20 64 6f 6e 27 74 20 |?..Errors don't | 00001400 74 65 6c 6c 20 79 6f 75 20 45 52 4c 20 61 6e 20 |tell you ERL an | 00001410 64 6f 6e 27 74 20 73 65 74 20 45 52 52 20 6f 72 |don't set ERR or| 00001420 20 45 52 4c 2e 0a 0a 4e 6f 20 63 68 65 63 6b 20 | ERL...No check | 00001430 69 73 20 6d 61 64 65 20 74 6f 20 65 6e 73 75 72 |is made to ensur| 00001440 65 20 74 68 61 74 20 74 68 65 20 66 69 6c 65 20 |e that the file | 00001450 6e 75 6d 62 65 72 73 20 6f 72 20 6c 69 74 65 72 |numbers or liter| 00001460 61 6c 73 20 61 72 65 20 77 69 74 68 69 6e 20 72 |als are within r| 00001470 61 6e 67 65 0a 73 6f 20 74 68 61 74 3a 0a 58 4f |ange.so that:.XO| 00001480 52 4c 57 20 23 39 39 39 39 39 39 20 20 20 20 20 |RLW #999999 | 00001490 20 20 20 20 20 20 57 4f 4e 54 20 43 41 55 53 45 | WONT CAUSE| 000014a0 20 41 4e 20 45 52 52 4f 52 0a 4d 4f 56 46 20 39 | AN ERROR.MOVF 9| 000014b0 39 39 39 39 39 2c 57 20 20 20 20 20 20 20 20 20 |99999,W | 000014c0 20 20 57 4f 4e 54 20 43 41 55 53 45 20 41 4e 20 | WONT CAUSE AN | 000014d0 45 52 52 4f 52 |ERROR| 000014d5