SXSim (minor) issue with mult-retw on single line
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
·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
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
yes, David is right, SXSim should handle multi-retw instructions correctly. I have added this to my TODO list.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G