Each comment in the table below means that in this place simple playing_the_template_parameter should be done.
<tt> is playing_the_parameter where the parameter name is tt.
Name | Register architecture | Stack architecture |
---|---|---|
/*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>] |
|
/*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...