Page 1 of 1

JMP Instruction?

Posted: Sun Dec 14, 2025 1:38 pm
by mark_melvin
Hi There,

I noticed that some programs are using the JMP instruction, which is not documented. Reverse-engineering the assemblers out there, it seems to be an alias for SKP, with no conditions specified. However, is it true the SpinAsm IDE doesn't support it? If I assemble a program with JMP in it, it assembles to what looks like the NOT instruction:

0107 42000011 :SKP ZRC,label_note1
0108 FFFFFF10 :JMP label_note2

Thanks,
Mark

Re: JMP Instruction?

Posted: Sun Dec 14, 2025 7:00 pm
by frank
You are correct that there is no JMP instruction so I would expect that SpinASM should throw an error. I will try to test it this week and see if I can determine why it is assembling to the code you show.

Re: JMP Instruction?

Posted: Mon Dec 15, 2025 7:37 am
by mark_melvin
Thanks for confirming!
Cheers,
Mark

Re: JMP Instruction?

Posted: Mon Dec 22, 2025 1:30 pm
by frank
Finally got a chance to try it and SpinAsm is giving an error for unrecognized op code:
<0000>[ Pass 2] [ 1030] Line: 2 "jmp lbl1 " - ERROR:Unrecognized or obsolete opcode - jmp
Can you post the code that appears to assemble?

Re: JMP Instruction?

Posted: Mon Dec 22, 2025 3:48 pm
by mark_melvin

Re: JMP Instruction?

Posted: Mon Dec 22, 2025 5:54 pm
by frank
This is strange, on my personal machine I am getting the same thing as you and no error. Need to dig into this a bit.

Re: JMP Instruction?

Posted: Tue Dec 23, 2025 7:39 am
by frank
OK, something odd with the assembler. On a short test program it will catch "jmp" as an error but on a longer program it may not flag it (or it drops the error, not sure at this time). In any case don't use "jmp", what to replace it with will depend on the surrounding code and what you skip to.

Re: JMP Instruction?

Posted: Tue Dec 23, 2025 7:42 am
by mark_melvin
Thanks for looking into it, Frank. It was more a curiosity than anything. Merry Christmas!