does cognew ignore $1F0-$1FF of the cog image in the dat section?
Bill Henning
Posts: 6,445
My gut feeling is yes, because I remember reading this on the forums earlier that when loading a cog, $1F0-$1FF are zero'd, regardless of the contents of the image.
However it is possible that it might load the shadow registers instead, so I thought I'd save time and ask, instead of determining it experimentally.
I intend to use that area for the standardized "driver configuration block" for Largos - 16 longs is more than enough, and it would be easy to point par at it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Las - Large model assembler for the Propeller (alpha version this week)
Largos - a feature full nano operating system for the Propeller
www.mikronauts.com - a new blog about microcontrollers
However it is possible that it might load the shadow registers instead, so I thought I'd save time and ask, instead of determining it experimentally.
I intend to use that area for the standardized "driver configuration block" for Largos - 16 longs is more than enough, and it would be easy to point par at it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Las - Large model assembler for the Propeller (alpha version this week)
Largos - a feature full nano operating system for the Propeller
www.mikronauts.com - a new blog about microcontrollers
Comments
-Phil
I'm not positive how COGINIT works, but I believe that the RDLONG logic is used with the source data forced to zero for locations $1F0-$1FF. That would load the shadow RAM with zeros.
I just realized something.
Cog code in DAT sections is often much shorter than the full 512 longs, so as Mike says (and my hazy memory agrees) there must be logic to zero loading $1F0-$1FF otherwise the startup state of DIRA et al (and shadow registers) would be indeterminate!
Amazing how much it helps to drink coffee in the morning and solicit other people's advice
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Las - Large model assembler for the Propeller (alpha version this week)
Largos - a feature full nano operating system for the Propeller
www.mikronauts.com - a new blog about microcontrollers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Las - Large model assembler for the Propeller (alpha version this week)
Largos - a feature full nano operating system for the Propeller
www.mikronauts.com - a new blog about microcontrollers
However, the DAT section for a cog does not need to be 496 long. So for instance if it is 300 longs, then 496 will still be copied, but of course the last 196 will be whatever was in hub following the 300 longs. i.e. they are not zeroed. So for your question about using the remaining 16 longs, the point is actually irrelevant as they could be anywhere. For Largos, this could be an ideal position to place those longs. Hope this makes sense.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Post Edited (Cluso99) : 6/10/2009 2:44:51 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Las - Large model assembler for the Propeller (alpha version this week)
Largos - a feature full nano operating system for the Propeller
www.mikronauts.com - a new blog about microcontrollers