sam_to_mec - 24leesten/SimU-Wiki GitHub Wiki

From SAM to MEC

1B - control

HTML control: chr(1)

    4 Bytes - output length
    ? Bytes - output string

File control: chr(2)

    1 Byte - mime type control
    4 Bytes - file name length
    ? Bytes - file name (length specified by arg name bytes)
    4 Bytes - file length
    ? Bytes - file data (length specified by arg bytes)

Img control: chr(3)

    1 Byte - mime type control
    4 Bytes - file name length
    ? Bytes - file name (length specified by arg name bytes)
    4 Bytes - file length
    ? Bytes - file data (length specified by arg bytes)

Done control: chr(4)

Error control: chr(5)

    4 Bytes - error length
    ? Bytes - error string