Searching \ for '[SX]: SASM vs Parallax macros' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ubicom/languages.htm?key=sx
Search entire site for: 'SASM vs Parallax macros'.

Exact match. Not showing close matches.
PICList Thread
'[SX]: SASM vs Parallax macros'
2002\07\30@062112 by ISO-8859-1?Q?Ruben_J=F6nsson?=

flavicon
face
Hello,

I am trying to convert a project done with the Parallax assembler to work with the SASM assembler (due to the new IDE).

Even though the SASM documentation says that macros for the Parallax assembler should work without change in the SASM assembler, I am having problem with the following macros for the Parallax assembler.

CHAR_3  MACRO   3
dw     (((\3 & $f0) << 4) + \1),(((\3 & $f) << 8) + \2)
ENDM

TXT     MACRO
NOEXPAND
IF (\0/3)>0
REPT \0/3
CHAR_3 \(((%-1)*3)+1),\(((%-1)*3)+2),\(((%-1)*3)+3)
ENDR
ENDIF
EXITM
IF (\0-((\0/3)*3)=2)
dw     \(\0-1),\(\0)
ENDIF
IF (\0-((\0/3)*3)=1)
dw     \(\0)
ENDIF
EXPAND
ENDM

The CHAR_3 macro stores 3 bytes in two words of program memory and the TXT MACRO uses the CHAR_3 macro to pack text, 3 characters per 2 words of program memory.

The problem seems to be the following line in the TXT macro:

CHAR_3 \(((%-1)*3)+1),\(((%-1)*3)+2),\(((%-1)*3)+3)

The SASM can't resolve the arguments to the CHAR_3 macro. I am sure it is possible in some way but I can't find out how.

Any takers?
==============================
Ruben Jönsson
AB Liros Elektronik
Box 9124, 200 39 Malmö, Sweden
TEL INT +46 40142078
FAX INT +46 40947388
spam_OUTrubenTakeThisOuTspampp.sbbs.se
==============================

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...