Shop OBEX P1 Docs P2 Docs Learn Events
SXSim (minor) issue with mult-retw on single line — Parallax Forums

SXSim (minor) issue with mult-retw on single line

David BaylissDavid Bayliss Posts: 58
edited 2009-01-29 00:01 in General Discussion
When using·multiple retw instructions on the same line (as per 'beginners assembly for SX page 65') SX sim reports a 'bad jump'. If instead you do the expanded form of the retw it works fine ....

·DEVICE sx28l,oschs3
·DEVICE TURBO,STACKX,OPTIONX
·IRC_CAL IRC_SLOW
·RESET START_POINT
·FREQ 50000000
·ORG 0
START_POINT MOV w,#3
··········· call square
··jmp start_point
square· jmp PC+W
·retw 0,1,4,9,16

Comments

  • BeanBean Posts: 8,129
    edited 2009-01-26 12:26
    David,
    Yeah, It looks like SX-Sim is thinking "retw 0,1,4,9,16" is a single multi-word instruction. So it thinks you are jumping into the middle of an instruction, hence the error.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ·The next time you need a hero don't look up in the sky...Look in the mirror.


    ·
  • David BaylissDavid Bayliss Posts: 58
    edited 2009-01-26 12:34
    Yes - most certainly not a show stopper - but for someone working through the assembler tutorial it could be a little confusing ...

    David
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2009-01-29 00:01
    Hi "SX-Simmers",

    yes, David is right, SXSim should handle multi-retw instructions correctly. I have added this to my TODO list.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
Sign In or Register to comment.