www.jupiter-ace.co.uk

Previous Page > Listings Index > Words


Words listing from Popular Computing Weekly 27 October - 2 November 1983

Words
   
on Jupiter Ace
This is a listing of Forth words. These words will fit on any Jupiter
Ace regardless of memory and are intended to provide missing or helpful features for the competent
programmer. Simply type them in as they are printed and they will be ready for use.

EXPECT
This requires two numbers on the stack, on top a delimiter and second from top an address. What it does is give the user a chance to type in a string and then it will put the first character to the specified address, the second to the address + 1 and so on. This is handy as it allows several messages to be typed in and stored in memory leaving the Pad free for more immediate things.

: EXPECT
QUERY WORD C@ 0
DO
9986 I+ C@ OVER
I+ C!
LOOP
DROP
;
MEM
This simply tells the user how many spare bytes are left for Forth programming.

: MEM
15384 @ HERE - CR
." Bytes left."
CR
;

SCREEN-
This needs two numbers on the stack, a line number second from top and on top a column number. It will leave on top of the stack the character code of the character at those screen coordinates and also set the print position to those coordinates as well.


: SCREENS
AT 15388 @ C@
;


BASE
This will tell the user the present number base in decimal, eg, if the computer is working in Hex ?base will display Base 16. It does not alter the number Base.




: ?BASE
BASE C@ DUP DECIMAL
CR ." Base" . CR
BASE C!
;

NORMAL
This word will reset various system variables, they are;
Base set to 10 (ie, decimal).
Visible mode restored.
Slow mode restored.
Both stacks are cleared.
The screen is cleared.


: NORMAL
CLS DECIMAL VIS
SLOW QUIT
; 














Words
by A Cranston