From 4cc800cdfcd13028b23fe3f815571e4b1b204a3c Mon Sep 17 00:00:00 2001 From: superturbocat2001 Date: Thu, 24 Dec 2020 21:00:00 +0000 Subject: [PATCH] - Added TinyBasic to autobuild git-svn-id: svn://kolibrios.org@8471 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/Tupfile.lua | 3 +- data/common/develop/TinyBasic/TinyBasic | Bin 16885 -> 0 bytes .../develop/TinyBasic/TinyBasicManual.txt | 1540 ----------------- programs/develop/tinybasic/Tupfile.lua | 10 + 4 files changed, 12 insertions(+), 1541 deletions(-) delete mode 100644 data/common/develop/TinyBasic/TinyBasic delete mode 100644 data/common/develop/TinyBasic/TinyBasicManual.txt create mode 100644 programs/develop/tinybasic/Tupfile.lua diff --git a/data/Tupfile.lua b/data/Tupfile.lua index 1f92739f4c..604cad0884 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -191,7 +191,6 @@ extra_files = { {"kolibrios/develop/tcc/samples/clayer/", PROGS .. "/develop/ktcc/trunk/samples/clayer/*"}, {"kolibrios/develop/tcc/samples/net/", PROGS .. "/develop/ktcc/trunk/samples/net/*"}, {"kolibrios/develop/tcc/samples/tinygl/", PROGS .. "/develop/ktcc/trunk/samples/tinygl/*"}, - {"kolibrios/develop/TinyBasic/", "common/develop/TinyBasic/*"}, {"kolibrios/emul/", "common/emul/*"}, {"kolibrios/emul/dosbox/", "common/emul/DosBox/*"}, {"kolibrios/emul/e80/readme.txt", PROGS .. "/emulator/e80/trunk/readme.txt"}, @@ -686,6 +685,8 @@ end -- tup.getconfig('NO_MSVC') ~= 'full' if tup.getconfig('NO_TCC') ~= 'full' then tup.append_table(extra_files, { {"kolibrios/utils/thashview", PROGS .. "/other/TinyHashView/thashview"}, + {"kolibrios/develop/TinyBasic/", PROGS .. "/develop/tinybasic/TinyBasic"}, + {"kolibrios/develop/TinyBasic/", PROGS .. "/develop/tinybasic/TBuserMan.txt"}, }) end -- tup.getconfig('NO_TCC') ~= 'full' diff --git a/data/common/develop/TinyBasic/TinyBasic b/data/common/develop/TinyBasic/TinyBasic deleted file mode 100644 index 583711438a2a802f40967aa851e454782b992d1e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16885 zcmV(bK>oi=P(w>OOacHw00001Mv*2LLXK;4&x2a?GvlYrR#yzWX}PR$%evUQ4!^P{ zBb`_|t$lYWZ<$9;y_13Hb7)ks5e}4*Bt?4`?bvXu!{D%~`t`4(OTQ}fg56-aRdw(S z2Ei_W{p=)pc}oByX3RRAuk5D z`Ojh40cx?^+%jh0uGwTd#MY{;QM9I=JVJwAj-hmvbY_aqLp;Y8p45rQiJHc#dvle(u-?+1 zb4bqd^!M$D#4=TnI<+-sg&)9*sJ0f}peL1h)ePB2RN;9`r!0bm81J!O>2C9i^cJw@ z&)lB7>lEW^1d^^w)Nc+{2N+XAp z&;OyZ1_ktESqn|}!r?hdniiU`yaN7Bu0X#VtX-mZGxSK3UVvB>x4}8;o%$d$80tq& z1lBhiD@fPvNs)7a@B%fn^J9zWoIbZ+*GC3aztFd$@8Mt5QJ6F$x)CRRX^hMY-ooi= zJ+&Iuv`^w!V7%b>^KxSSFSvT`6HmcBG%=+baL&4n^9AfxqH44G z%_oko(yF`q*XJRJf>oj?Rue|DM~(nmcFPCC>Z?hs>}VO+0NaOQ=%j5JPL&BVV3vJO zGaR$_WwG;PC;F=&PR4Q5>(7KR-{eau3{rZ%(+Zg2dT`$Q8C&^-BxaM2ocB;{%B*qTgZomMCK=z+(}&wRwXN{pWHpQ7MvjWf~(BmYjCB+e2Xp}zjmdx6UMfE4G1`&jT3>sFLPC7ufrs4sRGgc&Xj0^>{A#c9r{Jx|9I6Jf_*hxySVn9BrbEZsY0K_hQ0er`3 zB)vf|xg!fvbi3nAX2ZyMN^%bGPCe6X85_R=uZ|(BYg85E5 zbs|VA@zcgz5j5xUVM(_HQC(IVGigLI? zUB`D>cB_lE`13(;@lcB!E@%i5=EoHovoiDlEt<6dZxWSyaC>(b$0M(wB1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#C|xPTit{Hrj!V6nbqxOV~=8!LnSEi)*pTPY=pjL3>hvFnf zQMdH+^O4{*M;XYm)_S{ob;r>MI@3ylHcn;dLJOc*hQ2gkU*cnH3K#kqMLk3jx#xdebUYbEWL%vZZzCAR!cb!pxh>U6HEN(A zUt(SaA4-x)*!w}Y>CLr83lukmsZ$@j`KlBax;~a3J7v6SB(2&ORACRi+X&I864WgW zUOvRTH(|n?Ntg*akUKIh@N$Tn^r;>0VvRButaaG6AVb*y$%CRXRJ76*3tZKhy#s?LUcWAf|fC*Jp8Yw{G6V;S?2A}Ae!NPo$~1D7?6Zk`galb&M;c6c2?J` zX2u6XGJchwtdaoT0rUY2{;?)B5_#R@1>BT6TylLcGTcwtaWZ~TeieSw0oa^l)cYU3 z=y8v3t(3`Hhb@WGS;;ikyH>K*On}316-MmG69gR11s6=!h;X%cWskoi zfFsebzOfhm3#f@QD3pKr-Fgj-z}zf;C93K`sa5a+x);~nYZoMLB=&bfcOw#-`g}7s zY^ZtbC7*OUzut$gAJ;?+eeZ;QmsD4*1nw5aN0g>p_UBSL)-W?=1`yz41ZgjdML{pX z!0nV&QDG@cwE9IyLkl1B$038k1}>zsEZvkH z90Pu_5wLevuV32x39?TUGE!Yw)ObzZw!@+BdO!<{_b139T{wQH_9;L0f`%Y!7e8FW zaaNGB^=W|(4P}nH7Jn{5}WiFT%Wjl|@RzSc9h1M4q*&gC(0 zwwe1sfGl|?`cmReAyt=96&SXqyAe&v)iwb4yr_!`EoHLots9j+1B|Q&I|cv%2A*-> At^fc4 diff --git a/data/common/develop/TinyBasic/TinyBasicManual.txt b/data/common/develop/TinyBasic/TinyBasicManual.txt deleted file mode 100644 index b9bfd992c7..0000000000 --- a/data/common/develop/TinyBasic/TinyBasicManual.txt +++ /dev/null @@ -1,1540 +0,0 @@ - - - - - - - - - - - - I T T Y B I T T Y C O M P U T E R S - - TINY BASIC User Manual - - - - - - - - Congratulations! You have received the first of what we hope -is a long line of low cost software for hobby computers. We are -operating on a low margin basis, and hope to make a profit on -volume. Please help us to stay in business by respecting the -Copyright notices on the software and documentation. - If you are in a hurry to try TINY BASIC, Appendix C will tell -you how to get on the air. Then come back and read the rest of this -manual --- most of it is useful information. - - The TINY BASIC interpreter program has been extensively tested -for errors ("bugs"), but it would be foolish to claim of any program -that it is guaranteed bug-free. This program does come with a -"Limited Warranty" in that any errors discovered will be corrected in -the first 90 days. Catastrophic bugs will be corrected by -automatically mailing out corrected versions to all direct mail -customers and local dealers. Minor bugs will be corrected by -request. In any case this warranty is limited to replacement of the -Program Tape and/or documentation, and no liability for consequential -damages is implied. - If you think you have found a bug, make a listing of the -program that demonstrates the bug, together with the run input and -output. Indicate on the listing what you think is wrong and what -version number you are running and your serial number (on the tape -leader). Mail this to: - - ITTY BITTY COMPUTERS - P.0. Box 6539 - San Jose, CA 95150 - -We will try to be responsive to your needs. - - ----------- -(C) Copyright 1976 by Tom Pittman. All rights reserved. - -"Itty Bitty" is a Trademark of the ITTY BITTY COMPUTERS Company. - - - 1 - - TINY BASIC was conceived by the dragons at the People's -Computer Company (PCC), a non-profit corporation in Menlo Park CA. -and its implementation defined by Dennis Allison and others in the -PCC newspaper and an offshoot newsletter. The implementation of this -program follows the philosophy defined there. The reader is referred -to PCC v.4 Nos 1-3 for a discussion of the inner workings of this -software. - In keeping with the "small is good" philosophy, TINY BASIC -employs the two level interpreter approach (with its consequent speed -cost) so that the whole system occupies only 2K of program memory -(exclusive of user program; some versions are slightly larger). -With 1K of additional RAM small but useful user programs (50 lines or -less) may be accommodated. A system with 4K of RAM can contain the -interpreter and about 100 lines of user program. - - TINY BASIC is offered in several versions for each processor. -One is designed to be used with an arbitrary operating system, and -executes out of low memory (e.g. 0100-08FF for the 6800). The other -versions are configured for unusual memory requirements of particular -operating systems. All are "clean" programs, in that they will -execute properly from protected memory (such as PROM). Direct -addressing is used for interpreter variables as much as possible, so -memory Page 00 is largely dedicated. In all cases the user programs -are placed at the end of that part of lower memory used by TINY, and -they may occupy all the remaining contiguous memory. Appendix D is a -a summary of the important low-memory addresses. - TINY BASIC is designed to be I/O independent, with all input -and output funneled through three jumps placed near the beginning of -the program. In the non-standard versions these are preset for the -particular operating system I/O, so the discussion to follow is -primarily concerned with the standard versions. For this -discussion, it is assumed that the interpreter begins at hex address -0100, though the remarks may be applied to other versions with an -appropriate offset. - Location 0106 is a JMP to a subroutine to read one ASCII -character from the console/terminal. Location 0109 is a JMP to a -subroutine to type or display one ASCII character on the -console/terminal. In both cases the character is in the A -accumulator, but the subroutine need not preserve the contents of the -other registers. It is assumed that the character input routine will -simultaneously display each character as it is input; if this is not -the case, the JMP instruction in location 0106 may be converted to a -JSR, so that each character input flows through the output subroutine -(which in this case must preserve A) before being fed to TINY. -Users with terminals using Baudot or some other non-ASCII code should -perform the character conversion in the Input and Output subroutines. -If your console is a CRT and/or you have no need to output or -display extra pad characters with each Carriage Return and Linefeed, -you may intercept these in the output routine to bypass their -display. Each input prompt by TINY is followed by an "X-ON" -character (ASCII DC1) with the sign bit set to 1 (all other -characters except rubout are output with the sign bit set to 0) so -these are also readily detected and deleted from the output stream. -Appendix C shows how to perform these tests. - A third subroutine provided by you is optional, and gives TINY - - - 2 - -a means to test for the BREAK condition in your system. Appendix C -shows how this subroutine may be implemented for different types of -I/O devices. If you choose to omit this subroutine, TINY will assume -that a BREAK condition never happens; to include it, simply replace -locations 010C-010E with a JMP to your subroutine, which returns with -the break condition recorded in the Carry flag (1 = BREAK, 0 = no -BREAK). The Break condition is used to interrupt program execution, -or to prematurely terminate a LIST operation. Tiny responds to the -Break condition any time in the LIST, or just before examining the -next statement in program execution. If a LIST statement included -within a program is aborted by the Break condition, the Break -condition must be held over to the next statement fetch (or repeated) -to stop program execution also. - All input to Tiny is buffered in a 72 character line, -terminated by a Carriage Return ("CR"). Excess characters are -ignored, as signaled by ringing the console/terminal bell. When the -CR is typed in, Tiny will echo it with a Linefeed, then proceed to -process the information in the line. If a typing error occurs during -the input of either a program line or data for an INPUT statement, -the erroneous characters may be deleted by "backspacing" over them -and retyping. If the entire line is in error, it may be canceled -(and thus ignored) by typing the "Cancel" key. The Backspace code is -located near the beginning of the program (location 010F), and is -set by default to "left-arrow" or ASCII Underline (shift-O on your -Teletype). To change this to the ASCII Standard Backspace code (or -anything else you choose), the contents of location 010F may be -changed to the desired code. Similarly the Cancel code is located at -memory address 0110, and is set by default to the ASCII Cancel code -(Control-X). Four characters which may not be used for line edits -(Backspace or Cancel) are DC3 (hex 13), LF (0A), NUL (00), and DEL -(FF). These codes are trapped by the TINY BASIC input routines -before line edits are tested. - When Tiny ends a line (either input or output), it types a CR, -two pad characters, a Linefeed, and one more pad character. The pad -character used is defined by the sign bit in location 0111, and is -set by default to the "Rubout" or Delete code (hex FF; Location 0111 -Bit 7 = 1) to minimize synchronization loss for bit-banger I/O -routines. The pad character may be changed to a Null (hex 00) by -setting the sign of location 0111 to 0. The remainder of this byte -defines the number of Pad characters between the CR and linefeed. -More than two pad characters may be required if large user programs -are to be loaded from tape (see comments on Tape Mode, below). - TINY BASIC has a provision for suppressing output (in -particular line prompts) when using paper tape for loading a program -or inputting data. This is activated by the occurrence of a Linefeed -in the input stream (note that the user normally has no cause to type -a Linefeed since it is echoed in response to each CR), and disables -all output (including program output) until the tape mode is -deactivated. This is especially useful in half-duplex I/O systems -such as that supported by Mikbug, since any output would interfere -with incoming tape data. The tape mode is turned off by the -occurrence of an X-OFF character (ASCII DC3, or Control-S) in the -input, by the termination of an executing program due to an error, or -after the execution of any statement or command which leaves Tiny in -the command mode. The tape mode may be disabled completely by -replacing the contents of memory location 0112 with a 00. - - 3 - - Memory location 0113 is of interest to those 6800 users with -extensive operating systems. Normally Tiny reserves 32 bytes of -stack space for use by the interpreter and I/O routines (including -interrupts). Up to half of these may be used by Tiny in normal -operation, leaving not more than 16 bytes on the stack for I/O. If -your system allows nested interrupts or uses much more than ten or -twelve stack bytes for any purpose, additional space must be -allocated on the stack. Location 0113 contains the reserve stack -space parameter used by Tiny, and is normally set to 32 (hex 20). If -your system requires more reserve, this value should be augmented -accordingly before attempting to run the interpreter. - All of these memory locations are summarized in Appendix D. -Note that there are no Input or Output instructions or interrupt -disables in the interpreter itself; aside from the routines provided -for your convenience (which you may connect or disconnect), your -system has complete control over the I/O and interrupt structure of -the TINY BASIC environment. - - TINY BASIC is designed to use all of the memory available to it -for user programs. This is done by scanning all the memory from the -beginning of the user program space (e.g. 0900 for the standard 6800 -version) for the end of contiguous memory. This then becomes the -user program space, and any previous contents may be obliterated. -If it is desired to preserve some part of this memory for machine -language subroutines or I/O routines, it will be necessary to omit -the memory scan initialization. This is facilitated in TINY BASIC by -the definition of two starting addresses. Location 0100 (or the -beginning of the interpreter) is the "Cold Start" entry point, and -makes no assumptions about the contents of memory, except that it is -available. Location 0103 is the "Warm Start" entry point, and -assumes that the upper and lower bounds of the user program memory -have been defined, and that the program space is correctly -formatted. The Warm Start does not destroy any TINY BASIC programs -in the program space, so it may be used to recover from catastrophic -failures. The lower bound is stored in locations 0020-0021 and the -upper bound is in locations 0022-0023. When using the Warm Start to -preserve memory, you should be sure these locations contain the -bounds of the user space. Also when using the Warm Start instead of -the Cold Start, the first command typed into TINY should be "CLEAR" -to properly format the program space. - - -STATEMENTS - - TINY BASIC is a subset of Dartmouth BASIC, with a few -extensions to adapt it to the microcomputer environment. Appendix B -contains a BNF definition of the language; the discussion here is -intended to enable you to use it. When TINY issues a line prompt (a -colon on the left margin) you may type in a statement with or without -a line number. If the line number is included, the entire line is -inserted into the user program space in line number sequence, without -further analysis. Any previously existing line with the same line -number is deleted or replaced by the new line. If the new line -consists of a line number only, it is considered a deletion, and -nothing is inserted. Blanks are not significant to TINY, so blanks - - - 4 - -imbedded in the line number are ignored; however, after the first -non-blank, non-numeric character in the line, all blanks are -preserved in memory. - The following are valid lines with line numbers! - - 123 PRINT "HELLO" - 456 G O T O 1 2 3 - 7 8 9 PRINT "THIS IS LINE # 789" - 123 - 32767 PRINT "THIS IS THE LARGEST LINE #" - 1PRINT"THIS, IS THE SMALLEST LINE #" - 10000 TINY BASIC DOES NOT CHECK - 10001 FOR EXECUTABLE STATEMENTS ON INSERTION. - - 0 Is not a valid line number. - - If the input line does not begin with a line number it is -executed directly, and must consist of one of the following statement -types: - - LET GOTO REM - IF...THEN GOSUB CLEAR - INPUT RETURN LIST - PRINT END RUN - - These statement types are discussed in more detail in the pages -to follow. - Note that all twelve statement types may be used in either the -Direct Execution mode (without a line number) or in a program -sequence (with a line number). Two of the statements (INPUT and RUN) -behave slightly differently in these two operating modes, but -otherwise each statement works the same in Direct Execution as within -a program. Obviously there is not much point in including such -statements as RUN or CLEAR in a program, but they are valid. -Similarly, a GOSUB statement executed directly, though valid, is -likely to result in an error stop when the corresponding RETURN -statement is executed. - - -EXPRESSIONS - - Many of these statement types involve the use of EXPRESSIONS. -An Expression is the combination of one or more NUMBERS or VARIABLES, -joined by OPERATORS, and possibly grouped by Parentheses. There are -four Operators: - + addition - - subtraction - * multiplication - / division -These are hierarchical, so that in an expression without parentheses, -multiplication and division are performed before addition and -subtraction. Similarly, sub-expressions within parentheses are -evaluated first. Otherwise evaluation proceeds from left to right. -Unary operators (+ and -) are allowed in front of an expression to -denote its sign. - - - 5 - - A Number is any sequence of decimal digits (0, 1, 2, ... 9), -denoting the decimal number so represented. Blanks have no -significance and may be imbedded within the number for readability if -desired, but commas are not allowed. All numbers are evaluated as -16-bit signed numbers, so numbers with five or more digits are -truncated modulo 65536, with values greater than 32767 being -considered negative. The following are some valid numbers (note -that the last two are equivalent to the first two in TINY): - - 0 - 100 - 10 000 - 1 2 3 4 - 32767 - 65536 - 65 636 - - A Variable is any Capital letter (A, B, ... Z). This variable -is assigned a fixed location in memory (two bytes, the address of -which is twice the ASCII representation of the variable name). It -may assume any value in the range, -32768 to +32767, as assigned to -it by a LET or INPUT statement. - The following are some examples of valid expressions: - A - 123 - 1+2-3 - B-14*C - (A+B)/(C+D) - -128/(-32768+(I*1)) - (((((Q))))) - - All expressions are evaluated as integers modulo 65536. Thus -an expression such as - N / P * P -may not evaluate to the same value as (N), and in fact this may be -put to use to determine if a variable is an exact multiple of some -number. TINY BASIC also makes no attempt to discover arithmetic -overflow conditions, except in the case of an attempt to divide by -zero (which results in an error stop). Thus all of the following -expressions evaluate to the same value: - -4096 - 15*4096 - 32768/8 - 30720+30720 - - TINY BASIC allows two intrinsic functions. These are: - RND (range) - USR (address,Xreg,Areg) -Either of these functions may be used anywhere an (expression) is -appropriate. - - - - - - - - 6 - -FUNCTIONS - - - RND (range) - - This function has as its value, a positive pseudo-random number -between zero and range-1, inclusive. If the range argument is zero -an error stop results. - - - - USR (address) - USR (address,Xreg) - USR (address,Xreg,Areg) - - This function is actually a machine-language subroutine call to -the address in the first argument. If the second argument is -included the index registers contain that value on entry to the -subroutine, with the most significant part in X. If the third -argument is included, the accumulators contain that value on entry to -the subroutine, with the least significant part in A. On exit, the -value in the Accumulators (for the 6800; A and Y for the 6502) -becomes the value of the function, with the least significant part in -A. All three arguments are evaluated as normal expressions. - It should be noted that machine language subroutine addresses -are 16-bit Binary numbers. TINY BASIC evaluates all expressions to -16-bit binary numbers, so any valid expression may be used to define -a subroutine address. However, most addresses are expressed in -hexadecimal whereas TINY BASIC only accepts numerical constants in -decimal. Thus to jump to a subroutine at hex address 40AF, you must -code USR(16559). Hex address FFB5 is similarly 65461 in decimal, -though the equivalent (-75) may be easier to use. - For your convenience two subroutines have been included in the -TINY BASIC interpreter to access memory. If S contains the address -of the beginning of the TINY BASIC interpreter (256 for standard -6800, 512 for standard 6502, etc.), then location S+20 (hex 0114) is -the entry point of a subroutine to read one byte from the memory -address in the index register, and location S+24 (hex 0118) is the -entry point of a subroutine to store one byte into memory. - Appendix E gives examples of the USR function. - - - - - - - - - - - - - - - - - - 7 - -STATEMENT TYPES - - - PRINT print-list - PR print-list - - This statement prints on the console/terminal the values of the -expressions and/or the contents of the strings in the print-list. -The print-list has the general form, - item,item... or item;item... -The items may be expressions or alphanumeric strings enclosed in -quotation marks (e.g. "STRING"). Expressions are evaluated and -printed as signed numbers; strings are printed as they occur in the -PRINT statement. When the items are separated by commas the printed -values are justified in columns of 8 characters wide; when semicolons -are used there is no separation between the printed items. Thus, - PRINT 1,2,3 -prints as - 1 2 3 -and - PRINT 1;2;3 -prints as - 123 -Commas and semicolons, strings and expressions may be mixed in one -PRINT statement at will. - If a PRINT statement ends with a comma or semicolon TINY BASIC -will not terminate the output line so that several PRINT statements -may print on the same output line, or an output message may be -printed on the same line as an input request (see INPUT). When the -PRINT statement does not end with a comma or semicolon the output is -terminated with a carriage return and linefeed (with their associated -pad characters). To aid in preparing data tapes for input to other -programs, a colon at the end of a print-list will output an "X-OFF" -control character just before the Carriage Return. - - Although the PRINT statement generates the output immediately -while scanning the statement line, output lines are limited to 125 -characters, with excess suppressed. - - While the Break key will not interrupt a PRINT statement in -progress, the Break condition will take effect at the end of the -current PRINT statement. - - The following are some examples of valid PRINT statements: - PRINT "A=";A,"B+C=";B+C - PR (one blank line) - PRI (prints the value of I) - PRINT 1,","Q*P;",",R/42: - - - - - - - - - - 8 - - INPUT input-list - - This statement checks to see if the current input line is -exhausted. If it is, a question mark is prompted with an X-ON -control character, and a new line is read in. Then or otherwise, the -input line is scanned for an expression which is evaluated. The -value thus derived is stored in the first variable in the input-list. -If there are more variables in the input-list the process is -repeated. In an executing program, several values may be input on a -single request by separating them with commas. If these values are -not used up in the current INPUT statement they are saved for -subsequent INPUT statements. The question mark is prompted only when -a new line of input values is required. Note that each line of input -values must be terminated by a carriage return. Since expressions -may be used as input values, any letter in the input line will be -interpreted as the value of that variable. Thus if a program sets -the value of A to 1, B to 2, and C to 3, and the following statement -occurs during execution: - INPUT X,Y,Z -and the user types in - A,C,B -the values entered into X, Y, and Z will be 1, 3, and 2, -respectively, just as if the numbers had been typed in. Note also -that blanks on the input line are ignored by TINY, and the commas are -required only for separation in cases of ambiguity. In the example -above - ACB -could have been typed in with the same results. However an input, -line typed in as - +1 -3 +6 0 -will be interpreted by TINY as a single value (=58) without commas -for separators. There is one anomaly in the expression input -capability: if in response to this INPUT, the user types, - RND+3 -TINY will stop on a bad function syntax error (the RND function must -be of the form, RND(x)); but if the user types, - RN,D+3 -the values in the variables R, N, and the expression (D+3) will be -input. This is because in the expression evaluator the intrinsic -function names are recognized before variables, as long as they are -correctly spelled. - - Due to the way TINY BASIC buffers its input lines, the INPUT -statement cannot be directly executed for more than one variable at a -time, and if the following statement is typed in without a line -number, - INPUT A,B,C -the value of B will be copied to A, and only one value (for C) will -be requested from the console/terminal. Similarly, the statement, - INPUT X,1,Y,2,Z,3 -will execute directly (loading X, Y, and Z with the values 1, 2, and -3), requesting no input, but with a line number in a program this -statement will produce an error stop after requesting one value. - - If the number of expressions in the input line does not match -the number of variables in the INPUT statement, the excess input is - - 9 - -saved for the next INPUT statement, or another prompt is issued for -more data. The user should note that misalignment in these -circumstances may result in incorrect program execution (the wrong -data to the wrong variables). If this is suspected, data entry may be -typed in one value at a time to observe its synchronization with -PRINT statements in the program. - There is no defined escape from an input request, but if an -invalid expression is typed (such as a period or a pair of commas) an -invalid expression error stop will occur. - - Because Tiny Basic does not allow arrays, about the only way to -process large volumes of data is through paper tape files. Each -input request prompt consists of a question mark followed by an X-ON -(ASCII DC1) control character to turn on an automatic paper tape -reader on the Teletype (if it is ready). A paper tape may be -prepared in advance with data separated by commas, and an X-OFF -(ASCII DC3 or Control-S) control character preceding the CR (a -Teletype will generally read at least one more character after the -X-OFF). In this way the tape will feed one line at a time, as -requested by the succession of INPUT statements. This tape may also -be prepared from a previous program output (see the PRINT -statement). - - - - - - LET var = expression - var = expression - - This statement assigns the value of the expression to the -variable (var). The long form of this statement (i.e. with the -keyword LET) executes slightly faster than the short form. The -following are valid LET statements: - - LET A = B+C - I = 0 - LET Q = RND (RND(33)+5) - - - - - - - - - - - - - - - - - - - - 10 - - GOTO expression - - The GOTO statement permits changes in the sequence of program -execution. Normally programs are executed in the numerical sequence -of the program line numbers, but the next statement to be executed -after a GOTO has the line number derived by the evaluation of the -expression in the GOTO statement. Note that this permits you to -compute the line number of the next statement on the basis of program -parameters during program execution. An error stop occurs if the -evaluation of the expression results in a number for which there is -no line. If a GOTO statement is executed directly, it has the same -effect as if it were the first line of a program, and the RUN -statement were typed in, that is, program execution begins from that -line number, even though it may not be the first in the program. -Thus a program may be continued where it left off after correcting -the cause of an error stop. The following are valid GOTO -statements: - GOTO 100 - GO TO 200+I*10 - G 0 T 0 X - - - - - - - GOSUB expression - - The GOSUB statement is like the GOTO statement, except that TINY -remembers the line number of the GOSUB statement, so that the next -occurrence of a RETURN statement will result in execution proceeding -from the statement following the GOSUB. Subroutines called by GOSUB -statements may be nested to any depth, limited only by the amount of -user program memory remaining. Note that a GOSUB directly executed -may result in an error stop at the corresponding RETURN. The -following are some examples of valid GOSUB statements: - GOSUB 100 - GO SUB 200+I*10 - - - - - - -RETURN - - The RETURN statement transfers execution control to the line -following the most recent unRETURNed GOSUB. If there is no matching -GOSUB an error stop occurs. - - - - - - - - - 11 - - IF expression rel expression THEN statement - IF expression rel expression statement - - The IF statement compares two expressions according to one of -six relational operators. If the relationship is True, the statement -is executed; if False, the associated statement is skipped. The six -relational operators are: - = equality - < less than - > greater than - <= less or equal (not greater) - >= greater or equal (not less) - <>, >< not equal (greater or less) - - The statement may be any valid TINY BASIC statement (including -another IF statement). The following are valid IF statements: - IF I>25 THEN PRINT "ERROR" - IF N/P*P=N GOTO 100 - IF 1=2 Then this is nonsense - IF RND (100) > 50 THEN IF I <> J INPUT Q,R - - - - - - - END - - The END statement must be the last executable statement in a -program. Failure to include an END statement will result in an error -stop after the last line of the program is executed. The END -statement may be used to terminate a program at any time, and there -may be as many END statements in a program as needed. The END -statement also clears out any saved GOSUB line numbers remaining, and -may be used for that purpose in the direct execution mode. - - - - - - - REM comments - - The REM statement permits comments to be interspersed in the -program. Its execution has no effect on program operation, except -for the time taken. - - - - - - - - - - - - 12 - - CLEAR - - The CLEAR statement formats the user program space, deleting -any previous programs. If included in a program (i.e. with a line -number) the program becomes suicidal when the statement is executed, -although no error results. If the Warm Start is used to initialize -the interpreter, this must be the first command given. - - - - RUN - RUN,expression-list - - The RUN statement is used to begin program execution at the -first (lowest) line number. If the RUN statement is directly -executed, it may be followed by a comma, followed by values to be -input when the program executes an INPUT statement. - If the RUN statement is included in a program with a line -number, its execution works like a GO TO first statement of the -program. - - - - LIST - LIST expression - LIST expression,expression - - The LIST statement causes part or all of the user program to be -listed. If no parameters are given, the whole program is listed. A -single expression parameter in evaluated to a line number which, if -it exists, is listed. If both expression parameters are given, all -of the lines with line numbers between the two values (inclusive) are -listed. If the last expression in the LIST statement evaluates to a -number for which there is no line, the next line above that number -which does exist (if any) is listed as the last line. Zero is not a -valid line number, and an error stop will occur if one of the -expressions evaluates to zero. A LIST statement may be included as -part of the program, which may be used for printing large text -strings such as instructions to the operator. A listing may be -terminated by the Break key. - If the terminal punch (or cassette recorder) is turned on for a -LIST operation, the tape may be saved to reload the program into TINY -at a later time. - The following are valid LIST statements: - LIST - LIST 75+25 (lists line 100) - LIST 100,200 - LIST 500,400 (lists nothing) - - - - - - - - - - 13 - - A P P E N D I X A - - ERROR MESSAGE SUMMARY - - -0 Break during execution -8 Memory overflow; line not inserted -9 Line number 0 not allowed -13 RUN with no program in memory -18 LET is missing a variable name -20 LET is missing an = -23 Improper syntax in LET -25 LET is not followed by END -34 Improper syntax in GOTO -37 No line to GO TO -39 Misspelled GOTO -40,41 Misspelled GOSUB -46 GOSUB subroutine does not exist -59 PRINT not followed by END -62 Missing close quote in PRINT string -73 Colon in PRINT is not at end of statement -75 PRINT not followed by END -95 IF not followed by END -104 INPUT syntax bad - expects variable name -123 INPUT syntax bad - expects comma -124 INPUT not followed by END -132 RETURN syntax bad -133 RETURN has no matching GOSUB -134 GOSUB not followed by END -139 END syntax bad -154 Can't LIST line number 0 -164 LIST syntax error - expects comma -183 REM not followed by END -184 Missing statement type keyword -186 Misspelled statement type keyword -188 Memory overflow: too many GOSUB's ... -211 ... or expression too complex -224 Divide by 0 -226 Memory overflow -232 Expression too complex ... -233 ... using RND ... -234 ... in direct evaluation; -253 ... simplify the expression -259 RND (0) not allowed -266 Expression too complex ... -267 ... for RND -275 USR expects "(" before arguments -284 USR expects ")" after arguments -287 Expression too complex ... -288 ... for USR -290 Expression too complex -293 Syntax error in expression - expects value -296 Syntax error - expects ")" -298 Memory overflow (in USR) -303 Expression too complex (in USR) - - - 14 - -304 Memory overflow (in function evaluation) -306 Syntax error - expects "(" for function arguments -330 IF syntax error - expects relation operator - - Other error message numbers may possibly occur if the -interpreter is malfunctioning. If this happens, check the program in -memory, or reload it, and try again. - - Error number 184 may also occur if TINY BASIC is incorrectly -interfaced to the keyboard input routines. A memory dump of the -input line buffer may disclose this kind of irregularity. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 15 - - A P P E N D I X B - - FORMAL DEFINITION OF TINY BASIC - - -line ::= number statement CR - statement CR -statement ::= PRINT printlist - PR printlist - INPUT varlist - LET var = expression - var = expression - GOTO expression - GOSUB expression - RETURN - IF expression relop expression THEN statement - IF expression relop expression statement - REM commentstring - CLEAR - RUN - RUN exprlist - LIST - LIST exprlist -printlist ::= - printitem - printitem : - printitem separator printlist -printitem ::= expression - "characterstring" -varlist ::= var - var , varlist -exprlist ::= expression - expression , exprlist -expression ::= unsignedexpr - + unsignedexpr - - unsignedexpr -unsignedexpr ::= term - term + unsignedexpr - term - unsignedexpr -term ::= factor - factor * term - factor / term -factor ::= var - number - ( expression ) - function -function ::= RND ( expression ) - USR ( exprlist ) -number ::= digit - digit number -separator ::= , ! ; -var ::= A ! B ! ... ! Y ! Z -digit ::= 0 ! 1 2 ! ... ! 9 -relop ::= < ! > ! = ! <= ! >= ! <> ! >< - - - - 16 - - - A P P E N D I X C - - IMPLEMENTING I/O ROUTINES - -COSMAC - -COSMAC TINY occupies the same space as 6800 TINY -- 0100-08FF. -Similarly, the general parameters occupy 0020-00B7, as defined in -the manual. However, COSMAC TINY also uses locations 0011-001F to -contain copies of interpreter parameters and other run-time data; do -not attempt to use these locations while running TINY. - -Like all Itty Bitty Computer software, COSMAC TINY contains no I/O -instructions (nor references to Q or EF1-4), no interrupt enables or -disables, and no references to an operating system. The three jumps -(LBR instructions) at 0106, 0109, and 010C provide all necessary -I/O, as defined in the manual. If you are using UT3 or UT4, you may -insert the following LBR instructions, which jump to the necessary -interface routines: - - .. LINKS TO UT3/4 - 0106 C0076F LBR UTIN - 0109 C00776 LBR UTOUT - 010C C00766 LBR UTBRK - -If you are not using the RCA monitor, you must write your own I/O -routines. For this the standard subroutine call and return linkages -are used, except that D is preserved through calls and returns by -storing it in RF.1. Registers R2-RB and RD contain essential -interpreter data, and if the I/O routines make any use of any of -them they should be saved and restored. Note however, that R2-R6 -are defined in the customary way and may be used to nest subroutine -calls if needed. R0, R1, RC, RE and RF are available for use by the -I/O routines, as is memory under R2. Both the call and return -linkages modify X and the I/O data character is passed in the -accumulator ("D", not RD). - -After connecting TINY to the I/O routines, start the processor at -0100 (the Cold Start). Do not attempt to use the Warm Start without -entering the Cold Start at least once to set up memory from -0011-0023. Any register may be serving as program counter when -entering either the Cold Start or the Warm Start. - -The USR function works the same way as described in the manual, -except that the second argument in the call is loaded into R8, and -the third argument is loaded into RA with the least significant -byte also in the Accumulator. On return RA.1 and the accumulator -contain the function value (RA.0 is ignored). The machine language -subroutine must exit by a SEP R5 instruction. USR machine language -subroutines may use R0, R1, R8, RA, RC-RF, so long as these do not -conflict with I/O routine assignments. TINY BASIC makes no internal -use of R0, R1, RC, or RE. - -RCA Corporation funded the development of COSMAC TINY BASIC, and it -is by RCA's permission that it is made available. - - 17 - If you do not have access to a monitor in ROM with ASCII I/O -built in, you will have to write your own I/O routines. Most likely -you have something connected to a parallel port for the keyboard -input; output may be some parallel port also, or you may want to -use the 1861 video display for a gross dot-matrix kind of text -display. For the moment, let's assume you have parallel ports, -Port C (N=1100) for input, and port 4 (N=0100) for output. Assume -also that EF4 controls both input and output. This is the situation -you would have if you took an ordinary ELF and used the hex input -and display with the single "input" button to step through the -characters. You need for this configuration, two routines, which -might look something like this: - 0106 C0 00E0 LBR KEYIN - 0109 C0 00E7 LBR DISPL - ... - 00E0 3FE0 KEYIN BN4 * - 00E2 E2 SEX 2 - 00E3 6C INP 4 - 00E4 37E4 B4 * - 00E6 68 LSKP - 00E7 3FE7 DISPL BN4 * - 00E9 E2 SEX 2 - 00EA 73 STXD - 00EB 52 STR 2 - 00EC 64 OUT 4 - 00ED 37ED B4 * - 00EF D5 SEP 5 - Of course if you have a keyboard on Port F you will change -the INP instruction to match; if the keyboard pulls EF3 down, then -you must change the first pair of BN4/B4 instructions to BN3/B3 -instructions and change the LSKP to a NOP (C4 or E2). If your -input comes from some device that already displayed the character -typed, then change the LSKP to a Return (D5). - Similarly, if the output is to a different port you must -change the OUT instruction to fit it, and the second pair of BN4/B4 -instructions to match the control line being used. Notice that -the LSKP instruction is only there to prevent your waiting on the -EF4 line twice for each keyin, and should be removed (changed to -a NOP) as soon as you connect up real input and output ports. - Many 1802 systems come equipped with a video output using -the 1861 chip. If you have this, you should get a copy of the -February and April 1979 issues of KILOBAUD MICROCOMPUTING (formerly -just KILOBAUD). I have a two-part article published in these two -issues which explains how to put text on the 1861 graphics display, -with particular emphasis on how to connect it to TINY BASIC. - So far I have not mentioned the Break test. If you leave -that part unchanged, Tiny will work just fine, but you cannot stop -a listing or a program that is getting too long. After you get -your keyboard and display connected up and working, you may want -to use EF4 (or some other flag) as a Break input. It is possible -to use the same flag for Break as for "input ready", if you want -Tiny to stop executing when you press a key on your keyboard (this -does not affect the INPUT instruction, which is obviously waiting -for that keyin). This code will do that: - 010C C000F0 LBR BRKT - ... - 00F0 FC00 BRKT ADI 0 - 00F2 3FF6 BN4 EXIT - 00F4 FF00 SMI 0 - 00F6 D5 EXIT SEP R5 - Notice that the only function of this routine is to set the -Carry (DF) when EF4 is true (low) and clear it otherwise. - - 18 - -KIM - - The Teletype I/O routines in the MOS Technology KIM system may -be used for the character input and output requirements of TINY BASIC -6502. The following break routine is included in Tiny to test the -serial data line at 1740; Since TINY BASIC 6502 does not use the -lower part of memory page 01, the break test routine is ORG'ed to -execute in that space: - - ; BREAK TEST FOR KIM -0100 AD4017 KIMBT LDA KTTY LOOK AT TTY -0103 18 CLC C=O IF IDLE -0104 300E BMI KIMX IDLE -0106 AD4017 LDA KTTY WAIT FOR END -0109 10FB BPL *-3 -010B 200E01 KLDY JSR *+3 -010E A9FF LDA #255 DELAY 2 RUBOUT TIMES -0110 20A01E JSR OUTCH -0113 38 SEC C=1 IF BREAK -0114 60 KIMX RTS - - To run TINY BASIC 6502 load the paper tape into your Teletype -reader, type "L", and turn on the reader. Then key in the following -Jumps: - - ; JUMPS TO KIM -0206 4C5A1E JMP GETCH CHARACTER INPUT -0209 4CA01E JMP OUTCH CHARACTER OUTPUT -020C 4C0001 JMP KIMBT BREAK TEST - - It is recommended that you save a copy of memory on tape -(0100-0114 and 0200-0AFF) before going any further. Or you may -prefer to save it on audio cassette. Set up the starting address for -Tiny at 0200, and type "G". - Because of the awkwardness of putting memory in the 4K gap left -in the KIM-1 system, an alternate version is available which executes -out of 2000-28FF. For this version the Cold Start is at 2000 and -other addresses are at 200x instead of 020x (cf. 010x in Appendix D). - - -JOLT or TIM - - JOLT systems may not always have memory loaded in the space -from 0200 on up, so a special version has been prepared in which the -interpreter resides in the space 1000-18FF. This is the only -difference between the JOLT version and the KIM version, so if your -JOLT or TIM system has contiguous memory from Page 00 you may prefer -to use the KIM version to gain the extra memory space. Since the -serial data in the JOLT/TIM systems is not the same as KIM, a special -break test routine has also been provided for those systems: - - ; JOLT BREAK TEST -0115 A901 JOLBT LDA #1 LOOK AT TTY -0117 2C026E BIT JTTY -011A 18 CLC C=0 IF IDLE - - - 19 - -011B F00E BEQ JOLTX IDLE -011D 2C026E BIT JTTY WAIT FOR END -0120 D0FB BNE *-3 -0122 202501 JSR *+3 DELAY TWO CH TIMES -0125 A9FF LDA #255 -0127 20C672 JSR WRT -012A 38 SEC C=1 = BREAK -012B 60 JOLTX RTS - - To run, load the paper tape into your Teletype reader and type -"LH". Then key in the following Jumps: - - ; JUMPS TO JOLT/TIM -1006 4CE972 JMP RDT CHARACTER INPUT -1009 4CC672 JMP WRT CHARACTER OUTPUT -100C 4C1501 JMP JOLBT BREAK TEST - - As with other versions, the Cold start is the beginning of the -program (1000). - - - -MIKBUG - - Systems that use MIKBUG (TM Motorola) for console I/O may use -the I/O routines in MIKBUG. The following break routine is provided -in Tiny to test the PIA at 8004: - - * BREAK TEST FOR MIKBUG - -B68004 BREAK LDA A PIAA LOOK AT PIA -0C CLC C=0 IF NONE -2B0D BMI EXIT -B68004 LDA A PIAA -2AFB BPL *-3 WAIT FOR END -8D00 BSR *+2 -86FF LDA A #$FF DELAY ONE -BD0109 JSR TYPE CHARACTER TIME -0D SEC C=1 IF BREAK -39 EXIT RTS - - To run, load the paper tape into your Teletype reader and type -"L". Then key in the following Jumps: - - * JUMPS TO MIKBUG - ORG $0106 -0106 7EE1AC JMP $E1AC CHARACTER INPUT -0109 7EE1D1 JMP $E1D1 CHARACTER OUTPUT -010C 7E08FD JMP $08FD BREAK TEST - - It is recommended that you save a copy of memory on tape -(0100-08FF) before going any further. Set the starting address in -A048-A049 to 0100 and type "G". For your convenience the Cold Start -entry leaves the Warm start entry set up in the Mikbug stack, so that -after a reset a simple "G" command will result in a Warm start and -preserve the user programs. - - 20 - -OTHER - - For standard systems (and for special systems with I/O other -than that provided), subroutines must be supplied by the user to -interface TINY to the operator. For ACIA input or output the -following routines may be used, or they may serve as examples for -your coding (6800 opcodes are shown). They should be assembled for -your ACIA address, and in some memory location which is not -contiguous with the TINY BASIC user program memory (which may be -destroyed by the Cold Start). If nothing else is available, -locations 00D8-00FF are not used by Tiny and may be used for this -purpose. - - * - * ACIA I/O - * -B6XXXX BREAK LDA A ACIA -47 ASR A CHECK FOR TYPEIN -2406 BCC BRX NO, NOT BREAK -B6XXXY LDA A ACIA+1 GET IT -2601 BNE BRX NOT NULL IS BREAK -0C CLC IGNORE NULLS -39 BRX RTS -B6XXXX INPUT LDA A ACIA -47 ASR A -24FA BCC INPUT WAIT FOR A CHARACTER -B6XXXY LDA A ACIA+1 GET IT -36 OUTPUT PSH A SAVE CHARACTER -B6XXXX LDA A ACIA -8402 AND A #2 WAIT FOR READY -27F9 BEQ OUTPUT+1 -32 PUL A -B7XXXY STA A ACIA+1 OUTPUT CHARACTER -39 RTS - - Note that this routine will accept any non-null character -typein as a break. Alternatively we could look at the Framing Error -status, but if a character has been input this status will not show -up until that character is read in, rendering it ineffective in some -cases. Nulls are excepted as break characters since one or more of -them may follow the carriage return in an input tape, and still be -pending. Note that for this to work properly, the pad character -defined in location 0111 should be set to NULL (hex 00). - - The 6800 "R" version of TINY BASIC includes these routines in -the code, as shown here. Locations 08FA-08FC contain a JMP to the -break test at the beginning of this block. You should alter the ACIA -addresses to suit your system before using the subroutines. - - - - - - - - - - 21 - -CRT OR TVT - - If a TV Typewriter is used for I/O it may be desirable to -remove excess control characters from the output stream. All -controls except Carriage Return may be removed by the following -instructions at the beginning of the output subroutine (6800 opcodes -shown): - -39 RTS -810A OUTPUT CMP A #0A -2FFB BLE OUTPUT-1 - -Only nulls, Rubouts, X-ON and X-OFF may be deleted by changing the -CMP to a TST A. Nulls may be passed through by also changing the BLE -to a BMI. - - Some TV Typewriters do not scroll up when the cursor reaches -the bottom of the screen, but rather wrap the cursor around to the -top of the screen, writing over the previously displayed data. With -this kind of display it is essential that the I/O routines (or the -hardware) clear to the end of the line whenever a CR-LF is output, -so that previous data does not interfere with the new. If your I/O -routines are fixed in ROM, some sort of preprocessor may be required -to recognize output CR's and convert them to the appropriate sequence -of control functions. It may also be necessary to trap input CR's -(suppressing their echo) since Tiny generally responds with both -another CR and a linefeed. - - Some users prefer to concatenate all output into one "line" of -print, using the terminal comma or semicolon to suppress the line -breaks. Since TINY was designed to limit line lengths to less than -128 characters, if this sort of concatenation is attempted it will -appear that TINY has quit running. To eliminate the print -suppression the most significant two bits of the print control byte -(location 00BF in most versions) may be cleared to zero periodically -with the USR function or in the output driver routine. The least -significant three bits of this same byte are used for the "comma -spacing" in the PRINT statement, and should be left unaltered. - - - -CASSETTE I/O - - Officially, TINY only speaks to one peripheral--the console. -However a certain amount of file storage may be simulated by -attaching these peripherals (such as cassette systems) to the -character input and output routines. If the same electrical and -software interface is used this is very easy. Otherwise the I/O -drivers will require special routines to recognize control characters -in the input and output data for setting internal switches which -select one of several peripherals. The USR function may also be -used either to directly call I/O routines or to alter switches in -memory. - - - - - 22 - - - - - - A P P E N D I X D - - LOW MEMORY MAP - - -LOCATION SIGNIFICANCE --------- ------------ - -0000-000F Not used by any version of TINY -0011-001F COSMAC version temporaries -0020-0021 Lowest address of user program space -0022-0023 Highest address of program space -0024-0025 Program end + stack reserve -0026-0027 Top of GOSUB stack -0028-002F Interpreter parameters -0030-007F Input line buffer & Computation stack -0080-0081 Random Number Generator workspace -0082-0083 Variable "A" -0084-0085 Variable "B" -... ... -00B4-00B5 Variable "Z" -00B6-00C7 Interpreter temporaries -00B8 Start of User program (PROTO) -00C8-00D7 Sphere parameters (not 0020-002F) -00D8-00FF Unused by standard version - -0100 Cold Start entry point (6800) -0103 Warm Start entry point -0106-0108 JMP (or JSR) to character input -0109-010B JMP to character output -010C-010E JMP to Break test -010F Backspace code -0110 Line Cancel code -0111 Pad character -0112 Tape Mode Enable flag (hex 80 = enabled) -0113 Spare stack size -0114 Subroutine to read one Byte - from RAM to A (address in X) -0118 Subroutine to store A into RAM - at address in X - -0900 Beginning of User program (6800) - -Note that some of these addresses apply to the standard 6800 version. -For other versions addresses above 0100 should be read as addresses -above their respective starting address. - - - - - - - - 23 - - A P P E N D I X E - - AN EXAMPLE PROGRAM - - -10 REM DISPLAY 64 RANDOM NUMBERS < 100 ON 8 LINES -20 LET I=0 -30 PRINT RND (100), -40 LET I=I+1 -50 IF I/8*8=I THEN PRINT -60 IF I<64 THEN GOTO 30 -70 END - - -100 REM PRINT HEX MEMORY DUMP -109 REM INITIALIZE -110 A=-10 -120 B=-11 -130 C=-12 -140 D=-13 -150 E=-14 -160 F=-15 -170 X = -1 -175 O = 0 -180 LET S = 256 -190 REMARK: S IS BEGINNING OF TINY (IN DECIMAL) -200 REM GET (HEX) ADDRESSES -210 PRINT "DUMP: L,U"; -215 REM INPUT STARTING ADDRESS IN HEX -220 GOSUB 500 -230 L=N -235 REM INPUT ENDING ADDRESS IN HEX -240 GOSUB 500 -250 U=N -275 REM TYPE OUT ADDRESS -280 GOSUB 450 -290 REM GET MEMORY BYTE -300 LET N = USR (S+20,L) -305 REM CONVERT IT TO HEX -310 LET M = N/16 -320 LET N = N-M*16 -330 PRINT " "; -335 REM PRINT IT -340 GOSUB 400+M+M -350 GOSUB 400+N+N -355 REM END? -360 IF L=U GO TO 390 -365 L=L+1 -370 IF L/16*16 = L GOTO 280 -375 REM DO 16 BYTES PER LINE -380 GO TO 300 -390 PRINT -395 END -399 PRINT ONE HEX DIGIT -400 PRINT O; - - - 24 - -401 RETURN -402 PRINT 1; -403 RETURN -404 PRINT 2; -405 RETURN -406 PRINT 3; -407 RETURN -408 PRINT 4; -409 RETURN -410 PRINT 5; -411 RETURN -412 PRINT 6; -413 RETURN -414 PRINT 7; -415 RETURN -416 PRINT 8; -417 RETURN -418 PRINT 9; -419 RETURN -420 PRINT "A"; -421 RETURN -422 PRINT "B"; -423 RETURN -424 PRINT "C"; -425 RETURN -426 PRINT "D"; -427 RETURN -428 PRINT "E"; -429 RETURN -430 PRINT "F"; -431 RETURN -440 REM PRINT HEX ADDRESS -450 PRINT -455 REM CONVERT IT TO HEX -460 N = L/4096 -470 IF L<0 N=(L-32768)/4096+8 -480 GOSUB 400+N+N -483 LET N=(L-N*4096) -486 GOSUB 400+N/256*2 -490 GOSUB 400+(N-N/256*256)/16*2 -495 GOTO 400+(N-N/16*16)*2 -496 GOTO=GOSUB,RETURN -500 REM INPUT HEX NUMBER -501 REM FORMAT IS NNNNX -502 REM WHERE "N" IS ANY HEX DIGIT -505 N=0 -509 REM INPUT LETTER OR STRING OF DIGITS -510 INPUT R -520 IF R=X RETURN -525 REM CHECK FOR ERROR -530 IF R>9999 THEN PRINT "BAD HEX ADDRESS -531 REM NOTE ERROR STOP ON LINE 530 (ON PURPOSE!) -535 REM CONVERT INPUT DECIMAL DIGITS TO HEX -540 IF R>999 THEN N=N*16 -545 IF R>99 THEN N=N*16 -550 IF R>9 THEN N=N*16 - - 25 - -555 IF R>0 THEN R=R+R/1000*1536+R/100*96+R/10*6 -559 REM PICK UP NON-DECIMAL DIGIT LETTERS -560 IF R<0 THEN LET R=-R -565 REM ADD NEW DIGIT TO PREVIOUS NUMBER -570 LET N=N*16+R -580 GOTO 510 -590 NOTE: DON'T NEED END HERE - - -1000 TO RUN RANDOM NUMBER PROGRAM, TYPE "RUN" -1010 IT WILL TYPE 8 LINES THEN STOP. -1020 TO RUN HEX DUMP PROGRAM TYPE "GOTO 100" -1030 IT WILL ASK FOR INPUT, TYPE 2 HEX ADDRESSES -1040 EACH TERMINATED BY THE LETTER X, -1050 AND SEPARATED BY A COMMA -1055 (TYPE ALL ZEROS AS LETTER OH). -1060 THE PROGRAM WILL DUMP MEMORY BETWEEN -1070 THOSE TWO ADDRESSES, INCLUSIVE. -1080 EXAMPLE: -1090 :GOTO 100 -1100 DUMP: L,U? AO3EX,AO46X -1110 A03E EE FF -1120 A040 00 11 22 33 44 55 66 -1130 IF THE RANDOM NUMBER PROGRAM -1140 IS REMOVED, OR IF YOU TYPE IN -1150 :1 GOTO 100 -1160 THEN YOU CAN GET THE SAME DUMP BY TYPING -1170 :RUN,AO3EX,AO46X -1180 . -1190 NOTE THAT THIS PROGRAM DEMONSTRATES NEARLY -1200 EVERY FEATURE AVAILABLE IN TINY BASIC. - - - -REMARK: TO FIND OUT HOW MUCH PROGRAM SPACE -REM... YOU HAVE LEFT, TYPE: -LET I=0 -1 LET I=I+2 -2 GOSUB 1 -RUN -REMARK: AFTER A FEW SECONDS, THIS WILL STOP -REM... WITH AN ERROR; THEN TYPE: -END -PRINT "THERE ARE ";I;" BYTES LEFT" - - -REM: TO EXIT FROM TINY BASIC TO YOUR MONITOR/DEBUGGER, -LET S=256 -REM (S AS IN LINE 180 ABOVE) -LET B=0 -IF P=6800 THEN LET B=63 -REM: B IS SWI OR BRK INSTRUCTION -LET A = USR (S+24,0,B) + USR (0) -REM: THE FIRST CALL STORES A BREAK IN 0000 -REM... THE SECOND CALL JUMPS TO IT. - - - 26 \ No newline at end of file diff --git a/programs/develop/tinybasic/Tupfile.lua b/programs/develop/tinybasic/Tupfile.lua new file mode 100644 index 0000000000..4a0221d09c --- /dev/null +++ b/programs/develop/tinybasic/Tupfile.lua @@ -0,0 +1,10 @@ +if tup.getconfig("NO_TCC") ~= "" then return end + +TCC="kos32-tcc" + +CFLAGS = "-I../ktcc/trunk/libc/include" +LDFLAGS = "-nostdlib ../ktcc/trunk/bin/lib/start.o -L../ktcc/trunk/bin/lib" +LIBS = "-lck" + +COMMAND=string.format("%s %s %s %s %s ", TCC, CFLAGS, "%f -o %o", LDFLAGS, LIBS) +tup.rule("TinyBasic.c", COMMAND .. tup.getconfig("KPACK_CMD"), "TinyBasic")