? Simulating DIRECT Mode ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Simulating DIRECT Mode

DIRECT mode is actually not that complex. The following code simulates how it works, including how it parses syntax (what you think might be wrong in the code can actually be right). It’s not exact, as the simulator uses slot 3 to run code. 'DIRECT Mode Simulator 'By HTV04 PRGEDIT 3 PRGDEL -1 PROJECT OUT PRJN$ WHILE 1 IF PRJN$=="" THEN PRINT "OK" ELSE PRINT "["+PRJN$+"]OK" ENDIF LINPUT "";E$ IF LEFT$(E$,5)=="NEW 1" THEN PRGEDIT 1 PRGDEL -1 PRGEDIT 3 ELSEIF LEFT$(E$,5)=="NEW 2" THEN PRGEDIT 1 PRGDEL -1 PRGEDIT 3 ELSEIF LEFT$(E$,5)=="RUN 1" THEN EXEC 1 ELSEIF LEFT$(E$,5)=="RUN 2" THEN EXEC 2 ELSE PRGINS E$ EXEC 3 PRGDEL -1 ENDIF WEND
Author
HTV04
Updated
Rating
1 vote
Categories
Keywords
0 Comment(s)