Hi,
I try to learn more about picbasicpro and asm.
I want to read out a byte on location $fff in the program code. The pic I use can do this with
readcode $fff, adrs ;place byte on location $fff into var adrs
I htought to do it like this;
bcf STATUS,RP0
bsf STATUS,RP1
MOVLW 0x0F
MOVWF PMADRH
MOVLW 0xFF
MOVWF PMADR
BSF STATUS, RP0 ; Bank 3
BSF PMCON1, RD
NOP
NOP
BCF STATUS, RP0 ; Bank 2
MOVF PMDATA, W
movwf dmxlowbyte
MOVF PMDATH, W
movwf dmxhighbyte
Does it contain a mistake?
Bookmarks