chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sail / sh / interp
1 ;
2 ; interp.sh
3 ;
4 ; Main entry point for the interpreter
5 ;
6 ; © 1995 Straylight
7 ;
8
9 ;----- Overview -------------------------------------------------------------
10 ;
11 ; Functions provided:
12 ;
13 ;  interp_start
14 ;  interp_exec
15 ;  interp_notImpl
16 ;  interp_next
17
18                 [       :LNOT::DEF:interp__dfn
19                 GBLL    interp__dfn
20
21 ; --- interp_start ---
22 ;
23 ; On entry:     R12 == pointer to our anchor block
24 ;
25 ; On exit:      R7-R9 == next token
26 ;
27 ; Use:          Prepares for execution, and even does some too.
28
29                 IMPORT  interp_start
30
31 ; --- interp_exec ---
32 ;
33 ; On entry:     R7-R9 == token to deal with
34 ;               R11 == offset in file to execute from
35 ;               R12 == pointer to the anchor block
36 ;
37 ; On exit:      R0 == type code (eg. 0 == we are still executing
38 ;               R7-R9 == next token to deal with
39 ;
40 ; Use:          Executes some of the file.
41
42                 IMPORT  interp_exec
43
44 ; --- interp_notImpl ---
45
46                 IMPORT  interp_notImpl
47
48 ; --- interp_next ---
49 ;
50 ; On entry:     R7-R9 == token to deal with
51 ;               R11 == offset in file to execute from
52 ;               R12 == pointer to the anchor block
53 ;
54 ; On exit:      R0 == type code (eg. 0 == we are still executing
55 ;               R7-R9 == next token to deal with
56 ;
57 ; Use:          Checks the next instruction and acts approriately.
58
59                 IMPORT  interp_next
60
61                 ]
62
63 ;----- That's all, folks ----------------------------------------------------
64
65                 END