Zero Footprint - eat your heart out Hippy ·
(just kidding - great to get groups together for lateral thinking !)
I wouldn't have thought about placing the code in the shadow ram, but for your (Hippy's) code.
See PASM debug with just one long !·· http://forums.parallax.com/showthread.php?p=747204
Also see Debug SPIN and ASM - LMM style· http://forums.parallax.com/showthread.php?p=743062
This is how it works...
The first 3·
long of the cog are copied out before loading from hub and replaced with a little bootstrap. When the cog is loaded this bootstrap copies 4 longs into the cog shadow ram at $1F0-1F3 and then jumps to $1F0 to execute.·
This executes a micro-LMM kernel in hub ram (4 longs + 1 long for variable space) - this must be located in hub ram at and below $1FF.
Spin code controls the micro-LMM kernel. The spin firstly replaces the first 3 longs in the cog which had held the temporary bootstrap.
Now spin can control and execute any single-stepping, debugging, reading or writing to the cog as desired.
I still believe that the debug code can reside in LMM (rather than a seperate cog running spin). However, that will have to wait for another day.
I use the FullDuplexSerial object modified to FullDuplexSerial2.spin - it has out(txbyte) equivalent to tx(txbyte) and PST. This makes it easier to change to the TV object that Hippy uses.
The spin debug code is only proof of concept and will require further work. Enjoy
: Is the copyright message as you want it??? I would rather acknowledge you directly.
Postedit: See the latest post(s) for the latest code release.
Prop Tools under Development or Completed (Index)
My cruising website http://www.bluemagic.biz
Post Edited (Cluso99) : 1/10/2009 8:58:23 AM GMT