Free Hero Mesh

Update of "Internal program encoding"
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview

Artifact ID: fec85f2c153e82c0f32ce4043862f087bb4b2d3d
Page Name:Internal program encoding
Date: 2019-05-18 03:12:16
Original User: zzo38
Parent: 0930392448898cd1b57739c5c9d354688cb3bf2b (diff)
Content

This describes the internal program encoding used for class codes (it is only for internal use by Free Hero Mesh). It isn't complete, but I have some notes on a paper and am putting them into the computer in case anyone else who is altering Free Hero Mesh also wants to see them.

0000-00FF  Short constant 0 to 255
0100-01FF  Short constant -256 to -1
0200-02FF  Built-in message constant
0300-03FF  Built-in sound constant
0400-04FF  User sound constant
1x00-1xFF  Constant and operator
2000-2FFF  Read user vars   [000-7FF=local, 800-FFF=global]
3000-3FFF  Write user vars
4000-7FFF  Class constant
8000-87FF  Commands   [87E8-87FF=bit8-bit31]
8800-8FFF  Commands ,
9000-97FF  Commands =
9800-9FFF  Commands =,
A000-BFFF  Commands followed by .
C000-FFFF  User message constant

"Constant and operator" table:

00 +
08 -
10 *
18 /
20 mod
28 ,*
30 ,/
38 ,mod
40 band
48 bor
50 bxor
58 lsh
60 rsh
68 ,rsh
70 eq
78 ne
80 lt
88 gt
90 le
98 ge
A0 ,lt
A8 ,gt
B0 ,le
B8 ,ge
C0
C8
D0
D8
E0 ret
E8 ret
F0
F8

There are also encoding of individual commands, not listed here. Both encodings is not guaranteed to remain the same between versions of Free Hero Mesh. (This is unimportant to the user, since the compiled P-codes are never saved to disk.)