Handle newlines (in both input and output)
[rrq/jonasforth.git] / sys.f
diff --git a/sys.f b/sys.f
index 92efcb4667734414aecfc2bfb2a43a83627301cb..0815e0fe0ca89d729a068e5072a4e8b721635460 100644 (file)
--- a/sys.f
+++ b/sys.f
@@ -76,3 +76,14 @@ EXIT [
     SWAP 1 + SWAP
   1 - DUP 0 = UNTIL
   DROP DROP ;
+
+: NEWLINE 10 EMIT ;
+: SPACE 32 EMIT ;
+
+( Read a number from standard input. )
+: READ-NUMBER READ-WORD PARSE-NUMBER ;
+
+S" Ready." TELL NEWLINE
+
+( vim: syntax=forth
+)