Constants: 'T 1 Push "T" onto stack 'NIL 1 Push "NIL" onto stack '0 1 Push "0" onto stack '1 1 Push "1" onto stack 'UNBOUND 1 Push "Unbound" onto stack SIC 3 Push 2 byte positive integer onto stack SNIC 3 Push 2 byte negative integer onto stack PCONST 5 Push 4 byte pointer onto stack FCONST 5 Push 4 byte floating onto stack ICONST 5 Push 4 byte integer onto stack ATOMNBR 3? Push atom onto stack (The format of atoms needs to be defined.) Vars access: VAR0-15 1 Push Var i onto stack VARX 2 Push Var X onto stack VARX_ 2 Set Var X from stack VARX_^ 2 Set Var X from stack, pop stack VVARX 2 Push Var i onto stack, don't follow indirect VVARX_ 2 Set Var X from stack, don't follow indirect FVARX 2 Push Var i onto stack, UFN if unbound FVARX_ 2 Set Var i from stack, UFN if unbound GVARX 3? Push GVar onto stack GVARX_ 3? Set GVar from stack, do ref counts (The format of atoms needs to be defined.) BINDNIL.n.k 3 Bind Var k to k+n to "NIL" BINDUNB.n.k 3 Bind Var k to k+n to "UNBOUND" VAR0-7_NIL 1 Set Var i to NIL Jumps: JUMPk 1 JUMPX 2 JUMPXX 3 FJUMPk 1 FJUMPX 2 TJUMPk 1 TJUMPX 2 NFJUMPX 2 NTJUMPX 2 -No real changes. May want to separate forward and -backward jumping opcodes. May want to add some -short jumps that don't refill ibuf. Could add opcodes -that conditionally pop stack. Function Calls: FN0-6 5 Call function with k arguments FNL 5 Call function with list of arguments APPLYFN 1 Call function (name on stack) TAPPLYFN 1 Tail recursive call function (name on stack) CAPPLYFN 1 Closure call function (name, frame ptr on stack) RETURN 1 Return CONTEXTSWITC 1 Context Switch - ***TBD*** STKSCAN - 1 - - - EVAL - 1 - - - MYALINK - 1 - - - Memory Access: GETBASE getbase 3 'int DBse - GETFIELD getfield 4 'int DBse SB PUTBASE putbase 3 'int DBse - PUTFIELD putfield 4 'int DBse SB RPLPTR.n GETBASEBYTE PUTBASEBYTE ADDBASE -GetBase and GetBasePtr can be combined. Both will -work on full pointers. Same with Putbase and PutbasePtr -GetField and PutField will have to be 4 opcodes to -handle a 32 bit word size. Probably want an immeadiate -field extract opcode(s) that takes argument on stack. -The field descriptor can remain in the opcode(s). Binary Ops: PLUS binarith 1 - - '0 DIFFER binarith 1 - - '1 LOGAND binarith 1 - - '5 LOGOR binarith 1 - - '6 LOGXOR binarith 1 - - '7 TIMES binarith 1 - - '2 QUOTIENT binarith 1 - - '3 REMAINDER binarith 1 - - '4 GREATERP binarith 1 - - '10 LLSH1 monarith 1 - - '0 LRSH1 monarith 1 - - '1 LLSH8 monarith 1 - - '2 LRSH8 monarith 1 - - '3 COPY 1 POP 1 EQ 1 SWAP 1 NOP 1 SETTOS 2 SETTOSPOP 2 DTEST ? 3 LISTP NTYPEX TYPEP - May want to add some more here. CONS RPLCONS CAR CDR RPLACA RPLACD *** -These depend on cdr-coding mechanism. GCREF CREATECELL RECLAIMCELL GCSCAN1 GCSCAN2 -These depend on GC technique. BIN BLT BITBLT end(0,6080)(1,8096)(2,9888)(3,11488)(4,13728)(5,15168)\2b9B436b11B570b5B274b14B354b13B499b10B