Shop OBEX P1 Docs P2 Docs Learn Events
BASIC running from SRAM? — Parallax Forums

BASIC running from SRAM?

Has there been any designs that could run BASIC programs FROM external SRAM using the Propeller?

So, the actual BASIC code would be in external SRAM and a Propeller would be the interpreter.

I know there is the Micromite Companion (which is awesome). But, IIRC, it uses a PIC for the RAM and BASIC interpreter.

Thanks!

Comments

  • JonnyMacJonnyMac Posts: 8,929
    edited 2016-09-27 19:46
    I believe Mike Green wrote a basic interpreter for the Propeller, but I'm not sure where the code resides (perhaps on an SD).
  • yetiyeti Posts: 818
    edited 2016-09-27 20:43
    http://www.instructables.com/id/Pocket-Mini-Computer-Users-Guide/step9/Adding-Extended-Memory/"
    Step 9: Adding Extended Memory

    By adding a 23K256 chip (and recommended .01uf cap) to your Pocket Mini Computer, BASIC will detect and allow you to use the additional 32k as extended memory using PEEK and POKE commands. Additionally, the extended memory can store information when executing and returning from other BASIC and non-basic binary programs.
    That does not read like "the BASIC program is in the SRAM"...

    In PropGCC's demo directory are some BASICs... they use XMM which normally is external SRAM.
  • Yeah, that seems to be just using PEEK/POKE to access external RAM directly. Not executing other command like PRINT, etc.

  • Cluso99Cluso99 Posts: 18,069
    My RamBlade runs CPM2.2 using heaters ZiCog Z80 emulation. 64KB of the 512KB SRAM is used for the Z80 RAM/ROM and the microSD has 8 HDDs mapped - most are 8MB drives. MSBASIC runs fine. So does Wordstar and many other CPM programs.
  • jmgjmg Posts: 15,148
    cbmeeks wrote: »
    Has there been any designs that could run BASIC programs FROM external SRAM using the Propeller?

    So, the actual BASIC code would be in external SRAM and a Propeller would be the interpreter.

    The main Basic for Prop is PropBASIC, which has added IDE support recently.
    What about PropBASIC is unsuitable for what you want to do ?



  • jmg wrote: »
    What about PropBASIC is unsuitable for what you want to do ?

    More than 32K of code.
  • I created a language called XBASIC a number of years ago. The compiler runs on a PC and generates bytecodes that are interpreted by a VM written in PASM. It is pretty fast, I think close to Spin speed and it supports XMM which means it can run very large programs out of external memory. It can use external flash or SRAM. At one time someone had written a set of GUI widgets in XBASIC for an LCD attached to a Propeller so it is capable of doing fairly involved things. Unfortunately, I haven't even tried using it in many years.

    The sources are on github: https://github.com/dbetz/xbasic
  • jmgjmg Posts: 15,148
    A search also finds this discussion...
    http://forums.parallax.com/discussion/118611/download-propbasic-here-00-01-14-last-version-for-bst/p26
    and since then, I think PropBasic source is released ?

    Also appearing are octal SPI parts, you can use 2 x QuadSPI from almost anyone, or Octal parts like Macronix MX25LM51245G, or Adesto ATXP032 hint at what the next-wave will look like.
    David Betz wrote: »
    I created a language called XBASIC a number of years ago. The compiler runs on a PC and generates bytecodes that are interpreted by a VM written in PASM. It is pretty fast, I think close to Spin speed and it supports XMM which means it can run very large programs out of external memory. It can use external flash or SRAM.
    Is that external serial flash ?

  • jmg wrote: »
    A search also finds this discussion...
    http://forums.parallax.com/discussion/118611/download-propbasic-here-00-01-14-last-version-for-bst/p26
    and since then, I think PropBasic source is released ?

    Also appearing are octal SPI parts, you can use 2 x QuadSPI from almost anyone, or Octal parts like Macronix MX25LM51245G, or Adesto ATXP032 hint at what the next-wave will look like.
    David Betz wrote: »
    I created a language called XBASIC a number of years ago. The compiler runs on a PC and generates bytecodes that are interpreted by a VM written in PASM. It is pretty fast, I think close to Spin speed and it supports XMM which means it can run very large programs out of external memory. It can use external flash or SRAM.
    Is that external serial flash ?
    Yes, external serial flash. It will work with any kind of external memory if you write a PASM read/write driver. I implemented the memory interface first for ZOG, then xbasic, and finally PropGCC.

  • jmg wrote: »
    A search also finds this discussion...
    http://forums.parallax.com/discussion/118611/download-propbasic-here-00-01-14-last-version-for-bst/p26
    and since then, I think PropBasic source is released ?
    https://github.com/parallaxinc/PropBASIC
  • Thanks for the info!
  • I wonder how hard it would be to get PropBASIC to generate XMM code? It already knows how to generate LMM code and the two aren't that different in PropGCC.
  • jmgjmg Posts: 15,148
    David Betz wrote: »
    Yes, external serial flash. It will work with any kind of external memory if you write a PASM read/write driver. I implemented the memory interface first for ZOG, then xbasic, and finally PropGCC.

    Sounds promising.
    The parts I listed have Octal-read modes, and also DTR option, which means less lines of SW as CLK toggles.
    I think you may be able to generate a continual CLK, and phase CS.Data to further shrink lines of code..
    All the modes do get complex, but the x8 parts all have larger pin-counts, allowing a RESET# pin, so the design there would be a reset supervisor, and tie P1.RST and Memory.RST

Sign In or Register to comment.