Re: [cc65-devel] ca65 range check vs. signed operations
cc65 - a freeware C compiler for 6502 based systems
Brought to you by:
gpz
|
From: Greg K. <gr...@us...> - 2014-04-20 12:56:56
|
From: Marc Rintsch Sent: Thursday, April 17, 2014; 7:35 AM -0400 > > On 16/04/14 21:14, Brad Smith wrote: >> Since the default behaviour of ca65 currently seems to discourage signed >> data, I have a few ideas for how to respond to that problem: >> >> 1. Use ".feature force_range" or "--feature force_range" to disable >> the range check. >> >> 2. Manually disable the range check, on signed operations, with "<". >> >> 3. Create new symbols for signed data. >> >> 4. Widen the range check to include -128 to 255. > > What about: > 5. Use a macro that does the range check for a signed byte, > and use the "<" operation. I prefer a combination of 4 and 5. I think that an assembler shouldn't be concerned with how we use a number (ie., what we pretend that it means). The only thing that the assembler should care about is whether or not numbers can fit into bytes (or words). |