JMP Instruction?

Algorithm development and general DSP issues

Moderator: frank

Post Reply
mark_melvin
Posts: 7
Joined: Mon Oct 13, 2025 1:36 pm

JMP Instruction?

Post 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
frank
Posts: 1281
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: JMP Instruction?

Post 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.
Frank Thomson
Experimental Noize
mark_melvin
Posts: 7
Joined: Mon Oct 13, 2025 1:36 pm

Re: JMP Instruction?

Post by mark_melvin »

Thanks for confirming!
Cheers,
Mark
frank
Posts: 1281
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: JMP Instruction?

Post 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?
Frank Thomson
Experimental Noize
mark_melvin
Posts: 7
Joined: Mon Oct 13, 2025 1:36 pm

Re: JMP Instruction?

Post by mark_melvin »

frank
Posts: 1281
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: JMP Instruction?

Post 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.
Frank Thomson
Experimental Noize
frank
Posts: 1281
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: JMP Instruction?

Post 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.
Frank Thomson
Experimental Noize
mark_melvin
Posts: 7
Joined: Mon Oct 13, 2025 1:36 pm

Re: JMP Instruction?

Post by mark_melvin »

Thanks for looking into it, Frank. It was more a curiosity than anything. Merry Christmas!
Post Reply