DCPUTeam / DCPUToolchain

[ARCHIVED] The code repository for the DCPU-16 Toolchain.
http://dcputoolcha.in/
MIT License
96 stars 14 forks source link

Assembler supports [register + label] but it doesn't support [label + register] #161

Closed jdiez17 closed 11 years ago

jdiez17 commented 11 years ago

This is really important, most of the code does stuff like "set [0x8000 + i], a", etc.

Please fix ASAP.

hach-que commented 11 years ago

See the assembler parser grammer (parser.y) to make this modification. It should be a simple case of adding another grammar rule after the [register + label] one (although I thought this was already supported!)

jdiez17 commented 11 years ago

I think this does not have to do with the grammar (there is already a grammar that handles this case), but rather a case of assem.c not interpreting this case correctly.

Anyway, I've tried to fix it but to no avail.

On Tue, Oct 9, 2012 at 11:07 PM, James Rhodes notifications@github.comwrote:

See the assembler parser grammer (parser.y) to make this modification. It should be a simple case of adding another grammar rule after the [register

  • label] one (although I thought this was already supported!)

— Reply to this email directly or view it on GitHubhttps://github.com/DCPUTeam/DCPUToolchain/issues/161#issuecomment-9279862.

-----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d s+: a--- C++>$ U+++>$ P+ L++$ E---> W+++>$ N o K-? w++>$ O M++$ V PS+ PE+ Y++ PGP>+++ !t+ 5 X !R- tv-- b+>++ DI+ D+ G++ e>+++++$ h r y+ ------END GEEK CODE BLOCK------

ghost commented 11 years ago

This is lines 117-147 of assem.c is that correct?

ghost commented 11 years ago

This is lines 117-147 of assem.c is that correct?

ghost commented 11 years ago

OOps accidentally closed and reopened issue, I thought I was closing the comment box facepalm

jdiez17 commented 11 years ago

Fixed in the cmake–scripts branch