Hi Joep,
Tried to reproduce the issue, but did not succeed
;@jallib section chipdef
-- chip setup
--include 18f4610
include 16f877a
pragma target clock 20_000_000 -- xtal frequency
const t1 = 100
var volatile byte test2 = 255 - (t1 / 2 )
forever loop
PORTB = test2
end loop
results
l__main
; D:\pic\projects\jallib_svn\include\device/16f877a.jal
; 190 var byte _PORTB_shadow = PORTB
movf v_portb,w
movwf v__portb_shadow
; D:\pic\picshell_svn\PicShell\src\picshell\examples\consttest.jal
; 12 var volatile byte test2 = 255 - (t1 / 2 )
movlw 205
movwf v_test2
; 16 forever loop
l__l223
; 17 PORTB = test2
; D:\pic\projects\jallib_svn\include\device/16f877a.jal
; 198 _PORTB_shadow = x
movf v_test2,w
movwf v__portb_shadow
; D:\pic\picshell_svn\PicShell\src\picshell\examples\consttest.jal
; 17 PORTB = test2
; D:\pic\projects\jallib_svn\include\device/16f877a.jal
; 194 PORTB = _PORTB_shadow
movf v__portb_shadow,w
movwf v_portb
; D:\pic\picshell_svn\PicShell\src\picshell\examples\consttest.jal
; 17 PORTB = test2
; D:\pic\projects\jallib_svn\include\device/16f877a.jal
; 199 _PORTB_flush()
; D:\pic\picshell_svn\PicShell\src\picshell\examples\consttest.jal
; 17 PORTB = test2
; 19 end loop
goto l__l223
end
So I don't see where the datalo_clr v_test2? Are you targetting a
PIC18f or a PIC16f? Are you using specific compiler settings?
In your post, both assembler output is the same, so I don't see why
the result is different
Albert
On Sep 22, 7:54 pm, Joep Suijs <[email protected]> wrote:
> Hi Guys,
>
> Just posted a suspected bug on the jal list.
> As a result, timer0_isr_interval does (in some cases?) work at a wrong
> rate. And other calculations may be afected too.
>
> Joep
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---