Shop OBEX P1 Docs P2 Docs Learn Events
SETS and SETD opcode bug? — Parallax Forums

SETS and SETD opcode bug?

I found out why Tachyon wasn't accessing the SD card properly, I use COG@ and COG! to read and write COG registers and these are implemented with SETS and SETD with two nops between them and the affected instruction. Since I wasn't able to read cog memory to see what had happened I just rewrote use the new ALTS instead and this works well and everything looks fine using PNut V5a. So I also substituted SETD with ALTD and that is much simpler too.

Now the questions, what happened that SETS and SETD doesn't work anymore and can I clarify the operation of ALTx as it seems it doesn't actually modify the instruction in memory, only the instruction in the pipeline, which makes sense.

Comments

  • Cluso99Cluso99 Posts: 18,069
    Yes, ALTx only modifies the next instruction in the pipeline. It permits a single level of indirection.
  • Pnut V5a fixes the SETS/SETD opcode issue.
    In Pnut V5 their opcodes were reversed.
    Are you sure you were using 5a?
  • Using 5a and it generates the correct opcode. I need to update my assembler and then I can check it out a bit further.
Sign In or Register to comment.