mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 11:51:49 +09:00
doc: coreutils for tvdos
This commit is contained in:
@@ -465,6 +465,7 @@ shell.coreutils.erase = shell.coreutils.del
|
||||
shell.coreutils.rm = shell.coreutils.del
|
||||
shell.coreutils.ls = shell.coreutils.dir
|
||||
shell.coreutils.time = shell.coreutils.date
|
||||
shell.coreutils.md = shell.coreutils.mkdir
|
||||
// end of command aliases
|
||||
Object.freeze(shell.coreutils)
|
||||
shell.stdio = {
|
||||
|
||||
@@ -151,12 +151,12 @@ Sys library allows programmers to manipulate the system in low-level.
|
||||
\1\formalsynopsis{read}{}[String]{Reads a text the user has typed and returns is as a string. The reading will be terminated when the user hits the Return key.}
|
||||
\1\formalsynopsis{readNoEcho}{}[String]{Identical to \code{read} but the text the user is typing will not be printed to the screen.}
|
||||
\1\formalsynopsis{spin}{}[]{Do nothing for 4 miliseconds. Always use this function for busy-waiting as the virtual machine will hang without one.}
|
||||
\1\formalsynopsis{waitForMemChg}{address: Int, andMask: Int, xorMask: Int}[]{Do nothing until a memory value is changed. More specifically, this function will \code{spin} while:\\$ (\textrm{peek}(addr)\ \textrm{xor}\ xorMask)\ \textrm{and}\ andMask = 0 $}
|
||||
\1\formalsynopsis{waitForMemChg}{address: Int, andMask: Int, xorMask: Int}[]{Do nothing until a memory value is changed. More specifically, this function will \code{spin} while:$$ (\textrm{peek}(addr)\ \textrm{xor}\ xorMask)\ \textrm{and}\ andMask = 0 $$}
|
||||
\1\formalsynopsis{getSysRq}{}[Boolean]{Returns true if System Request key is down.}
|
||||
\1\formalsynopsis{unsetSysRq}{}{After using the System Request key, call this function to `release' the key so that other programs can use it.}
|
||||
\1\formalsynopsis{maxmem}{}[Int]{returns the size of the Scratchpad Memory in bytes.}
|
||||
\1\formalsynopsis{getUsedMem}{}[Int]{Returns how many memories can be \code{malloc}'d.}
|
||||
\1\formalsynopsis{getMallocStatus}{}[IntArray(2)]{Returns the \code{malloc} status in following order:\\$ [Malloc\ unit\ size\ ,\ allocated\ block\ counts] $}
|
||||
\1\formalsynopsis{getMallocStatus}{}[IntArray(2)]{Returns the \code{malloc} status in following order:$$ [Malloc\ unit\ size\ ,\ allocated\ block\ counts] $$}
|
||||
\end{outline}
|
||||
|
||||
|
||||
|
||||
@@ -7,17 +7,19 @@
|
||||
\indexentry{base64 (library)|hyperpage}{11}
|
||||
\indexentry{base64 (library)|hyperpage}{11}
|
||||
\indexentry{sys (library)|hyperpage}{12}
|
||||
\indexentry{block communication|hyperpage}{14}
|
||||
\indexentry{com (library)|hyperpage}{14}
|
||||
\indexentry{com (library)|hyperpage}{14}
|
||||
\indexentry{MMIO-com|hyperpage}{16}
|
||||
\indexentry{keycodes|hyperpage}{18}
|
||||
\indexentry{code page|hyperpage}{20}
|
||||
\indexentry{colour palette|hyperpage}{22}
|
||||
\indexentry{MMIO-graphics|hyperpage}{24}
|
||||
\indexentry{boot process|hyperpage}{27}
|
||||
\indexentry{filesystem (DOS)|hyperpage}{29}
|
||||
\indexentry{file descriptor (DOS)|hyperpage}{29}
|
||||
\indexentry{device file|hyperpage}{31}
|
||||
\indexentry{input (DOS)|hyperpage}{33}
|
||||
\indexentry{gl (DOS)|hyperpage}{33}
|
||||
\indexentry{block communication|hyperpage}{15}
|
||||
\indexentry{com (library)|hyperpage}{15}
|
||||
\indexentry{com (library)|hyperpage}{15}
|
||||
\indexentry{MMIO-com|hyperpage}{17}
|
||||
\indexentry{keycodes|hyperpage}{19}
|
||||
\indexentry{code page|hyperpage}{21}
|
||||
\indexentry{colour palette|hyperpage}{23}
|
||||
\indexentry{MMIO-graphics|hyperpage}{25}
|
||||
\indexentry{boot process|hyperpage}{28}
|
||||
\indexentry{commands (DOS)|hyperpage}{29}
|
||||
\indexentry{coreutils (DOS)|hyperpage}{29}
|
||||
\indexentry{filesystem (DOS)|hyperpage}{30}
|
||||
\indexentry{file descriptor (DOS)|hyperpage}{30}
|
||||
\indexentry{device file|hyperpage}{32}
|
||||
\indexentry{input (DOS)|hyperpage}{34}
|
||||
\indexentry{gl (DOS)|hyperpage}{34}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
This is makeindex, version 2.16 [TeX Live 2022] (kpathsea + Thai support).
|
||||
Scanning input file tsvmman.idx....done (23 entries accepted, 0 rejected).
|
||||
Sorting entries....done (101 comparisons).
|
||||
Generating output file tsvmman.ind....done (51 lines written, 0 warnings).
|
||||
Scanning input file tsvmman.idx....done (25 entries accepted, 0 rejected).
|
||||
Sorting entries....done (120 comparisons).
|
||||
Generating output file tsvmman.ind....done (53 lines written, 0 warnings).
|
||||
Output written in tsvmman.ind.
|
||||
Transcript written in tsvmman.ilg.
|
||||
|
||||
@@ -1,34 +1,36 @@
|
||||
\begin{theindex}
|
||||
|
||||
\item base64 (library), \hyperpage{11}
|
||||
\item block communication, \hyperpage{14}
|
||||
\item boot process, \hyperpage{27}
|
||||
\item block communication, \hyperpage{15}
|
||||
\item boot process, \hyperpage{28}
|
||||
|
||||
\indexspace
|
||||
|
||||
\item code page, \hyperpage{20}
|
||||
\item colour palette, \hyperpage{22}
|
||||
\item com (library), \hyperpage{14}
|
||||
\item code page, \hyperpage{21}
|
||||
\item colour palette, \hyperpage{23}
|
||||
\item com (library), \hyperpage{15}
|
||||
\item commands (DOS), \hyperpage{29}
|
||||
\item con (library), \hyperpage{8}
|
||||
\item console (library), \hyperpage{8}
|
||||
\item coreutils (DOS), \hyperpage{29}
|
||||
|
||||
\indexspace
|
||||
|
||||
\item device file, \hyperpage{31}
|
||||
\item device file, \hyperpage{32}
|
||||
|
||||
\indexspace
|
||||
|
||||
\item file descriptor (DOS), \hyperpage{29}
|
||||
\item filesystem (DOS), \hyperpage{29}
|
||||
\item file descriptor (DOS), \hyperpage{30}
|
||||
\item filesystem (DOS), \hyperpage{30}
|
||||
|
||||
\indexspace
|
||||
|
||||
\item gl (DOS), \hyperpage{33}
|
||||
\item gl (DOS), \hyperpage{34}
|
||||
\item gzip (library), \hyperpage{10}
|
||||
|
||||
\indexspace
|
||||
|
||||
\item input (DOS), \hyperpage{33}
|
||||
\item input (DOS), \hyperpage{34}
|
||||
|
||||
\indexspace
|
||||
|
||||
@@ -36,12 +38,12 @@
|
||||
|
||||
\indexspace
|
||||
|
||||
\item keycodes, \hyperpage{18}
|
||||
\item keycodes, \hyperpage{19}
|
||||
|
||||
\indexspace
|
||||
|
||||
\item MMIO-com, \hyperpage{16}
|
||||
\item MMIO-graphics, \hyperpage{24}
|
||||
\item MMIO-com, \hyperpage{17}
|
||||
\item MMIO-graphics, \hyperpage{25}
|
||||
|
||||
\indexspace
|
||||
|
||||
|
||||
@@ -87,6 +87,12 @@
|
||||
\textbf{#1}(#2)\IfNoValueF{#3}{: #3}\\#4%
|
||||
}
|
||||
|
||||
% usage: \inlinesynopsis{any name}{description}
|
||||
% usage: \inlinesynopsis{function name}{arguments info}{description}
|
||||
\NewDocumentCommand\dossynopsis{ommg}{%
|
||||
\IfNoValueF{#1}{#1.}\textbf{#2}\IfNoValueTF{#4}{ --- #3}{ \textit{#3} --- #4}%
|
||||
}
|
||||
|
||||
\newcommand\propertysynopsis[3]{\textbf{#1}: #2\\#3}
|
||||
\newcommand\argsynopsis[2]{\textbf{#1}: #2}
|
||||
|
||||
|
||||
@@ -32,6 +32,27 @@ Variables can be set or changed using \textbf{SET} commands.
|
||||
|
||||
\chapter{DOS Commands}
|
||||
|
||||
\index{commands (DOS)}\index{coreutils (DOS)}DOS commands are only valid under the DOS environment.
|
||||
|
||||
To invoke the DOS commands from the Javascript-side, use:\\ \code{\_G.shell.coreutils.*}
|
||||
|
||||
\begin{outline}
|
||||
\1\dossynopsis{cat}{file}{Reads a file and pipes its contents to the pipe, or to the console if no pipes are specified.}
|
||||
\1\dossynopsis{cd}{dir}{Change the current working directory. Alias: chdir}
|
||||
\1\dossynopsis{cls}{Clears the text buffer and the framebuffer if available.}
|
||||
\1\dossynopsis{cp}{from to}{Make copies of the specified file. The source file must not be a directory. Alias: copy}
|
||||
\1\dossynopsis{date}{Prints the system date. Alias: time}
|
||||
\1\dossynopsis{dir}{path}{Lists the contents of the specifed path, or the current working directory if no arguments were given. Alias: ls}
|
||||
\1\dossynopsis{del}{file}{Deletes the file. Aliases: erase, rm}
|
||||
\1\dossynopsis{echo}{text}{Print the given text or a variable.}
|
||||
\1\dossynopsis{exit}{Exits the current command processor.}
|
||||
\1\dossynopsis{mkdir}{path}{Creates a directory. Aliase: md}
|
||||
\1\dossynopsis{rem}{Comment-out the line.}
|
||||
\1\dossynopsis{set}{key=value}{Sets the global variable \code{key} to \code{value}, or displays the list of global variables if no arguments were given.}
|
||||
\1\dossynopsis{ver}{Prints the version of \thedos.}
|
||||
\end{outline}
|
||||
|
||||
|
||||
|
||||
\chapter{File I/O}
|
||||
\index{filesystem (DOS)}In \thedos, drives are assigned with a drive letter, and the drive currently booted on is always drive \textbf{A}.
|
||||
|
||||
Reference in New Issue
Block a user