-
Notifications
You must be signed in to change notification settings - Fork 1
2dash
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.
- Set env.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
It's not worth documenting this spaghetti code. It will be completely rewritten when package works.
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.