Shop OBEX P1 Docs P2 Docs Learn Events
How do you see how much of RAM you've used up? — Parallax Forums

How do you see how much of RAM you've used up?

basicstampedebasicstampede Posts: 214
edited 2008-09-02 00:43 in General Discussion
Hello.· Is it possible to view how much RAM your program has used up?· (i.e. similar to viewing how much of the program EE you've used up but for RAM).
·






·

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-09-01 21:29
    Ja!

    After you compile, in SX toolbar·select Run and then from that drop-down menu select·Device.
  • JonnyMacJonnyMac Posts: 9,215
    edited 2008-09-01 22:37
    There is no specific tool that shows how much RAM (variable) space you've used. If you want to know about program space (Flash), the use Run -> Device as PJ suggests.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-09-01 23:56
    SASM does generate a .map file which contains the memory map I suspect.
    No information about that file type is available in the sxkey manual, nor on sxlist.com
    Sxkey does not require the .map file.
    Perhaps PJMonty (who maintains the IDE) can give us more info about·the .map files·format.
    Then it might be possible to convert it to ascii text.
    (or perhaps such a tool already exists).

    regards peter
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-09-01 23:58
    Oh, OK; the·RAM, like what you've set aside for VARiables (arrays, bytes, words).· When you go over you get a nice error message when you compile: VARIABLE EXCEED AVAILABLE RAM (Yippee!)

    127 Bytes (??)
  • ZootZoot Posts: 2,227
    edited 2008-09-02 00:43
    SX/B on an SX28:

    Registers $0D-$0F -- 3 bytes of true "global" user ram

    Registers $10-$1F -- 16 bytes of "normal" variable space

    Registers $30-$3F, $50-$5F, $70-$7F, $90-$9F, $B0-$BF, $D0-$DF = 6 x 16 bytes = 96 bytes array/bank RAM

    Registers $F0-$F4 = 5 bytes (array)
    Registers $FD-$FF = 3 bytes (array)

    __INTPARAMFSR stack (5 bytes SX/B 1.x, 6 bytes SX/B 2.0) = can be claimed if you have NOPRESERVE on and know what you're doing

    __PARAM1-__PARAM5/__PARAMCNT = 5 bytes of global ram can be used in all sorts of ways, but make sure use doesn't conflict with high level SX/B commands

    On the SX48 in addition to the extra 16 byte banks, 2 more globals are used and $FD-$FF are shadow TRIS registers.

    SX/B 2.0 uses one more variable in the INTPARAMFSR stack (for PARAM5/PARAMCNT save/restore), and aligns bytes in $Fx slightly differently.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
Sign In or Register to comment.