Każdy komentarz w poniższej tabeli oznacza, że w tym miejscu należy wstawić zawartość odpowiedniego parametru szablonu.
Wstawianie zawartości szablonu wygląda tak: <tt>
, gdzie tt
jest nazwą parametru.
Nazwa | Architektura rejestrowa | Architektura stosowa |
| /*put the code leaving result of the right argument in the A register*/ PUSH A /*put the code leaving result of the left argument in the A register*/ POP B SUB A,B | /*put the code leaving result of the left argument on the stack*/ /*put the code leaving result of the right argument on the stack*/ SUB |
| MOV A,#<number> |
PUSH #<number> |
| DD <ID> | DD <ID> |
| MOV A,[<ID>] | PUSH [<ID>] |
| MOV [<ID>],A | POP [<ID>] |
The label must be unique for each if in the code! | /*put the code leaving results of the boolean expression in A and flags*/ JE label_else_xx /*put the then code*/ JMP label_endif_xx label_else_xx: /*put the else code*/ label_endif_xx: | /*put the code leaving results of the boolean expression on the stack*/ PUSH #label_else_xx JE /*put the then code*/ PUSH #label_endif_xx JMP label_else_xx: /*put the else code*/ label_endif_xx: |
to be continued…