Shop OBEX P1 Docs P2 Docs Learn Events
Which assembler to use... — Parallax Forums

Which assembler to use...

dkemppaidkemppai Posts: 315
edited 2004-10-22 14:49 in General Discussion
Allright,

It's been a while, since I wrote any code for the SX, so I'm starting to forget things here.
As·I remember it there are two assemblers that can be used·with the SX-Key and PC side software. SASM, and one included with the SX_Key software.

What the major differences, and which one do you guys prefer. I see a lot of references
to the SASM assembler, is that they way to go?

Also, I seem to remember two jump commands? Did one of thoes go away?

(It's rough getting older, you forget more than you remember that·you forgot!)


-Dan

Comments

  • James NewtonJames Newton Posts: 329
    edited 2004-10-21 23:40
    I use SASM and for good reason but there are one or two things that are nice about the built in assembler in the SXKey:

    The Parallax assembler will split strings in macro arguments to several arguments with a single character in each. The SASM assembler does not.


    SOME_MACRO 'ABC'
    will be converted to


    SOME_MACRO 'A','B','C'
    by the Parallax assembler but not by the SASM assembler.

    The '%' sign can not be used in the same way inside a rept block when it is used in an expression that will evaluate to an argument number in a macro:

    SOME_OTER_MACRO macro
    rept 1
    dw \%,\(%+1)
    endr
    endm
    The dw \%,\(%+1) will be expanded to:
    dw \1,\2 with the Parallax assembler but to
    dw \1,\,2 with the SASM assembler, where the single '\' will be expanded to the number of arguments given to the macro (same as \0).

    These are both pretty minor points for most users and there are a raft of other items that SASM does better. See:
    http://www.sxlist.com/techref/scenix/SXKEY2SASM.htm for a page on converting to SASM which will list some of them.

    Also, If you compare what can be done with macros in the SXKey alone:
    http://www.sxlist.com/techref/ubicom/keymacs.src with what can be done with macros in SASM:
    http://www.sxlist.com/techref/ubicom/sasm.htm it really shows the advantages of SASM.

    Finally, there are a number of other assemblers available:
    http://www.sxlist.com/techref/ubicom/languages.htm which might be better for you, but are NOT better for me, or for most.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james@sxlist.com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



    Post Edited (James Newton) : 10/21/2004 11:42:20 PM GMT
  • PJMontyPJMonty Posts: 983
    edited 2004-10-22 05:43
    Dan,

    SASM is definitely the assembler of choice these days when using the SX-Key IDE. For starters, the Parallax assembler has not had any work done on it in years, and there are no plans to do anything to it in the future. On the other hand, SASM has had a number of subtle and not so subtle improvements made to it in the last couple of years. In addition, SASM supports "include" files, which can make large projects much more manageable.

    So, having said all that, why is the Parallax assembler still in place? It just guarantess that if you need to assemble something that depends on some behavior of the Parallax assembler that SASM doesn't do, then you have the option. Basically, if you're maintaining an old project you might need to use the Parallax assembler, but for any new project, SASM is the official recommendation.
      Thanks, PeterM
  • Ken GraceyKen Gracey Posts: 7,407
    edited 2004-10-22 06:06
    Dan,

    The Parallax assembler probably only exists because our BASIC Stamp code was created with it.

    All AppNotes, books and compilers we create will use SASM.

    Ken
  • dkemppaidkemppai Posts: 315
    edited 2004-10-22 14:49
    Hi Guys,

    Ok on the info. I'll not bother with the SXkey assembler.

    Thanks!
    Dan
    ·
Sign In or Register to comment.