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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/01/02 14:36
Read: times


 
#22363 - RE: passing port pin (to Mahmood)
Shouldn't have pressed post so soon..

Here is how to do it, in unoptimized pseudocode.

Bitset (byte sfrval, bit newval)
{
MOV A,sfrval; the 5 upper bits are the byte adr
ANL A,#0F8
MOV R0,A

MOV A,sfrval; the 3 lower bits are the "bit"
ANL A,#07
MOV B,A
;... tired of writing assembly
R2 = 2 ^ B
if newval @R0 |= R2
else @R0 = @r0 & ~R2
; done


}

List of 25 messages in thread
TopicAuthorDate
passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin (to Bert)            01/01/70 00:00      
RE: passing port pin (to Bert)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood) J.            01/01/70 00:00      
RE: passing port pin (to Mahmood) J.            01/01/70 00:00      
RE: passing port pin (to Mahmood) J.            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      

Back to Subject List