rafapaezbas / uxnasm-js

Javascript Uxntal assembler.
6 stars 1 forks source link

Wrong opcodes for some operations #2

Open Cl0v1s opened 10 months ago

Cl0v1s commented 10 months ago

Hi ! First of all, thanks for your work on this JS assembler :)

I noticed that a few opcodes aren't correctly assembled when we use the produced binary code in the latest UXN VM. In particular, NIP, SWP, ROT, DUP and OVR seem off.

I used this file as reference and noticed that the opcodes were wrong: https://git.sr.ht/~rabbits/uxn5/tree/1c0890e51a13ab737222c714770f664e90ad9260/item/src/uxn.js#L155

I fixed that in my own project with this commit. Will probably make a PR soon !

https://github.com/Cl0v1s/vscode-uxn-exec/commit/29f7773d26efb794ed0776e4eadbfbccc6b01538#diff-35c17f92b3ed6cfe078f9a5b184f4c224343424ff178f2dde24161794edfbaa4

rafapaezbas commented 10 months ago

Thank you very much for the info, I am a little bit behind in the project, I guess those op codes have changed for the recently. I will have to change the tests too.

Greetings and thanks again!