Free Hero Mesh

instruc at [b295172546]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

File instruc artifact aab337b9e7 part of check-in b295172546


; File with list of instruction opcodes
; Also other words used in the .class files

; This file is part of Free Hero Mesh and is public domain.

; Directions
(0000)
#+E
#+NE
#+N
#+NW
#+W
#+SW
#+S
#+SE
#+F
#+LF
#+L
#+LB
#+B
#+RB
#+R
#+RF

; Bit constants
#bit0 (0001)
#bit1 (0002)
#bit2 (0004)
#bit3 (0008)
#bit4 (0010)
#bit5 (0020)
#bit6 (0040)
#bit7 (0080)
(87E8)
bitconstant "bit8"
#bit9
#bit10
#bit11
#bit12
#bit13
#bit14
#bit15
#bit16
#bit17
#bit18
#bit19
#bit20
#bit21
#bit22
#bit23
#bit24
#bit25
#bit26
#bit27
#bit28
#bit29
#bit30
bitconstant_last "bit31"

; Animation constants
STOP (0000)
ONCE (0001)
LOOP (0002)
OSC (0008)
OSCLOOP (000A)

(8000)

; Stack ops
.drop "."
dup
swap
nip
tuck
rot
rotback "-rot"
pick
over

; Flow controls
-if
-else
-then
-begin
-again
-until
-while
-repeat
-for
-next
*goto
*CallSub
ret
-case
-or
-and

; Arithmetic
add "+"
sub "-"
,mul "*"
,div "/"
,mod
neg
,min
,max

; Bitwise
lsh
,rsh
band
bor
bxor
bnot
-bit

; Logical
land
lor
lxor
lnot

; Comparison
eq
eq2
ne
,gt
,lt
,ge
,le
is

; Type checks
qn "n?"
qc "c?"
qcz "cz?"
qm "m?"
qs "s?"
qo "o?"
qoz "oz?"
qa "a?"

; Standard variables
,Class
,=!Temperature
,=Shape
,Xloc
,Yloc
,=Dir
,=Image
,=!Inertia
,=!Distance
,=!Density
,=!Volume
,=!Weight
,=!Height
,=!Climb
,=!Strength
,=Hard
,=Sharp
,=ShapeDir
,=Shovable
,=!Misc1
,=!Misc2
,=!Misc3
,=!Misc4
,=!Misc5
,=!Misc6
,=!Misc7
,=Arrived
,=Departed
,=Arrivals
,=Departures
,=Busy
,=Invisible
,=KeyCleared
,=UserSignal
,=UserState
,=VisualOnly
,=Stealthy
,=Moved
,=Moving
,=Done
,Destroyed
,Player
,Compatible
,CollisionLayers
Self
Msg
From
=Arg1
=Arg2
=Arg3
MoveNumber
Level
Key
=Finished

; Class definitions
-Background ; used at top level only; not in a class
-CodePage ; used at top level only; not in a class
-Input
-Quiz
-InPlace
-DefaultImage
-Help
-EditorHelp
-Others
-SUBS

; Main operations / miscellaneous
Animate
AnimateDead
,Assassinate ; destroy without sending any messages
.Broadcast
BroadcastAnd ; Broadcast, but result is AND of return values
BroadcastAndEx
*BroadcastClass ; for (Broadcast [class])
.BroadcastEx ; broadcast with three arguments
BroadcastList ; Broadcast, pushing results to stack
BroadcastListEx
BroadcastSum ; Broadcast, but result is sum of return values
BroadcastSumEx
chain
,Chebyshev
,Coloc
.Create
Data
DelInventory
Delta
.,Destroy
FlushClass
,FlushObj
GetInventory
HeightAt
IgnoreKey
.,IntMove ; move without initializing Inertia
.,JumpTo
,Loc ; same as: Xloc Yloc
LocateMe
LoseLevel
,Manhattan
MaxInventory ; error if more than that many slots in inventory
.,Move
.,MovePlus "Move+" ; obj.Inertia+=Strength instead of obj.Inertia=Strength
.,MoveTo ; the internal MoveTo() function
.,PlusMove "+Move"
.,MinusMove "-Move"
NewX
NewXY
NewY
,ObjAbove
,ObjBelow
ObjBottomAt
ObjClassAt
,ObjDir
ObjLayerAt
ObjMovingTo
ObjTopAt
PopUp
*PopUpArgs ; for (PopUp [number])
,Rel
,Seek
.,Send
.,SendEx ; send with three arguments
SetInventory
Sound
Synchronize
,Target
Trace
Trigger
TriggerAt
VolumeAt
WinLevel
,XDir
XYDir
,YDir

; Operations with marks
mark "_"
tmark
in
nin
-mbegin
flip
count
clear
uniq

; Arrays
-Array
GetArray
InitArray
SetArray
ArrayCell
ArraySlice
CopyArray
DotProduct

; Pattern matching
-,=Pattern "P"
-,=PatternS "P*"
-Rook
-Bishop
-Queen
-cut

; Inheritance
-Abstract
,Super

; Specials
*Function
*Local
*Label
*String
*Int16
*Int32
*Dispatch
*UserFlag