SecondBASIC Documentation v3

Home / Command Reference / SramWrite

SramWrite

Description: Writes <Data> into <Address> to the external memory bank.

Syntax:

SramWrite <WriteType>, <Address>, <Data>

Part Description
<WriteType> Required. The <WriteType> is either sbWriteWord or sbWriteByte.
<Address> Required. The location in SRAM you want to write to. The SRAM address starts at &h200000. Depending on the addressing mode, you'll be restricted to the EVEN or ODD bytes, unless EVEN is used.
<Data> Required. This is the information to store into SRAM.

Example:

    Enable Sram
    SramWrite sbWriteByte,&h201FFF,ASC("A")
    Disable Sram
 
    Print SramRead(sbReadByte,&h201FFF)