Shop OBEX P1 Docs P2 Docs Learn Events
Prop 2 Instructions — Parallax Forums

Prop 2 Instructions

Dave HeinDave Hein Posts: 6,347
edited 2011-03-08 13:19 in Propeller 1
Have the new instructions for the Prop 2 been finalized? I looked at the Wiki, and read the discussion about new instructions that could be added, but it's not clear whether they have all been accepted. From what I can tell the new instructions would be:
MUL     Value1, Value2 ' Single-cycle multiply
REP     Value1, Value2 ' Repeat "Value2" instructions "Value1" times
SWAPZC  Value1         ' Swap the 2 least significant bits in Value1 with the Z and C flags
RDQUADL Value1, Value2 ' Read four long hub RAM locations into four cog RAM locations
WRQUADL Value1, Value2 ' Write four long hub RAM locations from four cog RAM locations
JMPD    Value1         ' Perform a delayed jump after executing the next two instructions
JMPRETD Value1, Value2 ' Perform a delayed jmpret
CALLD   Value1         ' Perform a delayed call
RETD                   ' Perfom a delayed return

There will be four new registers PTRA, PTRB, INDA and INDB. PTRA and PTRB are pointer registers that can be used with the RDXXXX and WRXXXX instructions. The pointers can auto increment and decrement, and a 5-bit signed offset can be used with them. The auto increment/decrement and the offset are scaled by the size of the access (i.e., 1, 2 or 4). I believe the INDA and INDB registers would be used to randomly address cog RAM, and they would auto-increment.

Is this informtion correct? Are there any other new instructions? These instructions will be mapped into the unused hub access instructions of the Prop I. Has the actual bit-mapping of the opcodes been finalized?

Dave

Comments

  • RossHRossH Posts: 5,519
    edited 2011-03-08 13:07
    Dave Hein wrote: »
    Have the new instructions for the Prop 2 been finalized?

    Chip promised to post the new instruction set a few months ago (after one of those online chats). It never appeared, which I presume means they are still messing with about with it. I wonder if it's too late to ask for some new features? :smile:

    Ross.
  • SapiehaSapieha Posts: 2,964
    edited 2011-03-08 13:19
    Hi RooS.

    IT is NOT only You that want that instructions SET ---- For me it is to see if it has all instructions needed for build PLC systms.


    RossH wrote: »
    Chip promised to post the new instruction set a few months ago (after one of those online chats). It never appeared, which I presume means they are still messing with about with it. I wonder if it's too late to ask for some new features? :smile:

    Ross.
Sign In or Register to comment.