I see $
in SJMP, CJNE and other instructions in 8051 assembly code and don't know what it does. Here
CJNE A,#'A',$+5
SJMP $
Can you tell me the purpose of it?
I see $
in SJMP, CJNE and other instructions in 8051 assembly code and don't know what it does. Here
CJNE A,#'A',$+5
SJMP $
Can you tell me the purpose of it?
It's a special label indicating the current line. SJMP $
is equivalent to
currentline: SJMP currentline
And CJNE A,#'A',$+5
will jump to the instruction 5 bytes ahead when the condition matches
In fact it's the same as the dollar sign in assembly languages for many other architectures