endlos99 / xdt99

xdt99: TMS 99xx Cross-Development Tools
http://endlos99.github.io/xdt99
GNU General Public License v3.0
52 stars 8 forks source link

Warning: Unexpected arithmetical precedence with unary minus #33

Closed peberlein closed 2 years ago

peberlein commented 2 years ago

This new warning showed up with the latest xas99.py. These arithmetic expressions should be unambiguous. Seems like the unary minus is causing the warning:

> hero.asm <2> 0678 -        AI R5,-8*256
***** Warning: Unexpected arithmetical precedence
> scroll.asm <2> 0234 -        AI R4,(-32*22)-1
***** Warning: Unexpected arithmetical precedence
> scroll.asm <2> 0291 -        AI R4,(-32*22)+1
***** Warning: Unexpected arithmetical precedence
> movobj.asm <2> 0441 -        AI R5,(-32*256)+16
***** Warning: Unexpected arithmetical precedence
endlos99 commented 2 years ago

Yeah, sorry, I missed some cases for that check ... I hope to release a fix this weekend.

peberlein commented 2 years ago

Thank you. I appreciate all the work you've done lately.

endlos99 commented 2 years ago

I've pushed a fix for xas99 and xga99 regarding this issue. I hope I covered all cases now.

Please download xas99 directly, as I'm still waiting for a solution to the IDEA plugin code completion issue before I publish another release.

Thanks for reporting this so quickly!