DECLARE SUB main () DECLARE SUB makefile () DECLARE SUB readfile () dir$ = "A:\" CLS COLOR 15, 0 PRINT PRINT "Microsoft Corporation Version 3.30" PRINT "Copyright 1981-1995 " DO PRINT dir$ + " >"; INPUT "", com$ 'prompt coma$ = LEFT$(com$, 4) comb$ = MID$(com$, 6, 60) SELECT CASE coma$ CASE "quit" 'quit SYSTEM CASE "cls" 'clears screen CLS CASE "chan" 'changes dir CHDIR comb$ dir$ = comb$ CASE "show" 'shows files in dir and free disk space FILES dir$ CASE "desf" 'deletes a file KILL comb$ CASE "mdir" 'makes a dir MKDIR comb$ CASE "desd" 'destroys a dir RMDIR comb$ CASE "renf" 'renames a file INPUT "type the new filename", nfname$ NAME comb$ AS nfname$ CASE "rend" 'renames a dir INPUT "type a new dir name", ndname$ NAME comb$ AS ndname$ CASE "colr" SELECT CASE comb$ CASE "1" COLOR 1 CASE "2" COLOR 2 CASE "3" COLOR 3 CASE "4" COLOR 4 CASE "5" COLOR 5 CASE "6" COLOR 6 CASE "7" COLOR 11 CASE "8" COLOR 8 CASE "9" COLOR 9 CASE "10" COLOR 10 END SELECT CASE "help" 1 PRINT " ROS help menu" PRINT "": PRINT " 1) ROS commands index" PRINT " 2) ROS color index " PRINT " 3) about ROS" PRINT " 4) back to ROS" PRINT "" INPUT "press the number then enter", num! SELECT CASE num! CASE 1 CLS PRINT " commands action" PRINT " cls clear screen" PRINT " chan\dirname changes dir" PRINT " show shows files in a direcory and free disk space" PRINT " desf\filename destroys a file" PRINT " mdir\dirname makes a directory" PRINT " desd\dirname destroys a directory" PRINT " rend\dirname renames a directory" PRINT " renf\filename renames a file" PRINT " colr\## changes font color" PRINT " help opens the help file" PRINT " quit exits ROS" PRINT " shel opens the dos shell (run dos programs)" PRINT " abot shows the about screen" PRINT " rword opens word processor" INPUT "press 1 continue and 2 to print commands", qwer IF qwer = 1 THEN GOTO 1 IF qwer = 2 THEN LPRINT " commands action" LPRINT " cls clear screen" LPRINT " chan\dirname changes dir" LPRINT " show shows files in a direcory and free disk space" LPRINT " desf\filename destroys a file" LPRINT " mdir\dirname makes a directory" LPRINT " desd\dirname destroys a directory" LPRINT " rend\dirname renames a directory" LPRINT " renf\filename renames a file" LPRINT " colr\## changes font color" LPRINT " help opens the help file" LPRINT " quit exits ROS" LPRINT " shel opens the dos shell (run dos programs)" LPRINT " abot shows the about screen" LPRINT " rword opens word processor" GOTO 1 END IF CASE 2 PRINT " some of these colors may be a little off " PRINT "because I am color blind, but I tried my best, sorry" PRINT "1 = dark blue 6 = red" PRINT "2 = yellowred 7 = white" PRINT "3 = cyan 8 = gray" PRINT "4 = orange 9 = light blue" PRINT "5 = pink 10 = yellow" PRINT INPUT "press 1 to continue or 2 to print color list", qwer IF qwer = 1 THEN GOTO 1 IF qwer = 2 THEN LPRINT " some of these colors may be a little off " LPRINT "because I am color blind, but I tried my best, sorry" LPRINT "1 = dark blue 6 = red" LPRINT "2 = yellowred 7 = white" LPRINT "3 = cyan 8 = gray" LPRINT "4 = orange 9 = light blue" LPRINT "5 = pink 10 = yellow" GOTO 1 END IF CASE 3 CLS 'about ROS PRINT : PRINT "It all started on a dark and stormy night in november of '96. Well, not stormy but deffinently dark. It was about 8:00 p.m.. A young man named Travis Schultz nicknamed 'master of the earth' was a little bored so he started programming in the only language he currently knew 'Qbasic'. He thought if the Idea a few days before and was just waiting for the right time to start. about 8:00 was the right time. In just an hour or two with a couple of bathroom or drink breaks he was finished. The best program He had yet made and the only big one he had finished was done." PRINT "the end" INPUT "press enter", qwer GOTO 1 CASE 4 'nothing END SELECT CASE "shel" PRINT : PRINT "you have just entered the dos shell type exit to come back to ROS!!" SHELL PRINT "thanks you for returning to ROS. See It is much better than dos" CASE "abot" PRINT : PRINT "It all started on a dark and stormy night in november of '96. Well, not stormy but deffinently dark. It was about 8:00 p.m.. A young man named Ryan Williams nicknamed 'master of the earth' was a little bored so he started programming in the only language he currently knew 'Qbasic'. He thought if the Idea a few days before and was just waiting for the right time to start. about 8:00 was the right time. In just an hour or two with a couple of bathroom or drink breaks he was finished. The best program He had yet made and the only big one he had finished was done." PRINT "the end" CASE "rwor" CALL main CASE ELSE PRINT "bad command!!!!!! try again" END SELECT LOOP SUB main 6 CLS PRINT : COLOR 9 PRINT " Rword v1.0 for dos " PRINT : PRINT : PRINT PRINT "1) read a file" PRINT "2) make a file" PRINT "3) about Rword" PRINT "4) quit" PRINT : PRINT INPUT "press a number then press enter! ", wertg SELECT CASE wertg CASE 1 CALL readfile CASE 2 CALL makefile CASE 3 CLS PRINT PRINT "Rword v1.0" PRINT "by: TRAVIS SCHULTZ" PRINT "BONEY@CITYNET.NET" PRINT "send questions or comments " PRINT "" PRINT "http://members.tripod.com/~tschultz/home.html" PRINT INPUT "press enter to goto main menu", qwer GOTO 6 END SELECT END SUB SUB makefile start: DIM line$(1000) CLS INPUT "Type A file Name (Example: A:TEST.txt)= ", filename$ OPEN filename$ FOR OUTPUT AS #1 COLOR 11, 0: PRINT "Type only !save on a seperate line and press enter to save your file." PRINT "type only !quit on a seperate line and press enter to quit without saving. " VIEW PRINT 6 TO 24 nextl: x = x + 1 IF x / 20 = INT(x / 20) THEN pg = pg + 1 IF pg = 29 THEN PRINT "this is the line limit!!": BEEP: GOTO save: LINE INPUT "= ", line$(x) IF line$(x) = "!save" OR line$(x) = "!SAVE" THEN GOTO save: IF line$(x) = "!quit" OR line$(x) = "!QUIT" THEN GOTO quit: WRITE #1, line$(x) GOTO nextl: save: PRINT CLOSE #1 PRINT : PRINT INPUT "make another file? y/n "; wert$ IF wert$ = "y" THEN GOTO start: IF wert$ = "n" THEN CALL main quit: LOCATE 25, 1 INPUT "save before quiting? y/n ", qwer$ IF qwer$ = "y" THEN GOTO save: IF qwer$ = "n" THEN CALL main END SUB SUB readfile DIM lines(800) AS STRING * 80 DIM temp(25) AS STRING * 80 CLS INPUT "type file name to read: ", file$ OPEN file$ FOR INPUT AS #1 i = 0 DO 'WHILE NOT EOF(1) LINE INPUT #1, lines(i) i = i + 1 LOOP UNTIL EOF(1) en = i - 1 CLOSE #1 LOCATE 25, 1: COLOR 9, 4: PRINT " Use the arrow keys to scroll up and down. Press the [ESC] key to exit " FOR i = 1 TO 23 LOCATE i, 1: COLOR 7, 0: PRINT lines(i) temp(i) = lines(i) NEXT i DO SELECT CASE INKEY$ CASE CHR$(0) + "H": IF lin >= 1 THEN lin = lin - 1 FOR i = 1 TO 23 IF LEN(lines(i + lin)) >= 81 THEN temp(i) = MID$(lines(i + lin), 1, 80) IF LEN(lines(i + lin)) <= 80 THEN temp(i) = lines(i + lin) LOCATE i, 1: COLOR 7, 0: PRINT temp(i) NEXT i LOCATE 25, 1: COLOR 9, 4: PRINT " use the arrow keys to scroll up and down. Press the [ESC] key to exit " CASE CHR$(0) + "P": IF lin <= en - 30 THEN lin = lin + 1 FOR i = 1 TO 23 IF LEN(lines(i + lin)) >= 81 THEN temp(i) = MID$(lines(i + lin), 1, 80) IF LEN(lines(i + lin)) <= 80 THEN temp(i) = lines(i + lin) LOCATE i, 1: COLOR 7, 0: PRINT temp(i) NEXT i LOCATE 25, 1: COLOR 9, 4: PRINT " use the arrow keys to scroll up and down. Press the [ESC] key to exit " CASE CHR$(27): EXIT DO END SELECT LOOP CLS CALL main END SUB