Useful ROM Routines in the TS 2068

Authors

Publication

Pub Details

Date

Pages

BASIC Terms

See all articles from Sinc-Link v4 n5
RST 8 (or CALL 8) – Report an error.
This causes the routine to halt, and report the error whose code is one MORE than the following byte. E.g. RST 8 DEFB 8 is a STOP (Error 9). DEFB 9 for ERROR A, etc. Useful for programming your own error reports.
RST (or CALL) 10H – Print CHR$(A)
Prints the character whose code is in A to the current output stream. This can be used with all the “control characters” listed in the character set, followed by loading any necessary operand or operands into A and using another RST 10. I found that TAB requires two operands like AT, even though the second makes no difference!
CALL 436 H – BEEP
To do a BEEP X,Y, and Y must have been successively placed on the calculator stack with the routines for that purpose. E.g. BEEP 1,30 LD A,1 CALL 30E6 LD A,30 CALL 30E6 CALL 0436H
CALL 73F – PRINT MESSAGE
A very useful routine for handling “ragged” message tables. The table should be at address TABLE, starting with a byte 80H, and with the last character of each message “inverted” by adding 128 to its code to mark the end. The routine is called with TABLE in DE, and the message number in A (The first message is “0”).
CALL 8A6 – CLS
CALL 8A9 – CLEAR LOWER SCREEN
CALL 939H – SCROLL
CALL 938 – PART SCROLL
Scrolls the bottom “B” lines, leaving the screen above intact.
CALL 97F – PART CLEAR
Similar to the last, but CLEARS the bottom B lines.
CALL 26EE – DRAW X, Y,Z
The parameters must be stacked, and H’L’ saved as for CIRCLE.
CALL 2813 – DRAW X,Y
CALL with ABS x 1n C. ABS Y in B, SGH X in E, and SGN Y in D; and save H’L’ as above.
CALL 2E70 – STACK STRING
Passes the “parameters” of & string to the calculator stack as an argument for string functions. At entry, A holds i if the string is “simple”. O if it is DiMensioned or a slice; DE holds the string address; and BC holds the length.
CALL 2EB2 – MULTIPLY 16
This multiplies HL by DE, giving “Out of Memory” if the result overflows.
CALL 2FAF – UNSTACK STRING
Retrieves the “parameters” of a string result from the calculator stack; address to DE, length to BC.
CALL 3046H – ALPHANUM
Returns with CARRY if A holds the code of a letter or digit, NO CARRY otherwise.
CALL 3046 – ALPHA
Returns CARRY if A holds a valid letter code.
CALL 30D9 – NUMERIC
Returns with NO CARRY If CODE “0”<= A ›=CODE “9”.
CALL 30E6 – STACK
A Converts the integer value in A to floating-point and puts in on the calculator stack.
CALL 30E9 – STACK
Converts the integer value in BC to floating-point and puts in on the calculator stack.
CALL 3160H – UNSTACK BC
Retrieves the top value from the calculator stack and loads it into BC.
CALL 31A1 – PRINT FP
Prints the top number on the calculator stack.

Products

 

Media

 

Image Gallery

Source Code

People

No people associated with this content.

Scroll to Top