Shop OBEX P1 Docs P2 Docs Learn Events
Errors in Spin Byte Code wiki page? — Parallax Forums

Errors in Spin Byte Code wiki page?

johnfosjohnfos Posts: 59
edited 2011-08-25 09:15 in Propeller 1
I think there are a couple of minor errors in the wiki page for Spin byte code: http://propeller.wikispaces.com/Spin+Byte+Code

I'm willing to edit the page if any expert out there can reassure me that I won't be perpetrating an error instead of fixing one.

1. In the big table, opcodes 8c to 8f are listed as PUSH_INDEXED_LOCALMEM_BYTE, POP_(ditto), EFFECT_(ditto) and REFERENCE_(ditto). I think these four should have the _INDEXED deleted.

2. Earlier, under the heading "Structure of UPPER opcodes" and under the sub-heading "Structure of Memory ops", the description of S-field contains the sentence "Used only if I-field is 1." I think that sentence should be deleted.

Anyone care to confirm or dispute?

Comments

  • Dave HeinDave Hein Posts: 6,347
    edited 2011-08-24 08:07
    Item #1 is an error, and it should be corrected. Item #2 is trying to say that the index is adjusted by the access size. The index is multiplied times 4 for a long, and times 2 for a word. This sentence should remain, but it should be clarified a bit.
  • johnfosjohnfos Posts: 59
    edited 2011-08-24 10:07
    Thanks Dave for that.

    On #2, I'm not quite convinced. As I see it, the SS field has two effects. It specifies the size of the memory location to be accessed, and if the I field is set it also determines the amount by which the index is shifted. The first effect applies to all the memop instructions, which is why I thought the sentence should be deleted.

    I'd be happy to replace it with a clarification, maybe:

    S-field: Size of address operand. 00: Byte; 01: Word; 10: Long; 11: illegal (would be a math op). If the I-field is set to 1, the index value is shifted left by S bits.
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-08-24 10:30
    Your clarification looks good.
  • johnfosjohnfos Posts: 59
    edited 2011-08-24 13:20
    Dave, thanks for the reassurance and the suggestion. I've now edited the page.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-08-24 15:33
    If you follow the links in my signature and look at the thread 'faster spin interpreter' (or something like that), I have a detailed description of the interpreter bytes. This is taken from all the known data at the time including Chip's listing, and includes my own interpretation from traces, etc. This may help.
  • johnfosjohnfos Posts: 59
    edited 2011-08-25 09:15
    Thanks Cluso - checking that now.
Sign In or Register to comment.