Shop OBEX P1 Docs P2 Docs Learn Events
enc — Parallax Forums

enc

Dave HeinDave Hein Posts: 6,347
edited 2011-07-14 16:24 in Propeller 1
The name "enc" is a reserved word in the Prop tool. If I try to use it the Prop tool complains that I need to define a unique name. If I use it in a DAT section the Prop tool will highlight it as if it is a PASM opcode. In fact, it treats it as an opcode. The following program generates an instruction value of $18FC0240.
pub dummy

dat
              org       0
              enc       temp1,#4
temp1         long      0
I believe enc is supposed to work like the Spin encode operator ">|". Has anybody tried this on the Prop? Does it work?

I am guessing that it was intended to work like the >| operation, but there is a problem with it. I can't find a reference to it in the Prop manual. Are there any other undocumented instructions like this?

Dave

Comments

  • localrogerlocalroger Posts: 3,452
    edited 2011-07-14 15:48
    According to the data sheet ENC, MUL, MULS, and ONES are the instructions that were planned but not implemented. If it were implemented it would be "Encode magnitude of S into D, result = 0..31"
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-07-14 16:22
    Thanks. It's interesting that the Prop tool contains these as reserved words, even though they can't be used for anything. I suppose it was done to prevent people from using these words so that their programs could be compiled to work on new versions that did support the instructions.
  • kuronekokuroneko Posts: 3,623
    edited 2011-07-14 16:24
    Not implemented, IIRC dst is cleared regardless of src.
Sign In or Register to comment.