sxsim rtcc skip count
Hi,
The attached program simply increments a 32bit timer in the interrupt.
I noticed that in SxSim 2.08.05 that on a snz instruction with Z=0
that rtcc increments by 3. Datasheet says a skip takes 2 cycles.
SxSim bug?
regards peter
The attached program simply increments a 32bit timer in the interrupt.
I noticed that in SxSim 2.08.05 that on a snz instruction with Z=0
that rtcc increments by 3. Datasheet says a skip takes 2 cycles.
device SX48,OSCHS2 freq 25000000 reset _reset org $30 dvpTimer1 ds 1 dvpTimer2 ds 1 dvpTimer3 ds 1 dvpTimer4 ds 1 ;first isr run should take 4([url=mailto:jmp@)+3(call)+10(sub)+1(mov]jmp@)+3(call)+10(sub)+1(mov[/url] w)+3(retiw) = 21 cycles ;first run ORG $000 jmp @dvpTMR_vector ; 4 4 _reset mov fsr,#dvpTimer1 clr ind mov w,#$88 mov !option,w mov w,#$F8 mov rtcc,w jmp $ dvpTMR_vector call dvpTMR_S0 ; 3 3 mov w,#(-217)&255 ; 1 1 retiw ; 3 3 dvpTMR_S0 inc dvpTimer1 ; 1 1 snz ; 1/2 2 (NZ) inc dvpTimer2 ; 1 snz ; 1/2 2 inc dvpTimer3 ; 1 snz ; 1/2 2 inc dvpTimer4 ; 1 retp ; 3 3
SxSim bug?
regards peter
SRC
![](/plugins/FileUpload/images/file.png)
685B
Comments
Problem solved.
Apparently the latest IDE v3.2.92h beta installs sxsim v2.08.05
regards peter
sorry for the mess-up...
The SX-Key IDE not always auto-installs the most recent version of SXSim. This is because Peter and I sometimes run out of sync when releasing new versions. So, the best idea is to always check if there is a newer version of SXSim available in the "sticky" SXSim post in this forum section after you have installed a new version of the IDE.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G