[HN Gopher] The 6502 instruction set as a database
       ___________________________________________________________________
        
       The 6502 instruction set as a database
        
       Author : orgonon
       Score  : 45 points
       Date   : 2024-04-08 18:49 UTC (4 hours ago)
        
 (HTM) web link (gitlab.com)
 (TXT) w3m dump (gitlab.com)
        
       | hedgehog wrote:
       | This is a very nice presentation, the .sql file contains a lot of
       | notes about the sourcing for the data. I could imagine adding
       | test vectors to the database as well.
        
       | Retr0id wrote:
       | Up next: 6502 emulator in a single SQL query
        
       | jll29 wrote:
       | 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.
        
       | simonw wrote:
       | 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...
        
       | ggm wrote:
       | In a reductionist sense this is "sql is Turing complete" which is
       | long known, A voyage of discovery aside the joy is the execution
       | and efficiency. I'd be delighted if I'd done this.
        
       | hoten wrote:
       | Some other instruction sets in some JSON:
       | https://github.com/asmjit/asmjit/tree/master/db
        
       | snvzz wrote:
       | Not sure what the advantage is, relative to the tables as CSV
       | files.
        
         | simonw wrote:
         | 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...
        
       ___________________________________________________________________
       (page generated 2024-04-08 23:00 UTC)