A couple more questions about this Darrel as i'm trying to understand the code.
In your variable definitions we have
These are not anywhere else in the code? so i don't understand how they are used?Code:wsave1 VAR BYTE $A0 SYSTEM ' Save location for the W register if in bank1 wsave2 VAR BYTE $120 SYSTEM ' Save location for the W register if in bank2 wsave3 VAR BYTE $1A0 SYSTEM ' Save location for the W register if in bank3
I tried removing them and the program compiled correctly but started giving an eroneous display?
In your Int code you have
What does " if (CODE_SIZE <= 2)" do?Code:asm INT_CODE if (CODE_SIZE <= 2) movwf wsave ; copy W to wsave register swapf STATUS,W ; swap status reg to be saved into W clrf STATUS ; change to bank 0 regardless of current bank movwf ssave ; save status reg to a bank 0 register movf PCLATH,w ; move PCLATH reg to be saved into W reg movwf psave ;6 ; save PCLATH reg to a bank 0 register endif
Clearly it jumps over the register saving stuff but where does CODE_SIZE come from?
2 does that mean 2k or 2 words, bytes?
Thanks Peter
PS I have bought PBP3 looking forward to trying it later![]()




Bookmarks