you can fake one like dos tho
ohh my crappy code how u look so tiredly old
Rem * Title : dark basic operating system
Rem * Author : david smith
Rem * Date : june 20 2000
rem ===========================================
rem DARK BASIC OPERATING SYSTEM not really
rem by indi
rem ===========================================
remstart
This program is like a simple Operating System using darkbasic
A command line interface much like dos or unix
but with multimedia capabilities
type help to show all instructions
written by david smith
june 2000 sydney, australia
the source code below is freeware
drop me a email if you use or like this , ok :)
This source code is not to be used for commercial use
It is an educational and demonstration of what dark basic can achieve.
remend
rem --------START DBOS------------
rem Clear the screen
cls
rem Set the ink to white and paper color to black
ink rgb(244,214,210),1
rem Set a new font
rem the new font will work with all text command but not the print command
set text font arial$
set text size 24
rem Set the ink to white and paper color to black
ink rgb(244,214,210),1
rem Load a bitmap onto the screen
set cursor 10,350
load bitmap "Osmedia\system\splashscreen\dbos_start_screen.bmp"
rem ---LOGON TO SYSTEM
userprompt$="$"
relogin:
print "logging on to D B O S beta 1.0"
input "username :",name$
input "password :",passwd$
print
print ".....verifying....."
wait (500)
rem username and password checks
if name$="guest" and passwd$="guest" then goto login else goto relogin
rem login is successfull from here after passing the logon() function
login:
cls
print " Hello "+name$
print
print
print " Welcome to a study in using DarkBasic to make an"
print " Operating system"
print
print " this OPERATING SYSTEM plays sound and video from the command line"
print
print " As usuall Use at Your Own Risk its only a beta! just a precaution"
print " this is freeware and not for commercial purposes whatsoever!"
print " some functions if not given the correct commands break you out"
print " of the program. no biggy :)"
print
print
print "PRESS ANY KEY TO AGREE TO THESE TERMS"
print "PRESS ESCAPE TO DISAGREE TO THESE TERMS"
print
print
print
print
print
print
print "made by david smith"
print "[email protected]"
print "http://www.ar.com.au/~mud/allez"
suspend for key
cls
rem ------------------------------------------
rem - the big loop COMMAND LINE INTERFACE
cls
do
rem user prompt
set text font arial$
set text size 16
text 500,10,"Dark Basic OS"
text 550,50,get date$()
text 500,30,"type help for all cmds"
print name$+userprompt$ : input "cmd:",user_request$
if user_request$ ="changeprompt" then print "enter newprompt" : input userprompt$ : print : print "newprompt is :" + userprompt$ : print
if user_request$ ="changename" then print "enter newname" : input name$ : print : print "new name is :" + name$ : print
if user_request$ ="drives" then drives()
if user_request$ ="list" then directory()
if user_request$ ="quit" then exitdbos()
if user_request$ ="help" then helplist()
if user_request$ ="cd" then changedir()
if user_request$ ="folder" then makefolder()
if user_request$ ="delfolder" then killfolder()
if user_request$ ="copy" then copyfile()
if user_request$ ="delete" then deletefile()
if user_request$ ="cls" then clearscreen()
if user_request$ ="time" then getcurrenttime()
if user_request$ ="date" then getcurrentdate()
if user_request$ ="" then print nocommand()
if user_request$ ="home" then gotohome()
if user_request$ ="playwav" then playwav()
if user_request$ ="playavi" then playavi()
loop
rem ------------------------------------------
rem ----FUNCTIONS------------
rem ------function ---NO COMMAND
function nocommand()
print user_request$
print "not a command.. type> help <for commands"
endfunction
rem ------function ---PRINT AVAILABLE DRIVES
function drives()
rem List available drives
cls
print "Available drives are :"
print
drivelist
print
endfunction
rem ------function ---CHANGE DIRECTORIES
function changedir()
rem List available drives
print
print "changing directory"
print "type in the path to goto..."
print homepath$
input path$
if path$="" then print "defaultpath":path$="/DBOS"
print
print
dir
cd path$
print
endfunction
rem ------function --- CLEAR SCREEN
function clearscreen()
cls
endfunction
rem ------function --- GOTO HOME DIRECTORY
function gotohome()
homepath$="/DBOS"
cd homepath$
dir
endfunction
rem ------function --- change your name
rem -----this is a dynamic function so lives
rem -----in the loop at the top
rem ------function -- GET CURRENT DATE
function getcurrentdate()
print "The current DATE is :";get date$()
print
endfunction
rem ------function -- GET CURRENT TIME
function getcurrenttime()
print "The current TIME is :";get time$()
print
endfunction
rem ------function --- PRINT CURRENT DIRECTORY
function directory()
rem List files in current directory
cls
print "Files in current directory:"
print
dir
print
endfunction
rem ------function --- PLAY WAV FILE
function playwav()
cls
print "changing to root directory"
gotohome():cls
print
wavpath$="D:/DBOS/Osmedia/wavs/"
cd wavpath$
print "displaying DBOS/OSmedia/wav Directory"
dir
print "type in the full name of a wav file above"
input playsoundfile$
load sound playsoundfile$,1
if playsoundfile$ = "" then print "type full filename ok"
rem Play sound number
play sound 1
rem Will wait for you to press any key
print "press any key to continue"
suspend for key
rem Stop sound
stop sound 1
rem Delete sound
delete sound 1
endfunction
rem ------function --- PLAY AVI FILE
function playavi()
cls
print "changing to root directory"
gotohome():cls
wavpath$="D:/DBOS/Osmedia/avis/"
print
cd wavpath$
print
print "displaying DBOS/OSmedia/avis Directory"
dir
print
print "Instructions.."
print "---------------------------------------------------"
print "type in the full name of one of the avi files above"
print
input "enter name or path here :",playavifile$
enterloopamount:
load animation playavifile$,1
rem Place your AVI near the top left corner of the screen
place animation 1,10,10,150,150
rem Will play your AVI animation
play animation 1
rem Wait a while
sleep 10
rem Pause AVI
pause animation 1
print "first frame open - press any key to begin"
rem Will wait for you to press any key
suspend for key
resume animation 1
rem Wait some more
print "last frame complete - press any key to finish"
rem Will wait for you to press any key
suspend for key
delete animation 1
rem Delete the animation
endfunction
rem ------function --- MAKE A DIRECTORY OR FOLDER
function makefolder()
startmakefolder:
rem List files in current directory
cls
print "Make a folder"
print
print "the current directory"
print
dir
print
input "Enter New Folder Name : ",foldername$
make directory foldername$
print
print foldername$;" made"
print
print "refreshing the directory"
dir
print
endfunction
rem ------function --- Delete A DIRECTORY OR FOLDER
function killfolder()
rem List files in current directory
cls
print "Delete a Directory or Folder"
print
dir
print
input "Enter the foldername to delete : ",foldername$
print
print foldername$+" being deleted"
print
delete directory foldername$
print
print foldername$;" deleted"
print
dir
print
endfunction
rem ------function --- COPY A FILE
function copyfile()
PRINT "copy a file"
PRINT "enter filename to copy"
input sourcefile$
PRINT "enter new filename"
input destfile$
rem Copy an existing file to a new file
if file exist(sourcefile$)=1
if file exist(destfile$)=0
copy file sourcefile$,destfile$
print destfile$;"file copied."
else
print "file already exists."
endif
endif
endfunction
rem ------function --- DELETE FILE
function deletefile()
print "enter filename to delete"
input deletefilename$
delete file deletefilename$
print deletefilename$;" deleted forever! :)"
endfunction
rem ------function --- EXIT DB OS
function exitdbos()
rem Clear the screen
cls
load bitmap "\Osmedia\system\splashscreen\dbosend.bmp"
text 240,390,"press any key to continue"
rem Wait for key press
suspend for key
rem End the program
end
endfunction
rem ------function --- PRINT HELP LIST
function helplist()
rem List files in current directory
cls
print " --< DARK BASIC OS HELP COMMANDS >-- "
print
print "drives shows available drives"
print "list lists all files in current directory"
print "help shows all available commands"
print "quit exits out of the DBOS command line"
print "cd changes directories needs user to input the path"
print "folder makes a folder in the current directory or path"
print "delfolder deletes a folder in the current directory or path"
print "copy copies a file , user input required "
print "delete deletes a file , user input required "
print "cls clears the screen "
print "date prints the current date "
print "time prints the current time "
print "home returns user to DBOS home directory"
print "changeprompt changes the command line prompt"
print "playwav allows to play wav files in a certain location"
print "playavi allows to play avi files in a certain location"
print
endfunction