Live data from Hacker News

The 6502 instruction set as a database

gitlab.com

1–10 of 31 posts

Re: The 6502 instruction set as a database

#4
Great idea, this could be valuable for people who write their own assembler.

It's the first time I see an instruction set as a relational database, which I would imagine is a very portable way to describe a machine, perhaps it might be worth collecting other machine specs in that same format and then create a portable assembler that uses the specficic DBs.

Re: The 6502 instruction set as a database

#5
Since this is SQLite SQL, I copied it into a Gist (to give it CORS headers) and now you can open it directly in Datasette Lite (Datasette in WebAssembly running entirely in the browser):

https://lite.datasette.io/?sql=https://gist.github.com/simon...

Here are the 65 hardcoded opcodes: https://lite.datasette.io/?sql=https://gist.github.com/simon...

And the 64 instructions: https://lite.datasette.io/?sql=https://gist.github.com/simon...

Re: The 6502 instruction set as a database

#9
post #8

Not sure what the advantage is, relative to the tables as CSV files.

The ability to ship SQL views that join multiple tables as part of the schema is pretty cool, and something you can't come close to replicating with CSVs.

https://lite.datasette.io/?sql=https://gist.github.com/simon...

Re: The 6502 instruction set as a database

#10
post #9
post #8

Not sure what the advantage is, relative to the tables as CSV files.

The ability to ship SQL views that join multiple tables as part of the schema is pretty cool, and something you can't come close to replicating with CSVs. https://lite.datasette.io/?sql=https://gist.github.com/simon...

I like how it looks, and I appreciate the effort that went into it, but other than using it to export a table in just a right format that you will then embed into your assembler directly, I'm not sure how to use it.

And I use opcode references [1] very often (sometimes daily, depending on the project). I even wrote my own disassemblers. But I mostly use opcode references for manual cross checking, so maybe I'm not a target of this project?

[1] My favorite one for x64 is https://ref.x86asm.net/coder64.html

Post reply on HN