Maarten Brock - 2006-09-07

Logged In: YES
user_id=888171

For a device that only contains 2k of code memory (or a
program not larger than 2k) this is easy. Use a peephole
rule that unconditionally replaces all lcall and ljmp
instructions by acall and ajmp.

For larger programs a possible solution is to use peephole
rules with a new In2kRange condition. This limits ajmp and
acall to within every object. Then the linker should be
told to keep the object inside a 2k block.

Currently the linker cannot do that but it will generate
an error if the acall/ajmp is out of range.