Wouter van Ooijen wrote: > As far as I can make out from the datasheet they realy have less > FLASH, the remaining is ROM. That seems unlikely, especially since they have the same device ID as an all-flash PIC. > > it's trivially easy, in most cases, to overcome the restrictions > > on CALL destination addresses in the 12-bit parts. > > It is just the place of that one fixed bit I was complaining about. > IMHO it should be either the LSB or the MSB, not somewhere inbetween. On the 16C54, that bit IS the MSB... And if you don't count the page-select bits as part of the address, it's the MSB on the other 12-bit PICs, too. > And how do you overcome that limitation easily, without using call > vesctors or re-arraging your code? Note that I am looking at it > from the compiler writers perspective. Although the destination of every CALL must be in the lower half of a 512-word page (i.e., in the 0xnn00-0xnnFF area), there's no similar restriction on the destination of GOTOs... So you just put your subroutine entry-points at the low end of a page and have them GOTO the body of the subroutine which can be anywhere in memory. For an example "from a compiler writer's perspective", see the output of Bytecraft's C compiler; Walter Banks uses what I believe he calls "CALL islands" to solve this problem and the related problem of cross-page GOTOs. Presumably, the other C compilers deal with the problem in a similar way. I'm not familiar with JAL; is there something inherent in its design that makes this approach unworkable? -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads