Hacker News new | ask | show | jobs
by onurcel 1637 days ago
that's really weird. It looks like the author wrote it with a more powerful system then partly disassembled it. In my opinion this hurts the narrative of this otherwise cool project/article.
2 comments

You're 100% right. It looks like output from a tracing disassembler but it didn't account for the preamble so it quickly gets pear shaped.

If you download the binary and hex dump it, it's a PRG file which contains a 2-byte header ($0801, the load address), followed by a short basic program (816 SYS 2061) followed by the actual code at 2061 ($080d). The actual code starts with LDA $01 but the address is off by 2 bytes (due to the PRG header) so the JSR subroutines are off as well.

https://michaelcmartin.github.io/Ophis/book/x72.html

That's not the case. Back in the day you would use some sort of "monitor" program to assemble that code (or to disassemble code already in memory).

For example, the C64 Action Replay cartridge had a built-in monitor. Software machine code monitors and assemblers were also available.