MOV reg,value
ADD reg,value
SUB reg,value
MULT reg,value
SQRT reg
HALF reg
RAND reg,value
OUTPUT [type]
INPUT [type]
CMP reg,value
JMP label
COND [flag] label
AND reg,value
OR reg,value
NOT reg
BOOL reg
TEST reg
POINT reg,data
FETCH reg,value [spec]
APPEND reg,value [type]
PUSH reg
POP reg
CALL
RET
reg = "AX" | "BX" | "CX" | "DX"
flag = "!" | "=" | "<" | ">"
boolean = "true" | "false"
spec = "LETTER" | "UPPER" | "LOWER" | "DIGIT" | "WHITE" | "DQUOTE" | "ATOD" | "ANY" | "NONE" | text
type = "INTEGER" | "TEXT" | "CHARACTER" | "INTS" | "BOOLEAN" | "BINARY"
value = reg | integer | boolean
date = text | ints
integer ...
text ...
ints ...
; should type include "NONE"?
; should PUSH/POP include "NONE"?
; are these the only possible values?
; does HALF round down or towards zero
;defaults
OUTPUT [type] INTEGER
COND [flag] =
FETCH [spec] ANY
APPEND [type] TEXT
;flags
MOV no change
ADD = if zero, ! otherwise, < if negative, > if positive, ^ overflow
SUB = if reg eq value, ! otherwise, < if negative, > if positive, ^ overflow
MULT = if zero, ! otherwise, < if negative, > if positive, ^ overflow
SQRT = if zero, ! otherwise, < never, > is positive, ^ if imaginary
HALF = if zero, ! otherwise, < if negative, > if positive, ^ if value was odd
RAND ????
OUTPUT no change
INPUT no change
CMP same as SUB
JMP no change
COND no change
AND = if zero, ! otherwise, < if negative, > if positive, cannot overflow
OR = if zero, ! otherwise, < if negative, > if positive, cannot overflow
NOT = if zero, ! otherwise, < if negative, > if positive, cannot overflow
BOOL ????
TEST = if zero, ! otherwise
POINT no change
FETCH = if success, ! if failure
APPEND = if null lists, ! otherwise
PUSH ^ overflow
POP = if zero, ! otherwise, ^ underflow
CALL no change
RET no change
positive overflow ^<
negative overflow ^< ^=