On 2 Sep 2008, at 12:02 , Eur van Andel wrote:
>> The program is supposed to store W in
>> OSCCAL as first instruction (at address 0). Well, that seems a
>> task for
>> the compiler! I don't see how an application programmer could handle
>> this with the current JalV2 compiler.
Well, I tried something. It worked.
> The first instruction in these PICs needs to be:
> asm MOVWF OSSCAL @ 0x0000
So I just added:
> -- ------------------------------------------------
> var volatile byte OSCCAL at { 0x5 }
> var volatile bit*7 OSCCAL_CAL at OSCCAL : 1
> var volatile bit OSCCAL_FOSC4 at OSCCAL : 0
> -- ------------------------------------------------
> var volatile byte GPIO at { 0x6 }
> var volatile byte PORTA at GPIO
>
>> asm movwf OSCCAL
>
>
> --
> var byte _PORTA_shadow = PORTA
> --
> procedure _PORTA_flush() is
> pragma inline
> PORTA = _PORTA_shadow
> end procedure
> --
To the device file.
> G5-fiwihex:~/jalv2/jallib/unvalidated/sample/blink eur$ /usr/local/
> bin/gpdasm -p 10f222 b10f222.hex
> 000000: 0025 movwf 0x5
> 000001: 0206 movf 0x6, w
> 000002: 002b movwf 0xb
> 000003: 0cff movlw 0xff
> 000004: 002c movwf 0xc
> 000005: 0067 clrf 0x7
It's not pretty, but hey, it works. It might need some comment :-)
Let's do this, independent of the programmer supports it, because
it's the Right Thing to Do.
So, now I'm getting back to do some Real Work.
---
ir EE van Andel [EMAIL PROTECTED] http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---