Does the assembler for the CS08 devices offer a local label feature? for example, instead of having to track short loops with a loopx label, the user could assign a character to be the first one of the label and then that particular label would be unique between the non-local labels before and after the local label. If not, how do others create labels for short loops or branches in subroutines?
Thanks...ptp
I do not know what you say. If your relocatable assembler programs, each tag is private within .asm file. If what you have is a repetitive loop routine, you can program it into a macro. When you call the macro each tag is configured not to be repeated using \ @. Example:
MyMacro MACRO ;clear registers
lda #\1
ldhx #\2
loop\@ clr 0, x
aix #1
dbnza loop\@
ENDM
;*************************************************
MyCode SECTION
nop
nop
MyMacro 4, RAMStart
MyMacro 8, $230
nop
;*************************************************
;Generated code: green = macro expansion
MyCode SECTION
nop
nop
MyMacro 4, RAMStart
lda #4
ldhx #$80
loop_00001 clr ,x
aix #1
dbnza loop_00001
MyMacro 8, $230
lda #8
ldhx #$230
loop_00002 clr ,x
aix #1
dbnza loop_00002
nop
Hello,
from my understanding, CW for HCS08 assembly doesn't have this feature.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------