Command Post Home Page : TI-Basic
Extensions
|
|
Command Post TI-Basic Extensions
The Command Post TI-Basic Extensions are available via the catalog, and the var-link
screens. Each extension has extensive help built into the catalog. This help system
can be accessed by pressing Catalog on the TI-89, or 2nd Catalog on the TI-92 Plus,
next, press F3 (Flash Apps), and finally, press F1 on any of the cmdpost extensions.
Bit Manipulation
The Bit Manipulation TI-BASIC extensions bclr, bset, and btst allow you to easily
clear, set and test bits. Each command accepts two arguments address and bit_number.
bit_number must be between 0 and 7. There are no limitations on the address. All
commands return the previous value at location address before performing the requested
operation.

HeapDRef(handle)->int
The HeapDRef function takes a handle as an argument, calls HeapCompress, and then
returns the result of HeapDeref(handle); Please note that this function is considered
experimental, and you should not depend on the value returned by it to remain valid
for any period of time. This function is best used with the Peek and Poke extensions.

LowMem( [enabled], [mode], [bytes] )->List
The LowMem TI-Basic Extension accepts at most three arguments: enabled,
mode, and bytes. These correspond with the Low RAM
Simulation dialog box.
- Enabled must be either 1 or 2.
1 turns on the Low Ram Simulation, and 2. turns the simulation off.
- Mode must be either 1 or 2.
1 sets the mode to All Except, and 2. will set the mode to Use
- Bytes tells the low ram simulation how many bytes are to be used or
left free depending on the Mode setting.
LowMem returns a three-element list that corresponds to the settings that
were active before they were changed to the ones that you requested.
Tip: You do not need to specify all three arguments. LowMem(0) for example,
is a legal syntax that turns off the Low RAM Simulation.
Tip: If you do not know what the current Low RAM Simulation settings are,
type LowMem()
Note: The amount of ram used, or left free by the simulation may be different
than expected. The simulation does not know how many bytes will be used by the
operating system after a call to LowMem has been made. The Home Screen Application,
for example, places the results of the LowMem operation in the Home Screen History.

Peek(address)->int
The Peek basic extensions allow you to read bytes in memory using a style which
is common in most dialects of the BASIC language. The address that you pass to
this function should be even if you are using the W or L variants, or an Address
Error will be thrown. PeekB returns 1 byte, PeekW returns 2 bytes, and PeekL returns
4 bytes from the specified memory location.

Poke(address, new_value)->int
The Poke basic extensions allow you to store bytes in memory using the style which
is common in most dialects of the BASIC language. The address that you pass to
this function should be even if you are using the W or L variants, or an Address
Error will be thrown. The new value that you specify will be truncated to fit the
data type you specify (PokeB writes 1 byte, PokeW writes 2 bytes, and PokeL writes
4 bytes). The value previously stored at the address you poke'd a value to will
be returned.

Shuffle()
The Shuffle TI-Basic Extension is designed to help debug applications by
shuffling the Heap so that all dereferenced HANDLEs become invalid. This is the
same as using the HeapShuffle(); ROM call.

|