heph

synopsis

heph is a mixed imperative-declarative format which seeks to fully encode a forth dictionary in a completely platform-agnostic manner. this includes encoding any native codewords, a process aided by the heph IR, a complementary minimal, platform-agnostic intermediate representation of basic machine code.

header layout

magic vendor
+0 +1 +2 +3 +4 +5 +6 +7 +8 +9
91h 16h 84h 80h [1]
static count word count
+10 +11 +12 +13
[2] [3]

[1] - this should be a vendor field provided as a pair of three byte fields. namely, the first three bytes should be a vendor signature, while the last three bytes should be a system signature.
[2] - this must be the sum size of all static data elements in bytes, i.e. the length fields of octet blocks + 2 × the length fields of doublet blocks.
[3] - this must be the total word count of the file, i.e. the total amount of header elements of any kind.

ir

+0 +1 +2 +3
2-op 0 mov jmp jnz add
4 sub and or xor
8 out in
1-op lsh rsh neg sys