mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-11-29 21:49:17 +00:00
9a568b3a03
Names are adapted to DOS 8.3 file names, PETSCII adaptions of core.fth are reverted (DOS uses ASCII), the input test is disabled, since no way was yet found to inject keystrokes into dosbox. And some tweaks were applied to ans-shim.fth and the golden files to make the first tests (preliminary & core) to pass.
36 lines
950 B
Forth
36 lines
950 B
Forth
\ From: John Hayes S1I
|
|
\ Subject: core.fr
|
|
\ Date: Mon, 27 Nov 95 13:10
|
|
|
|
\ (C) 1995 JOHNS HOPKINS UNIVERSITY / APPLIED PHYSICS LABORATORY
|
|
\ MAY BE DISTRIBUTED FREELY AS LONG AS THIS COPYRIGHT NOTICE REMAINS.
|
|
\ VERSION 1.2
|
|
\ THIS PROGRAM TESTS THE CORE WORDS OF AN ANS FORTH SYSTEM.
|
|
\ THE PROGRAM ASSUMES A TWO'S COMPLEMENT IMPLEMENTATION WHERE
|
|
\ THE RANGE OF SIGNED NUMBERS IS -2^(N-1) ... 2^(N-1)-1 AND
|
|
\ THE RANGE OF UNSIGNED NUMBERS IS 0 ... 2^(N)-1.
|
|
\ I HAVEN'T FIGURED OUT HOW TO TEST KEY, QUIT, ABORT, OR ABORT"...
|
|
\ I ALSO HAVEN'T THOUGHT OF A WAY TO TEST ENVIRONMENT?...
|
|
|
|
CR
|
|
TESTING CORE WORDS
|
|
HEX
|
|
|
|
\ ------------------------------------------------------------------------
|
|
TESTING INPUT: ACCEPT
|
|
|
|
CREATE ABUF 50 CHARS ALLOT
|
|
|
|
: ACCEPT-TEST
|
|
CR ." PLEASE TYPE UP TO 80 CHARACTERS:" CR
|
|
ABUF 50 ACCEPT
|
|
CR ." RECEIVED: " [CHAR] " EMIT
|
|
ABUF SWAP TYPE [CHAR] " EMIT CR
|
|
;
|
|
|
|
T{ ACCEPT-TEST -> }T
|
|
|
|
CR .( End of Core input word set tests) CR
|
|
|
|
|