Shop Learn
flexspin compiler for P2: Assembly, Spin, BASIC, and C in one compiler - Page 82 — Parallax Forums

flexspin compiler for P2: Assembly, Spin, BASIC, and C in one compiler

1767778798082»

Comments

  • Thanks @iseries and @ersmith. The mental picture is now much clearer.

  • I don't know if this makes sense but is there a way to write straight assembly code and have it compile like a MASM program.

    Would like it to be code independent and not have any underlying language.

    Mike

  • ersmithersmith Posts: 4,853
    edited 2021-04-06 23:53

    @iseries said:
    I don't know if this makes sense but is there a way to write straight assembly code and have it compile like a MASM program.

    Would like it to be code independent and not have any underlying language.

    All you have to do is write DAT in front of all the assembly and then build it as a Spin or Spin2 file. See for example the blink_pasm.spin sample that comes with flexprop (that one does have a CON section too, but that's optional and actually kind of useful sometimes for assembly).

    On the P2 if there are no PUB or PRI statements then you get just your assembly program, no overhead at all. On P1 you do also get a minimal Spin program (8 bytes, IIRC) appended that restarts the COG with your assembly.

Sign In or Register to comment.