Wanda on Nostr: so my favorite feature of the thing I'm currently reversing is that it has a numeric ...
so my favorite feature of the thing I'm currently reversing is that it has a numeric co-processor.
the base MCU is a custom 8-bit thing, not very far removed from the likes of 8051 or 6502. 256-byte memory space (actually 4kiB of RAM, since the second half of the space is bank-switched), 256 I/O ports, no registers at all (every normal operand is either absolute memory, or memory-indirect memory), and the only thing larger than 8 bits that this thing understands is code ROM addresses, which are 16-bit. no multiply opcode either, btw.
and then, since this is incredibly painful to do any math with, they just stapled a full 32-bit ALU to the side and attached it via the I/O port range.
behold this beautiful code snippet that multiplies a 32-bit number by 10 (it's part of the "convert from decimal" function):
Published at
2025-01-12 15:29:35Event JSON
{
"id": "645ae29cdebf95d70ff576db4438288a1b395ba88978acb0c2bb0412e45f426d",
"pubkey": "1d84d203be177e209cfa35b40b6fe52986c5023de165c6a2ba03645e92401d3c",
"created_at": 1736695775,
"kind": 1,
"tags": [
[
"content-warning",
"ftdi"
],
[
"imeta",
"url https://asdf.donotsta.re/media/15e8209a402a7c9d6bc59bfbd6f655c7a42c30095e48b51ac4ac5f7ade4f9fda.png",
"m image/png",
"dim 847x963",
"blurhash e11.{b%$Sjo+IwozkCoKbHR*aKa_bFadjYogj]W.j]jckVf6nibHR*"
],
[
"proxy",
"https://donotsta.re/objects/de040cd3-3abe-44a6-b3f7-0356ea9c7058",
"activitypub"
]
],
"content": "so my favorite feature of the thing I'm currently reversing is that it has a numeric co-processor.\n\nthe base MCU is a custom 8-bit thing, not very far removed from the likes of 8051 or 6502. 256-byte memory space (actually 4kiB of RAM, since the second half of the space is bank-switched), 256 I/O ports, no registers at all (every normal operand is either absolute memory, or memory-indirect memory), and the only thing larger than 8 bits that this thing understands is code ROM addresses, which are 16-bit. no multiply opcode either, btw.\n\nand then, since this is incredibly painful to do any math with, they just stapled a full 32-bit ALU to the side and attached it via the I/O port range.\n\nbehold this beautiful code snippet that multiplies a 32-bit number by 10 (it's part of the \"convert from decimal\" function):\n\nhttps://asdf.donotsta.re/media/15e8209a402a7c9d6bc59bfbd6f655c7a42c30095e48b51ac4ac5f7ade4f9fda.png",
"sig": "c73f38dc12dd9fa9550a025808aa4b98f680a4c6cb342d11896d0a48c41875f8fe35057636e600beb41f0765f22fe7b17aa375fce8b81d0807b90737b2ae017e"
}