daredave
Newbie level 3
- Joined
- Feb 16, 2010
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- philippines
- Activity points
- 1,316
Good day sir! can anyone explain me how these codes work in a more detailed way? specially the "keytable"? and what does "dt" stands for? I really need to fully understand these set of codes.. thank you all!
Code:
ram_start EQU 0x0c
keycode EQU ram_start+5
rowcnt EQU ram_start+6
colcnt EQU ram_start+7
Code:
keytable
movf keycode, W
addwf PCL, F
dt 0x60
dt "123a"
dt "456b"
dt "789c"
dt "*0#d"
keyscan
clrf keycode
movlw 4
movwf rowcnt
movlw 0xfe
tris PORTA
rowscan movlw 0xa0
call udelay
swapf PORTB, W
movwf colstatus
movlw 4
movwf colcnt
colscan incf keycode, F
rrf colstatus, F
btfss STATUS, C
goto keytable
decfsz colcnt, F
goto colscan
bsf STATUS, C
bsf STATUS, RP0
rlf TRISA, F
bcf STATUS, RP0
decfsz rowcnt, F
goto rowscan
retlw 0