Shop OBEX P1 Docs P2 Docs Learn Events
ASM..ENDASM, what am I not understanding? — Parallax Forums

ASM..ENDASM, what am I not understanding?

Sens-a-DatSens-a-Dat Posts: 44
edited 2008-02-18 11:26 in General Discussion
Hi, Gents.

Are there some assembly codes not permissible within ASM...ENDASM but permissible when using the \ at the beginning of the program line in .SXB?

I was adding some assembly codes into an .SXB program, and I experienced something which has me confused. The following illustrates the point.

This compiles successfully in .SXB
\_test  macro 1
\       bank \1
\endm






This does not compile successfully in .SXB
ASM
 _test  macro 1
        bank \1
endm
ENDASM





If I put the previous one in an external .SRC file and use the INCLUDE file, it compiles just fine.

(for .SXB file)
INCLUDE "src.src"

(SRC.SRC file)
_test  macro 1
       bank \1
endm





Thank you for your help in furthering my understanding of SX programming.



                

Comments

  • BeanBean Posts: 8,129
    edited 2008-02-18 02:17
    The slash "\" is a reserved symbol in SX/B.
    Any ASM line that contains a "\" must be prefixed with the "\". Yes EVEN if it is inside an ASM...ENDASM block.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.iElectronicDesigns.com

    ·
  • Sens-a-DatSens-a-Dat Posts: 44
    edited 2008-02-18 11:26
    Gents,

    I don't know what I did wrong earlier, but yesterday (Feb 20) I was able to get the program running correctly with the ASM...ENDASM statement without the need for a \ at the beginning of each line.

    Post Edited (Sens-a-Dat) : 2/21/2008 12:35:09 PM GMT
Sign In or Register to comment.