Java: fix escaping of '/'.
[jackhill/mal.git] / basic / step1_read_print.in.bas
index 74a364f..aa0c45f 100755 (executable)
@@ -1,7 +1,8 @@
 GOTO MAIN
 
-REM $INCLUDE: 'readline.in.bas'
+REM $INCLUDE: 'mem.in.bas'
 REM $INCLUDE: 'types.in.bas'
+REM $INCLUDE: 'readline.in.bas'
 REM $INCLUDE: 'reader.in.bas'
 REM $INCLUDE: 'printer.in.bas'
 
@@ -19,7 +20,7 @@ END SUB
 
 REM PRINT(A) -> R$
 MAL_PRINT:
-  AZ=A:PR=1:GOSUB PR_STR
+  AZ=A:B=1:GOSUB PR_STR
   RETURN
 
 REM REP(A$) -> R$
@@ -31,12 +32,10 @@ SUB REP
   IF ER<>-2 THEN GOTO REP_DONE
 
   A=R:GOSUB MAL_PRINT
-  RT$=R$
 
   REP_DONE:
     REM Release memory from EVAL
     AY=R:GOSUB RELEASE
-    R$=RT$
 END SUB
 
 REM MAIN program
@@ -48,6 +47,7 @@ MAIN:
   REPL_LOOP:
     A$="user> ":GOSUB READLINE: REM call input parser
     IF EZ=1 THEN GOTO QUIT
+    IF R$="" THEN GOTO REPL_LOOP
 
     A$=R$:CALL REP: REM call REP
 
@@ -56,11 +56,12 @@ MAIN:
     GOTO REPL_LOOP
 
   QUIT:
-    REM GOSUB PR_MEMORY_SUMMARY
-    END
+    REM GOSUB PR_MEMORY_SUMMARY_SMALL
+    #cbm END
+    #qbasic SYSTEM
 
   PRINT_ERROR:
-    PRINT "Error: "+ER$
-    ER=-2:ER$=""
+    PRINT "Error: "+E$
+    ER=-2:E$=""
     RETURN