Sunday, 3 February 2013

Useful links for Propeller Programmers

(1) Parallax's Original Spin interpreter code...
http://forums.parallax.com/showthread.php/101336...

(2) The Propeller's "Three Bit Protocol" for code downloads
http://forums.parallax.com/showthread.php/97913-The-3-Bit-Protocol

(3) Minimal PASM bootstrap code...
http://forums.parallax.com/showthread.php/86056....

(4) More general info on cool Prop stuff and a bit more detail about the 3bit protocol...
http://propeller.wikispaces.com/Download+Protocol

(5) A rather eclectic PDF of various Propeller based topics including some fascinating topics.  I believe the content was generated by the nice folks at http://propeller.wikispaces.com/ Here's the PDF.

(6) The entire Propeller Boot ROM source code (Courtesy of Sir Chip Gracey)
http://forums.parallax.com/showthread.php/101483...



//----------------------------------------//

//An exerpt from that minimal bootstrapping code forum thread...

Minimal Spin bootstrap code for assembly language launch
--------------------------------------------------------

$0000: HZ HZ HZ HZ CR CS 10 00 LL LL 18 00 18 00 10 00
$0010: FF FF F9 FF FF FF F9 FF 35 37 04 35 2C -- -- --

$0020: your assembly code starts here - loaded into COG #0


elaboration:

$0000: HZ HZ HZ HZ - internal clock frequency in Hz (long)
$0004: CR········· - value to be written to clock register (byte)
$0005: CS········· - checksum so that all RAM bytes will sum to 0 (modulus 256)
$0006: 10 00······ - 'pbase' (word) must be $0010
$0008: LL LL······ - 'vbase' (word) number of longs loaded times 4
$000A: 18 00······ - 'dbase' (word) above where $FFF9FFFF's get placed
$000C: 18 00······ - 'pcurr' (word) points to Spin code
$000E: 10 00······ - 'dcurr' (word) points to local stack

$0010: FF FF F9 FF - below local stack, must be $FFF9FFFF
$0014: FF FF F9 FF - below local stack, must be $FFF9FFFF
$0018: 35········· - push #0·· (long written to $0010)
$0019: 37 04······ - push #$20 (long written to $0014)
$001B: 35········· - push #0·· (long written to $0018)
$001C: 2C········· - COGINIT(0, $20, 0) - load asm code from $20+ into same COG #0
$001D: -- -- --··· - filler

$0020: XX XX XX XX - 1st long of asm program to be loaded into COG #0
$0024: XX XX XX XX - 2nd long of asm program to be loaded into COG #0
$0028:············ - rest of data

4 comments:

  1. Cool! Learned something new, thanks.

    You wouldn't happen to have any pointers on the serial protocol involved in programming a Propeller? I'll go do some more searching and break out the bus pirate but thought I'd ask.

    ReplyDelete
  2. I've updated the links a bit, (2) and (4) should be of some assistance with the 3BP :)

    I also found a great PDF about this kind of thing but I've mislaid it, I'll try to dig it out again, watch this space.

    ReplyDelete
  3. Found it!! See item (5) in the main article.

    ReplyDelete
  4. The Propeller GCC website (officially supported by Parallax) is at:
    https://sites.google.com/site/propellergcc/

    The PropGCC website also has a link to SimpleIDE but it's not the latest version. The most recent version of SimpleIDE (and PropGCC) is at:
    https://code.google.com/p/propside/downloads/list

    ReplyDelete