PR0 to PR7 are termed Communication Registers .Registers $1E0 to $1EF appear to be in limbo?
Bob Drury
Posts: 236
in Propeller 2
Below is a list of named registers from the documentation. For some reason $1E0 to $1EF is not named . PR0-PR7 are called communication registers in the documentation. Is $1E0-$1EF reserved for a special function yet to be specified?
PR0 $1D8 IJMP3 $1F0 PTRA $1F8
PR1 $1D9 IRET3 $1F1 PTRB $1F9
PR2 $1DA IJMP2 $1F2 DIRA $1FA
PR3 $1DB IRET2 $1F3 DIRB $1FB
PR4 $1DC IJMP1 $1F4 OUTA $1FC
PR5 $1DD IRET1 $1F5 OUTB $1FD
PR6 $1DE PA $1F6 INA $1FE
PR7 $1DF PB $1F7 INB $1FF
Regards
Bob (WRD)
Comments
What documentation did you get that PR0..PR7 from?
I don't see that in the silicon doc...
Maybe that's something old...
Here is where I got info. PR0-PR7 can be referenced directly (eg, MOV PR0,#1)
https://docs.google.com/document/d/16qVkmA6Co5fUNKJHF6pBfGfDupuRwDtf-wyieh_fbqw/edit#heading=h.lcty4rb2rm1s
In document Under "Variables" is a chart.
Regards
Bob (WRD)
Interesting... Spin2 has added some things lately...
I do see this there: $1E0..$1EF, which are available for scratchpad use, but will likely be rewritten when Spin2 resumes.
Also, I see this:
Avoid writing to $130..$1D7 and LUT RAM, since the Spin2 interpreter occupies these areas. You can look in "Spin2_interpreter.spin2" to see the interpreter code.
Where I think we decided that $130 is wrong by looking at that .spin2 file.
I believe $1E0-$1EF are used internally by the Spin interpreter.
I used $1E0-$1EF and $1D0-$1DF for the monitor and SD in the ROM but Chip used that in spin2 which broke the ROM toolbox so I know for sure these are used by spin2
It looks like $1E0-$1Ef should be listed as not usable when spin is used/
Thanks for Info
Bob (WRD)
Actually, the Spin2 interpreter starts at $124 now, not $130.
Some of you noted this in the Spin2 doc and I changed these references today.
I think you can use them when doing pasm2 with Spin2. But, they will be used by Spin2 when not doing pasm2.
So, they are for temporary use only…
cgracey
Does this mean that the spin interperter fits between $124 to $1D7 for 172 bytes ?
Pretty amazing if so.
Regards
Bob (WRD)
cogRAM addresses are in longwords, not bytes. My understanding is the core of the engine sits in lutRAM, but hubRAM will be used too. Especially for debug() feature.
Chip posted this about HUB RAM usage:
The Spin2 interpreter is now 4,784 bytes long, occupying $00000..$012AF
So, I think it's mostly in the hub.
When I said 172 bytes I was thinking longs oops. If spin interperter actually exist in HUB ram then the 172 cog bytes are needed to step through the hub spin code. I guess if spin is running in every cog
the same 172 longs would exist in every cog and hub spin code would probably only exist once with a bunch of stack space in hub ram. So spin is 4k bytes hub space and 172x4 bytes cog space.
I am in over my head and should shut up.
Regards
Bob (WRD)
There might be some in LUT too
That's right.
Spin2 uses $124..$1D7 in cog RAM, plus LUT $210..$3FF, then the first 4KB+ of hub 4AM.