wejos
Member
guys is there a way i could compare two GPRs? the "AND" command drive me crazy can't make it to work since i don't know what to do next. i'm lost.
i tried something like:
A equ 0x0C
movlw 0x61 ;t in ascii
andlw 0x74 ;a in ascii
movwf A
since W was 0x61, the value of A would be 0x60 or
01100001 ----61
01110100 ----74
01100000 ----60
if W was 0x74, the value of A would be 0x74 also or
01110100 ----74
01110100 ----74
01110100 ----74
what i want to happen is compare two GPR, if both are the same, then i can set portA, 0x00 to high.
i tried something like:
A equ 0x0C
movlw 0x61 ;t in ascii
andlw 0x74 ;a in ascii
movwf A
since W was 0x61, the value of A would be 0x60 or
01100001 ----61
01110100 ----74
01100000 ----60
if W was 0x74, the value of A would be 0x74 also or
01110100 ----74
01110100 ----74
01110100 ----74
what i want to happen is compare two GPR, if both are the same, then i can set portA, 0x00 to high.
Last edited: