メインコンテンツまでスキップ

V. 命令セット

演算子の記憶コードと意味は次のとおりである。

種別記憶コード意味
it/id refLD <num>リテラルまたは識別子の参照 -> TOS
int constIC <num>小さな 2 の補数整数定数 -> TOS
addressAD <num>アドレス -> TOS
null parameterNULLterm の属性が欠落している
addADDTOS = x,y、x + y -> TOS
subtractSUBTOS = x,y、x - y -> TOS
multiplyMULTOS = x,y、x * y -> TOS
divideDIVTOS = x,y、x/y -> TOS
concatenateCONTOS = x,y、x||y -> TOS
unary minusUNINTOS = x、-x -> TOS
load id valueLIVTOS = LD x、V(LD x) -> TOS
load id lengthLILTOS = LD x、V(LD x) -> TOS
load id typeLITTOS = LD x、V(LD x) -> TOS
look up labelLVLTOS = x、AD x -> TOS
stoSTOTOS = x,y、y -> x
returnRETTOS = x、`x を伴って呼び出し元へ返す
branch trueBTTOS = AD x、AD x -> 命令カウンタ
branch falseBFTOS = AD x、AD x -> 命令カウンタ
branchBUTOS = AD x、AD x -> 命令カウンタ
compare equalCEQTOS = x,y、(y.EQ.x) -> TRUE/FALSE フラグ
compare not equalCNETOS = x,y、(y.NE.x) -> T/FF
compare <=CLETOS = x,y、(y.LE.x) -> T/FF
call outputOUTTOS = r,t,v,l、(r,t,v,l) -> 出力
call inputIN(INC = 比較、INN = 比較なし)TOS = r,t,v,l、(r,t,v,l) -> TOS
current -> initialSCIPCIP -> IIP(現在の入力ポインタを初期入力ポインタへ保存)
initial -> currentSICPIIP -> CIP(初期入力ポインタを現在の入力ポインタへ保存)