Shop OBEX P1 Docs P2 Docs Learn Events
What areas are reset/cleared during a powerup/reboot, cog loading etc.? — Parallax Forums

What areas are reset/cleared during a powerup/reboot, cog loading etc.?

Phillip Y.Phillip Y. Posts: 62
edited 2006-05-18 04:58 in Propeller 1
What areas are reset/cleared during a power up / reboot etc·?

"If a host is present, a conversation ensues via P30 (TX),
and the host·MAY load the main memory's RAM with high-level code",·F10 from the propeller tool.
Does·the Propeller tool load the Entire 32 user memory , or only what is needed/used ?
Under Boot loader program control with no serial host found.
Is the entire contents of the eeprom loaded to the 32k user memory, or only what is needed/used ?
High-level code is what initially executes from the programmer's perspective.
It is capable of booting extra cogs with either other
high-level tasks or assembly-language programs.
When a cog is loaded with assembly code,
Is it cleared first·?
Is the entire cog 2k memory loaded or only what is needed/used ?
Does SPIN initialize Variables ?

Phillip Y.

Comments

  • cgraceycgracey Posts: 14,206
    edited 2006-05-18 04:58
    Phillip Y. said...
    What areas are reset/cleared during a power up / reboot etc·?

    "If a host is present, a conversation ensues via P30 (TX),
    and the host·MAY load the main memory's RAM with high-level code",·F10 from the propeller tool.
    Does·the Propeller tool load the Entire 32 user memory , or only what is needed/used ?
    It loads what is needed and the rest gets cleared to zeros.
    Under Boot loader program control with no serial host found.
    Is the entire contents of the eeprom loaded to the 32k user memory, or only what is needed/used ?
    The entire 32KB EEPROM is loaded verbatim.
    High-level code is what initially executes from the programmer's perspective.
    It is capable of booting extra cogs with either other
    high-level tasks or assembly-language programs.
    When a cog is loaded with assembly code,
    Is it cleared first·?
    Is the entire cog 2k memory loaded or only what is needed/used ?
    The entire COG RAM· ($000..$1EF) gets loaded in sequence from main memory. The last 16 registers ($1F0-$1FF, which control I/O, counters, video)·are cleared to zeros. The fact that much of the COG RAM may get loaded with irrelevant·data trailing the actual program doesn't matter in practice, as this RAM is out of the range of the program's self-reference. However, the contents of registers declared using RES directives will contain this trailing data, so the programmer should be aware that their initial contents are indeterminant.
    Does SPIN initialize Variables ?
    All VAR-declared variables are initialized to zeros. Within PUB/PRI routines, only the RESULT value is cleared to zero. All local variables are initially indeterminate because they exist only temporarily in the stack.

    Phillip Y.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.

    Post Edited (Chip Gracey (Parallax)) : 5/18/2006 7:29:51 AM GMT
Sign In or Register to comment.