Shop OBEX P1 Docs P2 Docs Learn Events
Experimental FemtoBasic for TriBlade Prop — Parallax Forums

Experimental FemtoBasic for TriBlade Prop

Mike GreenMike Green Posts: 23,101
edited 2009-05-15 05:20 in Propeller 1
Here's an experimental version of FemtoBasic for the TriBlade Prop, Blade #1. Changes are:
The Application key is used as a "break" key rather than ESC.

The SD card support is removed.

Expressions

FLASH [noparse][[/noparse] <flash address> , <byte count> , <buffer address> ]

This transmits 1 to 4 bytes to a Winbond Flash Memory and optionally receives or transmits a block
of data.  <flash address> is 1 to 4 bytes in size with the most significant byte containing an instruction
code for the Flash Memory (see the datasheet for details) and usually the 3 least significant bytes
containing a 24 bit address in the Flash Memory.  If <byte count> is negative, its absolute value is a
count of bytes to be sent to the Flash Memory from <buffer address>.  If <byte count> is positive, it's
a count of bytes to be received from the Flash Memory to <buffer address>.  Normally <buffer address>
is a hub memory address.  If it is zero, then the address of the (long) return value for FLASH[noparse][[/noparse] ] is used.

PAGE

This returns the address of a 256 byte buffer within FemtoBasic.  This is intended for use in BYTE[noparse][[/noparse] ],
WORD[noparse][[/noparse] ], and LONG[noparse][[/noparse] ] expressions and in FLASH[noparse][[/noparse] ] expressions.

Statements

TERM <recv pin> , <xmit pin> , <mode> , <Baud>

This starts a simple terminal emulator using FullDuplexSerial with a 256 byte buffer.  The parameters
are the corresponding values used by the FullDuplexSerial start call.  All keyboard characters are sent
to the serial pins specified except as noted below based on Turbo Pascal's default definitions.
Received characters are displayed on the VGA display.  It's intended that the VT100 interpreter from
propComm will be used, but currently only the control codes used by Chip's hi-res text VGA driver are
interpreted.  Carriage return and line feed have their usual meaning.

            $C0: Left Arrow       - ^S
            $C1: Right Arrow    - ^D
            $C2: Up Arrow        - ^E
            $C3: Down Arrow   - ^X
            $C4: Home              - ^Q ^E
            $C5: End                  - ^Q ^X
            $C6: PgUp              - ^R
            $C7: PgDn              - ^C
            $C8: Backspace    - ^H
            $C9: Del                  - ^G
            $CA: Ins                  - ^V
            $CB: Escape          - ^[noparse][[/noparse]
            $CC: Application Key - Exit to FemtoBasic
            $D0..$DB:
                      Function keys become ESC A to ESC L


This can be used as a simple terminal for Blade #2 and will be used to test and develop a Winbond Flash Memory driver that supports normal file handling. I plan to substitute the Winbond driver for the normal FemtoBasic SD card support and I plan to add VT100 support so this can be used like propComm for a CP/M terminal emulator.

Some minor updates to the Winbond driver were made and a Basic sample program was added.

Post Edited (Mike Green) : 4/27/2009 2:37:08 AM GMT

Comments

Sign In or Register to comment.