piclist 2002\07\30\062112a >
Thread: SASM vs Parallax macros
www.piclist.com/techref/ubicom/languages.htm?key=sx
flavicon
face BY : Ruben Jönssonemail (remove spam text)



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
KILLspamrubenEraseMEspam@spam@pp.sbbs.se
==============================

--
http://www.piclist.com hint: To leave the PICList
TakeThisOuTpiclist-unsubscribe-requestRemoveMEspamTakeThisOuTmitvma.mit.edu


<3D467FC4.13051.4FD374@localhost> quoted-printable

See also: www.piclist.com/techref/ubicom/languages.htm?key=sx
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) SASM vs Parallax macros

month overview.

new search...