main:
mvi c,1 ;0000 0001 ehnii tovch daragdsaniig shalgah
loop0:
call buttonPressed
jnz loop0
;any function
;jmp loop0
hlt
buttonPressed: ;procedur
mvi b,0 ;ene mor shaardlaggui
mvi a,71 ;ene mor shaardlaggui
mvi c,1 ;ali byte-g ni haritsuulah utga
;darsan buttonnii dugaar
;register c(inputArgument)
;in 01h ; port address
;mov b,a
;in 01h ;port address
ana c ;0000 0001
mov e,a ;e
mov a,b
ana c ;0000 0001
;a
jnz omnodFrontBish
mov a,e
cmp c
jnz omnodFrontBish
omnodFrontMon:
;mvi a,45 ene mor shaardlaggui
;rlc ene mor shaardlaggui
mvi a,1
dcr a
;changed flag zero
omnodFrontBish:
ret ;return procedur
No comments:
Post a Comment