Close

Just a few more hurdles before starting

A project log for Assembler for SuperconBadge

An Assembler for the Supercon 6 Badge - been done. But *ON* the badge?

michael-mllerMichael Möller 08/04/2023 at 10:130 Comments

The loader binary format was reverseengieered by examining code example https://github.com/Hack-a-Day/2022-Supercon6-Badge-Tools/blob/main/examples/Hackaday-dice-roll/dice_roll.asm - later I found it is reasonably documented in the UserManual for the badge (almost as a footnote under the DIR/LOAD command):

  1. Header 6 bytes: 00 FF 00 FF A5 C3
  2. Program length 2 bytes (in 16-bit words, Low byte first): NN NN
  3. Program "NN 0N"×Program Length (Low first): NN 0N, NN 0N, ...
  4. 16-bit Checksum 2 bytes (items 2 and 3 only, Low first): NN NN

Problem 1, The code length is first known after the 1st pass (before generating the header), but I do not have that yet in these earlier bootstrap versions. Initial versions will therefore require the code length as the first 16bit HEX digits. (Ie the text filelength with a little scaling)

Problem 2: "Everyone" seems to know what the checksum algorithm is. But there are many such. I reverseengieered the one in the python cross assembler. It a simple 16 bit sum of 16bit words of the length and all codebytes.

Discussions