Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sail / sh / express
1 ;
2 ; express.sh
3 ;
4 ; Evaluation of BASIC expressions
5 ;
6 ; © 1995 Straylight
7 ;
8
9 ;----- Overview -------------------------------------------------------------
10 ;
11 ; Functions provided:
12 ;
13 ; express_pop
14 ; express_popTwo
15 ; express_push
16 ; express_fnCont
17 ; express_read
18
19 [ :LNOT::DEF:express__dfn
20 GBLL express__dfn
21
22 ; --- express_pop ---
23 ;
24 ; On entry: --
25 ;
26 ; On exit: R0,R1 == value popped off
27 ;
28 ; Use: Pops a value from the stack.
29
30 IMPORT express_pop
31
32 ; --- express_popTwo ---
33 ;
34 ; On entry: --
35 ;
36 ; On exit: R0-R3 == two values popped from the stack
37 ;
38 ; Use: Pops two values from the stack.
39
40 IMPORT express_popTwo
41
42 ; --- express_push ---
43 ;
44 ; On entry: R0,R1 == l/rvalue to push
45 ;
46 ; On exit: --
47 ;
48 ; Use: Pushes a value onto the expression stack.
49
50 IMPORT express_push
51
52 ; --- express_fnCont ---
53 ;
54 ; On entry: Involved
55 ;
56 ; On exit: Similarly involved.
57 ;
58 ; Use: We continue here after executing a function.
59
60 IMPORT express_fnCont
61
62 ; --- express_read ---
63 ;
64 ; On entry: R0 == 1 to read an lvalue, 2 to read ident, 0 otherwise
65 ; R7, R8, R9 == lookahead token
66 ; R10 == pointer into tokenised buffer
67 ; R11 == evaluation stack pointer
68 ; R12 == anchor pointer
69 ;
70 ; On exit: R0,R1 == value of expression
71 ; R7, R8, R9 == lookahead token
72 ; R0, R1 == result of expression
73 ; R10 == moved on to first char after expression
74 ;
75 ; Use: Reads an expression for the current position in the
76 ; tokenised file.
77
78 IMPORT express_read
79
80 ]
81
82 ;----- That's all, folks ----------------------------------------------------
83
84 END