Formatting the P2 instructions spreadsheet
Peter Jakacki
Posts: 10,193
in Propeller 2
Every time I look at the P2 instruction set document I get a headache. Since I already had a headache this morning and couldn't do much else I decided to look at it and try some minimal reformatting to see if that would help my head. I think it did.
Tell me what you think and maybe it's something that Chip will be agreeable to incorporating back into the main document from this color column copy.
I want to be able to link in examples and perhaps if the main P2 documentation had bookmarks, I could link to there as well.
Tell me what you think and maybe it's something that Chip will be agreeable to incorporating back into the main document from this color column copy.
I want to be able to link in examples and perhaps if the main P2 documentation had bookmarks, I could link to there as well.
Comments
Perhaps having a raw spreadsheet would be useful in other cases too.
Roger, it is a google spreadsheet! I download it as an ods file rather than pdf and then view it with LibreOffice. That'll be why Peter has bothered to hack something up at all. As for the width of the spreedsheet, I've got a 4k monitor so I don't even need it as full screen. Cluso already did sorted versions a while back I'm pretty sure.
Yes, I was thinking along the same lines of two tables.
One form is good for assembler/compiler-writers and disassemblers, and another format for those actually writing in Assembler.
eg The COND & INS CODE binary level columns are only needed for the (small) first group, but the second (larger) group are only interested in the mnemonic and needed/possible parameters.
The description needs to expand from a terse few words.
I've seen PDFs with hyperlinks and popups, but I'm not sure how to create those from a spread sheet.
Maybe each table line can work like an index in a PDF, so a click can go to a paragraph example ?
There is also no reason why we can't add sheets to the document and have pivot tables for different needs. But columns and color already make it a lot easier to see what instructions can and can't do.
Ooops! I had made those columns a group and having forgotten that I had hidden them
I'm put all the timings on another sheet and will incorporate it back into the main instruction sheet in a more compact format.
P2 Rev B INSTRUCTIONS (COLOR COLUMNS VERSION)
I'm making other improvements as well. For example I've printed out the preliminary shortform version of it as a PDF without the code and timings, very simply.
@cgracey
On the subject of documentation I'd like to add a table of contents to the main P2 document as well as more headings. Here's a copy I just made of the P2 document that has a table of contents inserted making it very easy to go to the relevant section.
Thanks for doing that. Made my headache go away.
Your list is very useful and needs to exist along with the one I made. I ordered mine the same way the Verilog is set up, with bit patterns in ascending order. It's like my own notes to myself, if nothing else.
Your groupings are really nice and make clear sense. Yours is more valuable to the programmer than mine is.
The P2 document requires more headings to link to, even if it doesn't include a table of contents. But at present I am linking into my copy of the P2 document since I am adding headings etc. While the instruction set may be complete now, the P2 documentation is an ongoing process and I can also see how it would be beneficial to have sub-documents that are linked to from the main document. Google docs can still be rather slow with large documents.
Do you think this is something that could be merged?
BTW, I checked the original and it's the same, plus I also keep a copy of that for reference as a sub-sheet.
EDIT, I found p2asm generate this: So the wc changes the bitl to a testb but both instructions list czi fields available,
Ok, going a bit further I see the pattern. There's some juggling of the cz fields (xx18xxxx) to allow for two types of instructions.
https://forums.parallax.com/discussion/comment/1449208/#Comment_1449208
Thanks for that confirmation and link. I figured that with either C or Z set that it became a TESTx but with CZ = 00 or 11 then it was a BITx. Tricky!