Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/05/05 04:10
Read: times


 
Msg Score: 0
 -1 Gimmee Code
 +1 Underrated
#91012 - re:keyboard
Responding to: ???'s previous message
I was used P1 for interface with keyboard
after call this sub program, the data store in FINAL register.

Regards,


.......
enco equ 22h
temp equ 23h
final equ 44h
.......
;========================================
;KEY SCAN
;========================================
getkey:
mov a,#0FEH
mov enco,#4
test:
mov temp,a
mov p1,a
mov a,p1
mov r1,a
xrl a,temp
jnz keyhit
mov a,temp
rl a
djnz enco,test
ret
keyhit:
mov a,temp
mov p1,a
mov a,p1
xrl a,r1
jz keyhit
mov a,r1
row:
swap a
anl a,#0FH
xrl a,#0FH
mov r2,a
column:
mov a,r1
ANL a,#0FH
XRL a,#0FH
mov r5,a
mov a,r2
swap a
add a,r5
mov FINAL,a
setb key.0
ret

List of 5 messages in thread
TopicAuthorDate
keyboard            01/01/70 00:00      
   To Igor!            01/01/70 00:00      
   re:keyboard            01/01/70 00:00      
   3*4 example            01/01/70 00:00      
   a different approach            01/01/70 00:00      

Back to Subject List