Useful Assembly-Language Subroutines


This table lists assembly-language subroutines that you may want to use in your programs.



SBA

Action


128Performs an I/O operation to determine if he printer specified by { DEV } is connected to the calculator. (The default setting for { DEV } is 12, the primary device number for the printer emulation.) System flag 74 is set if the printer is connected/enabled. Flag 74 is reset if the printer is not connected/enabled. Flag 74 is also set or reset, as appropriate, each time a print or advance function is performed.

216Performs the { LC } function, toggling the uppercase/lowercase status and indicator of the alpha mode.

21APerforms the [ 2nd ] function, toggling the second function status of the calculator. The 2nd indicator

21CStores in memory address 2107 the ASCII code of the last key that was pressed. If there is no ASCII code associated with the key, a zero is stored in address 2107. This subroutine can be used after a { KW } instruction to find the ASCII code of the key that was pressed.

226Displays data, similar to a pause instruction, but without the one-second delay of the pause instruction.

256Updates the indicator information in the display.

268Delays program execution for approximately one second. The display is not updated.

27CWaits until no keys are held down before permitting program execution to continue.

358Performs the [ OFF ] function, turning off the calculator.

36AClears the alpha register and sets the cursor to column one.

396Tests whether the cartridge "port" contains a cartridge. If there is no cartridge in the port, execution proceeds normally. If there is a cartridge in the port, the instruction following this subroutine call is skipped. (On RPD-95, there is always either a 32K RAM, or software library cartridge present in the "port".)

3B2Performs the [ 2nd ] [ F:CLR ] function, clearing the function key definitions from the display.

490Performs the [ ON ] function. Executing this subroutine stops program execution, clears the subroutine return stack, sets the program counter to step 0000, calculates the memory checksum, and displays the message MEM MAY BE LOST. The memory message is displayed because the contents of system memory have changed since the power-off checksum was calculated.

Note:

Using assembly-language subroutines not included on this list can produce unexpected results, including loss of data in RPD-95 memory.


Back