ARM9 / bass

fork of byuu's bass assembler
169 stars 50 forks source link

Allow index outside parenthesis, most commom used syntax in 68k assembly #21

Closed hansbonini closed 4 years ago

hansbonini commented 4 years ago
instruction index(register)
instruction index(register,displacement)

is mostly common way used in 68k assembly, this patch allow use syntax

PeterLemon commented 4 years ago

I will only apply this patch if it comes along with a modified MegaDrive 68k test found here: https://github.com/ARM9/bass/tree/master/bass/.test/md_test & a modified NeoGeo test found here: https://github.com/ARM9/bass/tree/master/bass/.test/ng_test (They are the same just the arch used & info at the top are different) These test files are used to binarily compare results from a known assembler like asm68k.exe from PsyQ devkits. Also bass might not like the order that you have placed these new ops, giving an error on output, which is why we make these test files, to make sure everything assembles with no errors & is binarily perfect.

EDIT Actually I will go through each op & make the test files to make sure everything is perfect, it will take me a while so bare with me...

PeterLemon commented 4 years ago

hi hansbonini,

I made all the modifications myself to allow this, as I suspected your pull request could not work as you had not tested all the added opcodes, & it needed reorganisation of the opcodes to work in the new m68k table. I have updated the table & added the MegaDrive & Neo-Geo tests accordingly. I also fixed the mistakes you made, this included when index outside parenthesis was on the right hand side of an opcode which you missed. Also I checked all my changes were bit perfect with the asm68k assembler. I will now close this pull request =D