diff --git a/doc/implementation.tex b/doc/implementation.tex index d1df89b..a8a05ab 100644 --- a/doc/implementation.tex +++ b/doc/implementation.tex @@ -2,27 +2,88 @@ \section{Specs} +\begin{outline} +\1 16 MB memory space with maximum 8 MB of scratchpad memory +\1 7 peripheral card slots, each can map 1 MB of memory to the memory space +\1 Standard graphics adapter on slot 1, with 256 simultaneous colours, 560\times448 pixels framebuffer and 80-column 32-row text buffer +\1 Built-in mouse input support +\1 4 serial ports to connect disk drives, modems and other computers +\end{outline} + +There are three memories on the system: Hardware Memory (8 MB), Scratchpad Memory (up to 8 MB) and Program Memory (infinite!) + +Your Javascript program is stored into the Program Memory, and since its capacity is limitless, you can put large graphics directly into your Javascript source code, but Program Memory is the slowest of all three memories. For faster graphics, you need to store them on the Scratchpad Memory and DMA-Copy them to the graphics adapter. \section{Built-in Commands} +\subsection{Standard Input and Output} + +\index{stdio (library)}These are standard input/output functions: + +\begin{outline} +\1\textbf{print}(string) --- prints a string without new line. +\1\textbf{println}(string) --- prints a string with a new line. +\1\textbf{printerr}(string) --- prints a string to error output without new line. +\1\textbf{printerrln}(string) --- prints a string to error output with a new line. +\1\textbf{read}() --- reads a string from keyboard. Hit Return to finish reading. +\end{outline} + + + \subsection{Console} +\index{console (library)}Console library contains functions for screen text manipulation. + +\namespaceis{Console}{con} + +\begin{outline} +\end{outline} + \subsection{System} +\index{system (library)}System library has functions to get the status of the system. + +\namespaceis{System}{system} + +\begin{outline} +\1\textbf{maxmem}() --- returns size of the Scratchpad Memory in bytes. +\end{outline} + \subsection{Gzip} +\index{gzip (library)}TODO + +\namespaceis{Gzip}{gzip} + +\begin{outline} +\end{outline} + \subsection{Base64} +\index{base64 (library)}Base64 allows encoding of binary data into ASCII-strings and vice-versa. + +\namespaceis{Base64}{base64} + +\begin{outline} +\end{outline} + \subsection{Sys} +Sys library allows programmers to manipulate the system in low-level. + +\namespaceis{Sys}{sys} + +\begin{outline} +\end{outline} + diff --git a/doc/tsvmman.idx b/doc/tsvmman.idx index 5d370a5..29a2804 100644 --- a/doc/tsvmman.idx +++ b/doc/tsvmman.idx @@ -1,11 +1,22 @@ -\indexentry{block communication|hyperpage}{8} -\indexentry{com (library)|hyperpage}{8} -\indexentry{MMIO-com|hyperpage}{10} -\indexentry{keycodes|hyperpage}{12} -\indexentry{code page|hyperpage}{14} -\indexentry{colour palette|hyperpage}{16} -\indexentry{MMIO-graphics|hyperpage}{18} -\indexentry{boot process|hyperpage}{21} -\indexentry{filesystem (DOS)|hyperpage}{23} -\indexentry{filesystem (library)|hyperpage}{23} -\indexentry{gl (DOS)|hyperpage}{24} +\indexentry{stdio (library)|hyperpage}{7} +\indexentry{console (library)|hyperpage}{8} +\indexentry{con (library)|hyperpage}{8} +\indexentry{system (library)|hyperpage}{8} +\indexentry{system (library)|hyperpage}{8} +\indexentry{gzip (library)|hyperpage}{8} +\indexentry{gzip (library)|hyperpage}{8} +\indexentry{base64 (library)|hyperpage}{8} +\indexentry{base64 (library)|hyperpage}{8} +\indexentry{sys (library)|hyperpage}{8} +\indexentry{block communication|hyperpage}{9} +\indexentry{com (library)|hyperpage}{9} +\indexentry{MMIO-com|hyperpage}{11} +\indexentry{keycodes|hyperpage}{13} +\indexentry{code page|hyperpage}{15} +\indexentry{colour palette|hyperpage}{17} +\indexentry{MMIO-graphics|hyperpage}{19} +\indexentry{boot process|hyperpage}{22} +\indexentry{filesystem (DOS)|hyperpage}{24} +\indexentry{filesystem (DOS)|hyperpage}{24} +\indexentry{input (DOS)|hyperpage}{25} +\indexentry{gl (DOS)|hyperpage}{25} diff --git a/doc/tsvmman.ilg b/doc/tsvmman.ilg index 34039b3..ff4da3d 100644 --- a/doc/tsvmman.ilg +++ b/doc/tsvmman.ilg @@ -1,6 +1,6 @@ This is makeindex, version 2.15 [TeX Live 2021] (kpathsea + Thai support). -Scanning input file tsvmman.idx....done (11 entries accepted, 0 rejected). -Sorting entries....done (38 comparisons). -Generating output file tsvmman.ind....done (30 lines written, 0 warnings). +Scanning input file tsvmman.idx....done (22 entries accepted, 0 rejected). +Sorting entries....done (95 comparisons). +Generating output file tsvmman.ind....done (43 lines written, 0 warnings). Output written in tsvmman.ind. Transcript written in tsvmman.ilg. diff --git a/doc/tsvmman.ind b/doc/tsvmman.ind index 9a823b7..1f50ced 100644 --- a/doc/tsvmman.ind +++ b/doc/tsvmman.ind @@ -1,30 +1,43 @@ \begin{theindex} - \item block communication, \hyperpage{8} - \item boot process, \hyperpage{21} + \item base64 (library), \hyperpage{8} + \item block communication, \hyperpage{9} + \item boot process, \hyperpage{22} \indexspace - \item code page, \hyperpage{14} - \item colour palette, \hyperpage{16} - \item com (library), \hyperpage{8} + \item code page, \hyperpage{15} + \item colour palette, \hyperpage{17} + \item com (library), \hyperpage{9} + \item con (library), \hyperpage{8} + \item console (library), \hyperpage{8} \indexspace - \item filesystem (DOS), \hyperpage{23} - \item filesystem (library), \hyperpage{23} + \item filesystem (DOS), \hyperpage{24} \indexspace - \item gl (DOS), \hyperpage{24} + \item gl (DOS), \hyperpage{25} + \item gzip (library), \hyperpage{8} \indexspace - \item keycodes, \hyperpage{12} + \item input (DOS), \hyperpage{25} \indexspace - \item MMIO-com, \hyperpage{10} - \item MMIO-graphics, \hyperpage{18} + \item keycodes, \hyperpage{13} + + \indexspace + + \item MMIO-com, \hyperpage{11} + \item MMIO-graphics, \hyperpage{19} + + \indexspace + + \item stdio (library), \hyperpage{7} + \item sys (library), \hyperpage{8} + \item system (library), \hyperpage{8} \end{theindex} diff --git a/doc/tsvmman.tex b/doc/tsvmman.tex index cecedf0..efa3734 100644 --- a/doc/tsvmman.tex +++ b/doc/tsvmman.tex @@ -69,6 +69,9 @@ \hyphenation{ECMA-script} \hyphenation{name-space} +\newcommand{\namespaceis}[2]{\index{#2 (library)}Functions in the #1 library can be found under the \textbf{#2} namespace.} +\newcommand{\dosnamespaceis}[2]{\index{#2 (DOS)}Functions in the \thedos\ #1 library can be found under the \textbf{#2} namespace.} + \newcommand\forceindent{\hskip1.5em} %% BASIC operators %% diff --git a/doc/tvdos.tex b/doc/tvdos.tex index 2e84544..f4f89e9 100644 --- a/doc/tvdos.tex +++ b/doc/tvdos.tex @@ -41,7 +41,7 @@ Variables can be set or changed using \textbf{SET} commands. \section{The Filesystem Library} -\index{filesystem (library)}Functions in the filesystem libraries can be found under the \textbf{filesystem} namespace. +\dosnamespaceis{Filesystem}{filesystem} \begin{outline} \1\textbf{open}(driveLetter: String, path: String, operationMode: String) @@ -64,6 +64,19 @@ Variables can be set or changed using \textbf{SET} commands. \end{outline} + +\section{The Input Library} + +\dosnamespaceis{Input}{input} + +\begin{outline} +\end{outline} + + + \section{The GL} -\index{gl (DOS)}Functions in the \thedos\ graphics libraries can be found under the \textbf{gl} namespace. +\dosnamespaceis{Graphics}{gl} + +\begin{outline} +\end{outline}