-
Notifications
You must be signed in to change notification settings - Fork 1
dash
The DASH Shell is essential to cubeOS's function. It acts as an interpreter for ASCII commands, which are passed to the package manager in order to directly execute subroutines, and also handles keyboard input.
At the prompt, which is of the form "CWD$", the user can use an attached Generic Keyboard to input ASCII and control characters.
Restarts the DASH Shell by calling s.instance.
Prepares a new terminal session at the root directory.
- SHOULD Set v.cwds to "/ " in packed form (
0x202F
) - Clears the screen
- Calls s.takeIn
- Calls s.parse
- Calls s.stdout with the argument being the cursor location when the user pressed enter
- Loops nonendingly to 3
Writes a prompt to the screen using v.sPrompt and enters a loop to take ASCII input from the keyboard and write it to the screen at cursorPointer. It exits when the user presses enter
.
returns the cursor location on exit
This subroutine isolates the first argument in v.stdin by scanning through, then stopping on null or 0x20. Then, it gets the crp.dshash of the string. Then, it calls p.lookup, sets B
to the location of stdin and C
to the location of stdout, and invokes the subroutine returned by p.lookup.
This should also point the process to the starts of the remaining arguments.
Draws a prompt using env.cwds and v.sPrompt at pointer and sets v.promptLoc to the location following the prompt.
returns the location following the prompt
Performs a C-style copy from startPointer to v.stdin, replacing un-(single)quoted spaces with zeros.
s.stdin.escflag DAT 0 ;is 1 if "" was the most recent character s.stdin.args ;for handling arguments
Does a C-style copy from v.stdout to outputPointer.