Mercurial > hg > Members > kono > os9 > sbc09
comparison basic/basic.txt @ 57:2088fd998865
sbc09 directry clean up
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 23 Jul 2018 16:07:12 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
56:4fa2bdb0c457 | 57:2088fd998865 |
---|---|
1 TINY BASIC SUMMARY | |
2 | |
3 Editing Standard Basic | |
4 | |
5 Direct Mode All Verbs Usable | |
6 | |
7 Statement Types | |
8 | |
9 PRINT Item List | |
10 LET Var = Expr (LET is optional) | |
11 IF Expr Relop Expr Statement | |
12 INPUT Variable List | |
13 GOTO Line Number | |
14 GOSUB Line Number | |
15 RETURN | |
16 POKE POKE(Expr) = Expr | |
17 STOP | |
18 LIST Line Number, Line Number (Line Numbers are optional) | |
19 RUN | |
20 NEW | |
21 | |
22 Functions | |
23 | |
24 USR Variable = USR(Expr,Expr) | |
25 PEEK Variable = PEEK(Expr) | |
26 MEM Variable = MEM | |
27 | |
28 Number Integers to _+32767 or Hex Integers preceded by a $ symbol | |
29 | |
30 Variable Letters A-Z | |
31 | |
32 Expression Variables, Numbers, and Functions combined with the following | |
33 operators +, -, *, /, (, ). | |
34 | |
35 Relop Comparison operators =, <, >, <=, >=, <>. | |
36 | |
37 Line Number Numbers 1 through 9999 | |
38 | |
39 String "ALPHANUMERICS" | |
40 | |
41 Item List Expressions and Strings seperated by format control | |
42 characters , and ;. | |
43 | |
44 Control Chars. Control H or "Back Space" deletes last input character. | |
45 Control X or "Cancel" deletes entire input line. | |
46 Control C Terminates Basic program or List operation and | |
47 returns control to command mode. | |
48 | |
49 Memory Usage Tiny Basic V1.37 | |
50 | |
51 $0080 - $009F Tiny Basic interpreter scratch area. | |
52 $00A0 - $00FD Not used by Tiny Basic interpreter. (usable USR routines) | |
53 $**** - $**** Pointer to Interrupt Vector Table. (Identical to LILBUG) | |
54 $D800 - $DFFF Input Buffer, Basic Program storage, Stack Space, and | |
55 Variables in RAM. | |
56 $**** - $**** Optional Power Up Basic Program and/or USR functions in ROM. | |
57 $E800 - $EFFF Tiny Basic interpreter ROM. | |
58 | |
59 $E800 Cold Start Address. | |
60 $E803 Warm Start Address. | |
61 | |
62 Tiny Basic USR Function | |
63 | |
64 The USR function in Tiny Basic takes 2 arguments and returns a value to a | |
65 variable. The form of the USR function is "LET V = USR(Expr,Expr)". | |
66 The USR function can be used in any expression in Tiny Basic as an example | |
67 "LET V = A * ( B + USR( $EF00, K))". The USR function can also be used with | |
68 the PRINT statement. | |
69 | |
70 The first argument of the USR function is evaluated to determine the address | |
71 or the machine language code to be called. The second argument is evaluated | |
72 and the value is send to the machine code routine in the D accumulator. The | |
73 second argument is optional, if it is present the Carry bit in the condition | |
74 code register will be cleared when the machine code routine is called. If the | |
75 second argument is not present the Carry Bit will be set when the machine code | |
76 is called. The machine code routine may return a result to the BASIC program | |
77 in the D accumulator, the value in the D accumulator on return from the machine | |
78 code routine will be used by the BASIC program as the value of the function. | |
79 | |
80 The machine code routine must execute a RTS instruction to return conterol to | |
81 the BASIC program. The machine code routine may use all the processor registers | |
82 freely and need not save and restore any registers. It is important that the | |
83 machine code routine not modify any memory used by the Tiny Basic interpreter. | |
84 Consult the memory map provided with your version of Tiny Basic to determine | |
85 which memory areas are not used. | |
86 | |
87 Tiny Basic handles interrupts with the same interrupt vectoring technique used | |
88 by LILBUG. Consult the LILBUG manual for details on interrupt vector usage. | |
89 | |
90 | |
91 | |
92 JPB 12-APR-82 |