mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-13 08:04:03 +09:00
basic moar wip docs
This commit is contained in:
@@ -1 +1,4 @@
|
|||||||
10 DEFUN FIB(N)=IF N==0 THEN 0 ELSE IF N==1 THEN 1 ELSE FIB(N-1)+FIB(N-2)
|
10 DEFUN FIB(N)=IF N==0 THEN 0 ELSE IF N==1 THEN 1 ELSE FIB(N-1)+FIB(N-2)
|
||||||
|
20 FOR K=1 TO 12
|
||||||
|
30 PRINT FIB(K);" ";
|
||||||
|
40 NEXT
|
||||||
|
|||||||
3
assets/tbas/doc/bibliography.tex
Normal file
3
assets/tbas/doc/bibliography.tex
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
\begin{itemlist}
|
||||||
|
\item \emph{PC-BASIC 2.0.3 Documentation} \\ \url{https://robhagemans.github.io/pcbasic/doc/2.0/}
|
||||||
|
\end{itemlist}
|
||||||
3
assets/tbas/doc/facmap.bas
Normal file
3
assets/tbas/doc/facmap.bas
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
10 DEFUN FAC(N)=IF N==0 THEN 1 ELSE N*FAC(N-1)
|
||||||
|
20 K=MAP FAC, 1 TO 10
|
||||||
|
30 PRINT K
|
||||||
4
assets/tbas/doc/facrec.bas
Normal file
4
assets/tbas/doc/facrec.bas
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
10 DEFUN FAC(N)=IF N==0 THEN 1 ELSE N*FAC(N-1)
|
||||||
|
20 FOR K=1 TO 6
|
||||||
|
30 PRINT FAC(K)
|
||||||
|
40 NEXT
|
||||||
4
assets/tbas/doc/fib.bas
Normal file
4
assets/tbas/doc/fib.bas
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
10 DEFUN FIB(N)=IF N==0 THEN 0 ELSE IF N==1 THEN 1 ELSE FIB(N-1)+FIB(N-2)
|
||||||
|
20 FOR K=1 TO 12
|
||||||
|
30 PRINT FIB(K);" ";
|
||||||
|
40 NEXT
|
||||||
@@ -71,8 +71,8 @@ Functions are a form of expression that may taks input arguments surrounded by p
|
|||||||
\codeline{Y \textbf{= DIM(}X\textbf{)}}\par
|
\codeline{Y \textbf{= DIM(}X\textbf{)}}\par
|
||||||
Returns array with size of \code{X}, all filled with zero.
|
Returns array with size of \code{X}, all filled with zero.
|
||||||
\subsection{GETKEYSDOWN}
|
\subsection{GETKEYSDOWN}
|
||||||
\codeline{Y \textbf{= GETKEYSDOWN(}X\textbf{)}}\par
|
\codeline{\textbf{GETKEYSDOWN} VARIABLE}\par
|
||||||
Returns array that contains keycode of keys held down in \code{X}.\par
|
Stores array that contains keycode of keys held down in \code{VARIABLE}.\par
|
||||||
Actual keycode and the array length depends on the machine: in \thismachine , array length will be fixed to 8. For the list of available keycodes, see \ref{technical}.
|
Actual keycode and the array length depends on the machine: in \thismachine , array length will be fixed to 8. For the list of available keycodes, see \ref{technical}.
|
||||||
\subsection{INPUT}
|
\subsection{INPUT}
|
||||||
\codeline{\textbf{INPUT} VARIABLE}\par
|
\codeline{\textbf{INPUT} VARIABLE}\par
|
||||||
|
|||||||
@@ -1,9 +1,19 @@
|
|||||||
\begin{lstlisting}
|
\begin{lstlisting}
|
||||||
10 REM TERRAN BASIC
|
10 DEFUN FAC(N)=IF N==0 THEN 1 ELSE N*FAC(N-1)
|
||||||
20 REM REFERENCE MANUAL
|
20 FOR K=1 TO 6
|
||||||
30 REM For Version 1.0
|
30 PRINT FAC(K)
|
||||||
40 REM First Edition
|
40 NEXT
|
||||||
100 PRINT "Hello, world!"
|
\end{lstlisting}
|
||||||
110 PRINT "Git gud!"
|
|
||||||
999 END
|
\begin{lstlisting}
|
||||||
|
10 DEFUN FAC(N)=IF N==0 THEN 1 ELSE N*FAC(N-1)
|
||||||
|
20 K=MAP FAC, 1 TO 10
|
||||||
|
30 PRINT K
|
||||||
|
\end{lstlisting}
|
||||||
|
|
||||||
|
\begin{lstlisting}
|
||||||
|
10 DEFUN FIB(N)=IF N==0 THEN 0 ELSE IF N==1 THEN 1 ELSE FIB(N-1)+FIB(N-2)
|
||||||
|
20 FOR K=1 TO 12
|
||||||
|
30 PRINT FIB(K);" ";
|
||||||
|
40 NEXT
|
||||||
\end{lstlisting}
|
\end{lstlisting}
|
||||||
|
|||||||
@@ -179,13 +179,12 @@
|
|||||||
\chapter{Technical Reference}
|
\chapter{Technical Reference}
|
||||||
\input{implementation}
|
\input{implementation}
|
||||||
|
|
||||||
|
|
||||||
%% Bibliography %%
|
|
||||||
% https://robhagemans.github.io/pcbasic/doc/2.0/
|
|
||||||
|
|
||||||
|
|
||||||
\chapter{Index}
|
\chapter{Index}
|
||||||
|
|
||||||
|
\chapter{Bibliography}
|
||||||
|
\input{bibliography}
|
||||||
|
|
||||||
|
|
||||||
\chapter*{Disclaimers}
|
\chapter*{Disclaimers}
|
||||||
|
|
||||||
\oreallypress{} is entirely fictional publishing entity; \oreallypress{} has no affiliation whatsoever with any of the real-world publishers.
|
\oreallypress{} is entirely fictional publishing entity; \oreallypress{} has no affiliation whatsoever with any of the real-world publishers.
|
||||||
|
|||||||
Reference in New Issue
Block a user