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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/08/09 06:24
Read: times


 
#170561 - curious about this '$' sign
Hello,
I was just wondering, if you look at the bottom of the subroutine named L2, you'll see an instruction 'SJMP $'. If I'm not mistaken, values prefixed with a '$' represent an address? In asm for some architectures(or assemblers?) it signifies hexadecimal value, but 'h' does that for this assembler.
so I'm lost and can't figure out what that line does.
Can someone help?
Thanks
Malik
ORG 0000H
			MOV A, #33H			;A = 33H
			MOV R0, #24
L1:		RR A					;ROTATE RIGHT
			MOV P2, A			;P2 = A
			ACALL DELAY
			DJNZ R0, L1
			ACALL DELAY_1S
			MOV R0, #24
L2:		RL A              ;ROATATE LEFT
			MOV P2, A			;P2 = A
			ACALL DELAY
			DJNZ R0, L2
			SJMP $
			
DELAY:	MOV R3, #200
HERE2:	MOV R4, #255
HERE:		DJNZ R4, HERE
			DJNZ R3, HERE2
			RET
			
DELAY_1S:
			MOV R1, #200
D3:		MOV R2, #200
D2:		MOV R3, #255
D1:		DJNZ R3, D1
			DJNZ R2, D2
			DJNZ R1, D3
			END
 



List of 3 messages in thread
TopicAuthorDate
curious about this '$' sign            01/01/70 00:00      
   $ Sign            01/01/70 00:00      
      $ sign            01/01/70 00:00      

Back to Subject List