dmsc / fastbasic

FastBasic - Fast BASIC interpreter for the Atari 8-bit computers
GNU General Public License v2.0
139 stars 20 forks source link

INC on byte arrays #14

Open ukcroupier opened 4 years ago

ukcroupier commented 4 years ago

Think I got a bug.

inc a(1)

This works as expected with WORD arrays but gives an error with BYTE arrays

dmsc commented 4 years ago

Hi!

Think I got a bug.

inc a(1)

This works as expected with WORD arrays but gives an error with BYTE arrays

Yes, INC (and DEC, GET, INPUT, and generally all the other statements that expect a variable) only work with WORDS, not with BYTEs.

To support bytes, we would need a new statement, as the current ones write on a WORD location (so they write two bytes).

If you really need that, I could implement it, it would be about 15 extra bytes in the IDE.

Have Fun!

ukcroupier commented 4 years ago

There's no desperate need for it, INC is more of a bonus feature than a necessity. 15 bytes doesn't sound like a lot, so if it doesn't hinder your overal plans it would be nice to have.