Skip to content
This repository has been archived by the owner on Feb 10, 2021. It is now read-only.

FileFormats

sam-falvo edited this page Jan 2, 2015 · 8 revisions

Executable File, STS/K2 V1

Expressed in BNF-like form:

executableFile = T_HUNK (codeHunk (relocHunk)*)+ T_END
codeHunk       = T_CODE size size*byte
relocHunk      = T_RELOC size size*offset
size           = 2*byte
offset         = 2*byte
T_HUNK         = 880 ($70 $03)
T_CODE         = 881 ($71 $03)
T_RELOC        = 882 ($72 $03)
T_END          = 883 ($73 $03)

NOTE The code hunk does not specify any padding requirements. An odd code hunk size implies an odd number of bytes of code image in the file. However, since all software for the S16X4 CPU family always consumes an even number of bytes, and compilers enforce even-sized images anyway, you'll virtually never have an odd code size. Nonetheless, high-quality loaders will properly handle odd-sized code hunks.

Clone this wiki locally