
Originally Posted by
ngeronikolos
Duncan,
What I was thinking...
portA PORTB
% 00000000 / 00001000
<0> PORTB.0 <1>PORTB.1 .... <8>PORTA.0
Let's say that this is my word that Contains PORTA+PORTB that I have to check.
The followings are correct???
----------------------------------------------
(w0 var word
L var byte
H var byte
L = PORTB
H = PORTA
w0.LowByte = L
w0.HighByte = H
If w0 > 1 then
I WILL READ THE w0
endif
---------------------------------------------------
Thanks
Nikos
Retsina,Summer,Sea and Sun
If that is what you want to do, you could use Darrel's trick with EXT
Code:
@PORTS = PORTA
PORTS VAR WORD EXT ; PORTS = PORTB:PORTA
; in middle of program
if PORTS > 1 then ....
(Don' t forget to mask the unused bits of PORTA if they might not be 0)
Last edited by paul borgmeier; - 5th February 2008 at 18:30.
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Bookmarks