D
Danny
- Jan 1, 1970
- 0
Hi
If i want to check whether there is no input (assuming it is setup as an
input) PORTA is blank (ie no buttons are pressed) would the following work:
(based on assembly instructions but in pseudo code)
BEGINNING: Load PORTA into the working register
If zeroflag in status register is clear skip next instruction
GOTO BEGINNING
Continue..
or would i have to use a logical operation to influence the status register?
ie:
BEGINNING: Load PORTA into the working register
AND the working register with FF(hexadecimal)
If zeroflag in status register is clear skip next instruction
GOTO BEGINNING
Continue..
Dan
If i want to check whether there is no input (assuming it is setup as an
input) PORTA is blank (ie no buttons are pressed) would the following work:
(based on assembly instructions but in pseudo code)
BEGINNING: Load PORTA into the working register
If zeroflag in status register is clear skip next instruction
GOTO BEGINNING
Continue..
or would i have to use a logical operation to influence the status register?
ie:
BEGINNING: Load PORTA into the working register
AND the working register with FF(hexadecimal)
If zeroflag in status register is clear skip next instruction
GOTO BEGINNING
Continue..
Dan