1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-10-18 07:24:16 +00:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Steven Flintham 2017-09-08 16:35:32 +01:00
commit 91b960f263
3 changed files with 9 additions and 5 deletions

View File

@ -42,9 +42,9 @@ def tens(start)#0
pptr = @print pptr = @print
repeat repeat
print:hex(i)#0 print:hex(i)#0
print:str(" ") print:str(" ")#0
pptr=>dec(i)#0 pptr=>dec(i)#0
print:newln() print:newln()#0
i = i / 10 i = i / 10
until i == 0 until i == 0
end end
@ -138,7 +138,7 @@ puti((@array)=>4);putc(' ')
puti((@array)=>6);putc(' ') puti((@array)=>6);putc(' ')
puti((@array)=>8);putln puti((@array)=>8);putln
ptr = @main ptr = @main
ptr(@array:6) ptr(@array:6)#0
ptr = @array ptr = @array
puti((ptr):6) puti((ptr):6)
putln putln

View File

@ -495,7 +495,7 @@ void emit_lambdafunc(int tag, char *name, int cparams, t_opseq *lambda_seq)
{ {
emit_idfunc(tag, DEF_TYPE, name, 1); emit_idfunc(tag, DEF_TYPE, name, 1);
if (cparams) if (cparams)
printf("\t%s\t$58,$%02X,$%02X\t\t; ENTER\t%d,%d\n", DB, 0, cparams, 0, cparams); printf("\t%s\t$58,$%02X,$%02X\t\t; ENTER\t%d,%d\n", DB, cparams*2, cparams, cparams*2, cparams);
emit_seq(lambda_seq); emit_seq(lambda_seq);
emit_pending_seq(); emit_pending_seq();
if (cparams) if (cparams)

View File

@ -507,7 +507,7 @@ OPTBL: DW ZERO,ADD,SUB,MUL,DIV,MOD,INCR,DECR ; 00 02 04 06 08 0A 0C 0E
DW NOT,LOR,LAND,LA,LLA,CB,CW,CS ; 20 22 24 26 28 2A 2C 2E DW NOT,LOR,LAND,LA,LLA,CB,CW,CS ; 20 22 24 26 28 2A 2C 2E
DW DROP,DUP,PUSH,PULL,BRGT,BRLT,BREQ,BRNE ; 30 32 34 36 38 3A 3C 3E DW DROP,DUP,PUSH,PULL,BRGT,BRLT,BREQ,BRNE ; 30 32 34 36 38 3A 3C 3E
DW ISEQ,ISNE,ISGT,ISLT,ISGE,ISLE,BRFLS,BRTRU ; 40 42 44 46 48 4A 4C 4E DW ISEQ,ISNE,ISGT,ISLT,ISGE,ISLE,BRFLS,BRTRU ; 40 42 44 46 48 4A 4C 4E
DW BRNCH,IBRNCH,CALL,ICAL,ENTER,LEAVE,RET,??? ; 50 52 54 56 58 5A 5C 5E DW BRNCH,IBRNCH,CALL,ICAL,ENTER,LEAVE,RET,CFFB ; 50 52 54 56 58 5A 5C 5E
DW LB,LW,LLB,LLW,LAB,LAW,DLB,DLW ; 60 62 64 66 68 6A 6C 6E DW LB,LW,LLB,LLW,LAB,LAW,DLB,DLW ; 60 62 64 66 68 6A 6C 6E
DW SB,SW,SLB,SLW,SAB,SAW,DAB,DAW ; 70 72 74 76 78 7A 7C 7E DW SB,SW,SLB,SLW,SAB,SAW,DAB,DAW ; 70 72 74 76 78 7A 7C 7E
*/ */
@ -919,6 +919,10 @@ int main(int argc, char **argv)
stodci(*argv, dci); stodci(*argv, dci);
call(lookup_sym(dci)); call(lookup_sym(dci));
} }
if (esp != &eval_stack[EVAL_STACKSZ])
{
printf("Eval stack pointer mismatch at end of execution = %d.\n", EVAL_STACKSZ - (esp - eval_stack));
}
} }
return 0; return 0;
} }