Greetings,

For reasons known only to MicroChip, the 12 & 14 bit cores count the code area
in words, whereas the 16 bit cores count it in bytes (though every instruction
is two bytes, or one word).

Prior to jal 2.4l-beta, this was no being handled correctly. The code
generation was correct, but the assembly output did not match mpasm. This
ended up causing not only confusion but a problem when generating `asm goto n'
-- the result ended up being `goto 2n'.

This has been fixed, but the generated device files for the 16 bit cores may
not be correct. I've not checked. From section 5.1 of
``PIC18F2420/2520/4420/4520 Data Sheet'', we see:

``The PIC18F2420 and PIC18F4420 each have
16 Kbytes of Flash memory and can store up to 8,192
single-word instructions. The PIC18F2520 and
PIC18F4520 each have 32 Kbytes of Flash memory
and can store up to 16,384 single-word instructions.''

The means, for these chips we need:

pragma code 16384

and

pragma code 32768

(the total number of bytes available, *not* the total number of words).

Hopefully this is clear.

--kyle


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to