Forum : Ride IDE
Original Post
| Post Information | Post |
|---|---|
|
March 9, 2007 - 8:58am
|
Hi, I tried posting this question under "Other families", but there seems to be no activity there. I happened to use the MA-STC (MRKII), but this should be similar to other processors! Here goes, I'm trying to pass a text-string like this to a macro called "print" (listed below): print "Hi!!" ; this works print "Hello" ; this doesn't For some reason it will only take text-strings 4 characters or shorter. Why is this? Is there a way to pass longer strings to macro's in RIDE? Is there an updated reference manual for the Starc core? Listing of print macro: print MACRO textarg
LOCAL temptxt
LOCAL nextchar
LOCAL start
jmp start
temptxt: db textarg, 13, 10, 0
start:
mov R4, #LOW(temptxt) ; Lower 8bit of address
mov R5, #HIGH(temptxt) ; Upper 6bit of address (2 top bits should be zero)
and R5, #00111111b ; Set top 2 bits to zero
mov R3, #Text
mov R2, #0FFh ; In loop below R2 counts # of characters to send
nextchar:
movc
mov @R3, R0 ; These two instructions
inc R3 ; could be replaced by "mov @R1+, R0" but R1 is reserved
isnz R4 ; R5 contains HIGH address byte and must be incremented
inc R5 ; whenever R4 (LOW address byte) wraps around to zero!
inc R2
sz R0
jmp nextchar
mov R0, #Text ; R2 contains # of characters to send
call Send_RS232_datagram
ENDMRegards, Steinar |
Hi Steinar,
The problem is within the MRK-II assembler only (it has been fixed for the other processors in 1999). The strings in macros used to be limited up to 4 characters. There is nomore limitation. We will send you a fix by email.
Francis
Thank you Francis!
It seems that there are other discrepancies in the reference manual regarding macro's.
Do you also have an updated reference manual for the MRKII core?
Regards,
Steinar