I didn't see that all the code in the file resides in the same section
(.progmem.ctype). However the range of branch instructions is only 128
words. I improved my patch keeping the __ctype_is_false section and
using RJMP to jump to it (4 Kwords range), without duplication of the
__ctype_is_false code in each function.
I tested the new code with an atmega128. The patch is attached.
Which value should the function iscntrl() return for input between 128
and 255? Currently returns true: is this correct?
GLOBAL(iscntrl)
TST rHigh
BRNE __ctype_isfalse
CPI rLow,0x7F
BREQ __ctype_istrue
CPI rLow,0x1F+1
BRGE __ctype_isfalse
SER rLow ; 0 is cntrl, too! -> return true
RET
If not, the last BRGE should be a BRSH.
Can I submit this patch on Savannah?