Initial revision
[ssr] / StraySrc / Libraries / BAS / src / sh / basTalk
1 ;
2 ; basTalk.sh
3 ;
4 ; Interface to BASIC's weird routines
5 ;
6 ; © 1994-1998 Straylight
7 ;
8
9 ;----- Licensing note -------------------------------------------------------
10 ;
11 ; This file is part of Straylight's BASIC Assembler Supplement.
12 ;
13 ; BAS is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
16 ; any later version.
17 ;
18 ; BAS is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
22 ;
23 ; You should have received a copy of the GNU General Public License
24 ; along with BAS. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27 ;----- Overview -------------------------------------------------------------
28 ;
29 ; Functions provided:
30 ;
31 ; bTalk_lvblnk
32 ; bTalk_create
33 ; bTalk_store
34 ; bTalk_load
35 ; bTalk_eval
36 ; bTalk_match
37
38 [ :LNOT::DEF:basTalk__dfn
39 GBLL basTalk__dfn
40
41 ; --- bTalk_lvblnk ---
42 ;
43 ; On entry: R0 == pointer to variable name to find (not tokenised)
44 ;
45 ; On exit: R0 == address of lvalue
46 ; R1 == type of lvalue
47 ;
48 ; Use: Tries to locate the given BASIC variable.
49
50 IMPORT bTalk_lvblnk
51
52 ; --- bTalk_create ---
53 ;
54 ; On entry: R0 == pointer to name of variable
55 ;
56 ; On exit: R0 == address of variable lvalue
57 ; R1 == type of variable created
58 ;
59 ; Use: Creates a variable, if it doesn't already exist. Otherwise
60 ; a pointer to the existing variable is returned.
61
62 IMPORT bTalk_create
63
64 ; --- bTalk_store ---
65 ;
66 ; On entry: R0 == lvalue in which to store
67 ; R1 == type of lvalue
68 ; R2 == (integer) value to store
69 ;
70 ; On exit: --
71 ;
72 ; Use: Stores an integer value in a BASIC variable. The value is
73 ; converted to floating point if required (without loss of
74 ; precision).
75
76 IMPORT bTalk_store
77
78 ; --- bTalk_load ---
79 ;
80 ; On entry: R0 == address of lvalue
81 ; R1 == type of lvalue
82 ;
83 ; On exit: R2 == integer value of lvalue
84 ;
85 ; Use: Loads an integer variable from an lvalue.
86
87 IMPORT bTalk_load
88
89 ; --- bTalk_eval ---
90 ;
91 ; On entry: R1 == pointer to a control-terminated string
92 ;
93 ; On exit: R0 == value of expression
94 ;
95 ; Use: Evaluates a BASIC expression.
96
97 IMPORT bTalk_eval
98
99 ; --- bTalk_match ---
100 ;
101 ; On entry: R1 == ctrl terminated string
102 ; R2 == destination pointer
103 ;
104 ; On exit: --
105 ;
106 ; Use: Tokenises the given sting, and puts the result in the
107 ; destination buffer given.
108
109 IMPORT bTalk_match
110
111 ]
112
113 ;----- That's all, folks ----------------------------------------------------
114
115 END