RPGHacker / asar

(Now) official repository of the SNES assembler Asar, originally created by Alcaro
Other
204 stars 43 forks source link

No errors are output on the command line when using a mov1 opcode #245

Closed KungFuFurby closed 8 months ago

KungFuFurby commented 2 years ago

This example case has been bothering me for quite some time: https://github.com/KungFuFurby/AddMusicKFF/pull/298

Note that I usually use asar 1.81 because no numbered version has been released since then and I don't want to be dependent on a commit level version of asar.

For this reason... https://github.com/KungFuFurby/AddMusicKFF/pull/67 ...is required in order to run the two together.

I ran this on commit 5abc89b54c9156ed77a61aa9f751471cd463b3c3 . If I comment out the mov1 opcodes I added in, AddmusicK gives me a segmentation fault, and when running it solo on asar, it says... Errors were detected while assembling the patch. Assembling aborted. Your ROM has not been modified.

No other errors are output on the command line, and the opcode that should have been generated is not out of range.

For those of you that want to quickly test this case, I've reduced the scope accordingly to these two snippets of code: replicaTest.asm.zip

There is some fine print... namely I successfully used mov1 with...:

Alcaro commented 2 years ago

Works:

arch spc700 label = $0400 mov1 label.5

Does not work:

arch spc700 mov1 label.5 label = $0400

It's defaulting the label value to something out-of-range on first pass, while second and third pass give reasonable values and don't error.

randomdude999 commented 8 months ago

this has apparently been fixed in both 1.9 and 2.0 by now. (at some point i moved all arch-spc700 math to pass 2, that probably helped)