Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Just because it works doesn't make it right. The second variant was already explained to you by bananasiong. It moves the contents of the SFR @ 0FFH to the accumulator. What you read from an unimplemented SFR is anybody's guess. If you got lucky and you are reading all 1's then hoo rah for you, you lucky fella.Eng.Remon said:yea it is 8051 but what is
mov p1,0ff does ? thats confusing in fact coz both of them are working :S
mov p1,0ffh ;[ff]-->p1, so [p1]=[ff]
mov p1,#0ffh ;ff-->p1, so [p1]=ff
mov P1, #0FFh
mov P1,0FFh
;Declare a 16bit counter in RAM
MyCounter: ds 2
;Assign name to each byte of MyCounter
MyCounterHB equ MyCounter+0
MyCounterLB equ MyCounter+1
;Reset MyCounter
clr a
mov MyCounterHB,a
mov MyCounterLB,a