\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{DNSGeek} \pdfinfo{ /Title (vision-basic.pdf) /Creator (Cheatography) /Author (DNSGeek) /Subject (Vision BASIC Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{0DA32B} \definecolor{LightBackground}{HTML}{EFF9F1} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Vision BASIC Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{DNSGeek} via \textcolor{DarkBackground}{\uline{cheatography.com/171119/cs/35885/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}DNSGeek \\ \uline{cheatography.com/dnsgeek} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 6th December, 2022.\\ Updated 15th September, 2024.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{x{3.84 cm} x{4.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Editing Keywords}} \tn % Row 0 \SetRowColor{LightBackground} ASSEM & Switches into assembler mode. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} BANK {\emph{{[}bank{[} - bank{]}{[}, on/off{]}{]}}} & Display the current bank number, or change to the bank specified. If on/off specified will enable or disable the banks. \tn % Row Count 8 (+ 6) % Row 2 \SetRowColor{LightBackground} BASIC & Switches out of assembler mode. \tn % Row Count 10 (+ 2) % Row 3 \SetRowColor{white} COMP {\emph{{[}"filename"{[}, devnum{]}{]}}} & Will compile the program in memory and optionally save it to a file. {\emph{filename}} must be 12 characters or less if specified. \tn % Row Count 17 (+ 7) % Row 4 \SetRowColor{LightBackground} DELETE {\emph{{[}start - end{]}}} & Will delete a range of lines from {\emph{start}} to {\emph{end}} from your program. With no parameters, acts like NEW. \tn % Row Count 23 (+ 6) % Row 5 \SetRowColor{white} DESC {\emph{line\#, label}} & Create a subroutine {\emph{label}} and start the code at {\emph{line\#}}. \tn % Row Count 26 (+ 3) % Row 6 \SetRowColor{LightBackground} ERROR & Will display the errors. \tn % Row Count 28 (+ 2) % Row 7 \SetRowColor{white} EXEC (\textgreater{}) {\emph{command block}} & Will run a single line in immediate mode. Shorthand \textgreater{} \tn % Row Count 31 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{3.84 cm} x{4.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Editing Keywords (cont)}} \tn % Row 8 \SetRowColor{LightBackground} FAST & Enables speed up of some commands \tn % Row Count 2 (+ 2) % Row 9 \SetRowColor{white} FIND {\emph{text}} & Searches the program in the current bank for lines containing {\emph{text}}. Do not use quotes if searching for keywords. If searching for assembly, put a left bracket in front of the instruction. \tn % Row Count 12 (+ 10) % Row 10 \SetRowColor{LightBackground} LIST {\emph{{[}line\#{[} - line\#{]}{]}}} & Will display the program in memory. Can optionally only display lines between the given parameters. \tn % Row Count 17 (+ 5) % Row 11 \SetRowColor{white} LISTER {\emph{{[}line\#{]}}} & A scrollable LIST. If {\emph{line\#}} specified, will start at that line. \tn % Row Count 21 (+ 4) % Row 12 \SetRowColor{LightBackground} LITE {\emph{{[}0/1{]}}} & With no parameter or a 1, will enable LITE mode. 0 will disable. \tn % Row Count 25 (+ 4) % Row 13 \SetRowColor{white} LLIST {\emph{{[}line\#{[} - line\#{[}, printer?{]}{]}{]}}} & Displays extended details about the program in memory. if the value of {\emph{printer?}} is 1, the output will be sent to a printer. \tn % Row Count 32 (+ 7) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{3.84 cm} x{4.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Editing Keywords (cont)}} \tn % Row 14 \SetRowColor{LightBackground} NEW {\emph{{[}bank{[} - bank{]}{]}}} & Clears the current program bank, or banks specified. \tn % Row Count 3 (+ 3) % Row 15 \SetRowColor{white} OLD {\emph{{[}bank{[} - bank{]}{]}}} & Attempts to restore the program in the current bank, or banks specified. \tn % Row Count 7 (+ 4) % Row 16 \SetRowColor{LightBackground} PLIST {\emph{{[}line\#{[} - line\#{]}{]}}} & Sends the program LIST to a printer. \tn % Row Count 9 (+ 2) % Row 17 \SetRowColor{white} QUIT & Quit Vision BASIC. \tn % Row Count 10 (+ 1) % Row 18 \SetRowColor{LightBackground} RENUM {\emph{start - end, new{[}, step{]}}} & Will renumber the lines from {\emph{start}} to {\emph{end}} to {\emph{new}}, using a {\emph{step}} of 10 if not specified. \tn % Row Count 15 (+ 5) % Row 19 \SetRowColor{white} RUN {\emph{{[}line\#{]}}} & Runs the compiled, in memory program. If the program is not compiled or has been altered, will compile first. If {\emph{line\#}} specified, will start at that line number, otherwise will start from the first line of the program. \tn % Row Count 26 (+ 11) % Row 20 \SetRowColor{LightBackground} SLOW & Run at normal C64 speeds. \tn % Row Count 28 (+ 2) % Row 21 \SetRowColor{white} VLIST {\emph{{[}num{]}}} & Will display all of the variables from the program in memory. If {\emph{num}} specified, will send the output to a printer. \tn % Row Count 34 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Keywords related to writing, editing, modifying and displaying programs} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.36 cm} x{4.64 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Disk and File Commands}} \tn % Row 0 \SetRowColor{LightBackground} DEVICE {\emph{devnum}} & Sets the device number for the default device. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} DIR {\emph{{[}num{]}}} & Lists the current device's directory. If num is supplied, will be sent to a printer \tn % Row Count 6 (+ 4) % Row 2 \SetRowColor{LightBackground} DISK {\emph{{[}"command"{[}, devnum{]}{]}}} & Equivalent to OPEN 15,devnum,15,"command":CLOSE 15. Uses default device if not specified. Initializes the device if command not specified. \tn % Row Count 12 (+ 6) % Row 3 \SetRowColor{white} GSAVE {\emph{on}} & Saves a copy of the C64 RAM to the GeoRAM expanded memory. If {\emph{on}} is 1, enables back-up feature. \tn % Row Count 17 (+ 5) % Row 4 \SetRowColor{LightBackground} LOAD {\emph{"filename"{[}, devnum{]}}} & Load a file from the default device. If filename not specified, will use last specified filename. \tn % Row Count 22 (+ 5) % Row 5 \SetRowColor{white} SAVE {\emph{"filename"{[}, devnum{]}}} & Save a file to the default device. Filename must be 12 characters or less. If filename not specified, will use last specified filename. \tn % Row Count 28 (+ 6) % Row 6 \SetRowColor{LightBackground} VERIFY {\emph{"filename"{[}, devnum{]}}} & Verify the program in memory against a file on the default device. If filename not specified, will use last specified filename. \tn % Row Count 34 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Commands related to using disk drives} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Variables}} \tn % Row 0 \SetRowColor{LightBackground} {\emph{variable}}\$ & At the end of a variable name, a \$ specifies that the variable is a STRING. \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} CLR & Clears the memory used by all variables. \tn % Row Count 6 (+ 2) % Row 2 \SetRowColor{LightBackground} DECIMAL {\emph{variable{[}, variable{[}, variable{[}, ...{]}{]}{]}}} & Creates new decimal variables. \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} DIM {[}DECIMAL{]} {\emph{variable(value)}} & Create array {\emph{variable}} of {\emph{value}} size. \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} GLOBAL & Restores the global variable scope \tn % Row Count 13 (+ 2) % Row 5 \SetRowColor{white} LET & Assigns a simple value to a simple variable. Useful for speed. \tn % Row Count 17 (+ 4) % Row 6 \SetRowColor{LightBackground} LOCAL & Starts a local scope for variables. \tn % Row Count 19 (+ 2) % Row 7 \SetRowColor{white} TAG {\emph{tag}} = {\emph{value}} & Creates a TAG named {\emph{tag}} with the value {\emph{value}}. Like a label in assembler. \tn % Row Count 23 (+ 4) % Row 8 \SetRowColor{LightBackground} VARIABLES {\emph{{[}address{]}}} & Moves the program variable table to {\emph{address}} or 32768 if not specified. \tn % Row Count 27 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Variables {\bf{must}} start with a letter, and can be up to 8 characters long. \newline \newline Numbers and the symbols !, @, \#, \%, \& and ? are allowed in variable names. \newline \newline Anything past 8 characters is silently ignored. \newline \newline Variable names can {\emph{contain}} keywords, but cannot start with keywords. \newline \newline Strings must be terminated with a dollar (\$) sign. \newline \newline All variables are assumed to be integer variables by default. \newline \newline Tags cannot be to the left of an equals sign in a math expression.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.16 cm} x{5.84 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Math}} \tn % Row 0 \SetRowColor{LightBackground} {\emph{vov}} AND {\emph{vov}} & Performs a logical (bitwise) AND. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\emph{vov}} OR {\emph{vov}} & Performs a logical (bitwise) OR. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\emph{vov}} EOR {\emph{vov}} & Performs a logical (bitwise) Exclusive OR. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} ABS({\emph{vov}}) & Returns the absolute value of {\emph{vov}}. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} INT({\emph{vov}}) & Returns the integer value of {\emph{vov}}, rounded down. \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} SGN({\emph{vov}}) & Returns the sign of {\emph{vov}}. \tn % Row Count 11 (+ 1) % Row 6 \SetRowColor{LightBackground} WHOLE({\emph{vov}}) & Returns the integer value of {\emph{vov}} without rounding. \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} FRAC({\emph{vov}}) & Returns the fractional value of {\emph{vov}}, stripped of the sign. \tn % Row Count 16 (+ 3) % Row 8 \SetRowColor{LightBackground} ABS({\emph{vov}}) & Returns the absolute value of {\emph{vov}}. \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} RANDOM {\emph{{[}seed{]}}} & Initializes the random number table. If no parameter, will use SID voice 3, otherwise will be seeded with {\emph{seed}}. \tn % Row Count 22 (+ 4) % Row 10 \SetRowColor{LightBackground} RND {\emph{{[}0{]}}} & Generate a random number. If 0 supplied, will limit numbers to 0-255, otherwise 0-65535. \tn % Row Count 26 (+ 4) % Row 11 \SetRowColor{white} π & The value of PI in decimal. \tn % Row Count 27 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Parentheses are {\bf{not}} allowed in mathematical expressions. \newline e.g. A=4*(3+4) is not allowed and would need to be expressed as A=3+4:A=A*4 \newline \newline Order of operations is {\bf{not}} followed. All expressions are strictly evaluated from left to right. \newline e.g. 4+3*5-2*6 would be evaluated as 4 + 3 = 7, 7 * 5 = 35, 35 - 2 = 33, 33 * 6 = 198. \newline \newline The functions {\bf{USR}}, {\bf{FRE}}, {\bf{POS}}, {\bf{SQR}}, {\bf{LOG}}, {\bf{EXP}}, {\bf{COS}}, {\bf{SIN}}, {\bf{TAN}} and {\bf{ATN}} are not available.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.88 cm} x{5.12 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Speedy Math}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{ADD {\emph{vop}} = {\emph{vov}} + {\emph{vov}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} COMPARE {\emph{vov}}, {\emph{vov}} & Both parameters must be 2 byte ints. \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} DEC {\emph{vop}} & Decrements {\emph{vop}} by 1. \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} DOUBLE {\emph{vop}} & Multiplies {\emph{vop}} by 2. \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} HALF {\emph{vop}} & Divides {\emph{vop}} by 2. \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} INC {\emph{vop}} & Increments {\emph{vop}} by 1. \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{SUBTRACT {\emph{vop}} = {\emph{vov}} - {\emph{vov}}} \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{These commands only with with non-arrayed {\emph{integer}} variables, tags and pointers, except {\bf{INC}}, {\bf{DEC}}, {\bf{HALF}} and {\bf{DOUBLE}} which also work on non-arrayed {\emph{decimal}} variables.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Bitmap Commands}} \tn % Row 0 \SetRowColor{LightBackground} BITMAP {\emph{{[}bmp, multicolor, map, drawto, screen, color1, color2, color3, clearcol, clear map{]}}} & Turns modes {\emph{bmp}} and {\emph{multicolor}} on (1) or off (0). \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} BMPCLR {\emph{{[}clearmap{[}, clearcol{]}{]}}} & Clears the currently visible bitmap screen if {\emph{clearmap}} is 1, and color screen if {\emph{clearcol}} is set to 1. If neither argument is specified, will clear both. \tn % Row Count 13 (+ 8) % Row 2 \SetRowColor{LightBackground} BMPCOL {\emph{screen, color1, color2, color3, clearcol{[}, clearmap{]}}} & Sets the bitmap colors that will be used, and defines which screen to use. If clearmap is added and set to 1, will clear the bitmap. \tn % Row Count 20 (+ 7) % Row 3 \SetRowColor{white} BMPLOC {\emph{map, drawto}} & {\emph{map}} sets with bitmap screen will be visible (0-7). {\emph{drawto}} sets with screen will be drawn to with the drawing commands. \tn % Row Count 27 (+ 7) % Row 4 \SetRowColor{LightBackground} HLINE {\emph{x, y, len, color}} & Draws a straight, horizontal line starting at ({\emph{x}}, {\emph{y}}) and continuing to the right for {\emph{len}} pixels with color {\emph{color}} \tn % Row Count 33 (+ 6) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Bitmap Commands (cont)}} \tn % Row 5 \SetRowColor{LightBackground} LIMITS {\emph{width, height, x-pos, y-pos, colorplot}} & Limits the area on the bitmap that drawing commands will affect. \tn % Row Count 4 (+ 4) % Row 6 \SetRowColor{white} LINE {\emph{x1, y1{[}, x2, y2{[}, color{]}{]}}} & Draws a line on the bitmap from ({\emph{x1}}, {\emph{y1}}) to ({\emph{x2}}, {\emph{y2}}), in color {\emph{color}} if specified. If {\emph{x2}} and {\emph{y2}} are not specified, will draw a line from ({\emph{x1}}, {\emph{y1}}) to the current coordinate. \tn % Row Count 14 (+ 10) % Row 7 \SetRowColor{LightBackground} PLOT {\emph{x, y, color}} & Draws a pixel on the bitmap at coordinates ({\emph{x}}, {\emph{y}}) in color {\emph{color}}. \tn % Row Count 18 (+ 4) % Row 8 \SetRowColor{white} VLINE {\emph{x, y, len, color}} & Draws a straight, vertical line starting at ({\emph{x}}, {\emph{y}}) and going down for {\emph{len}} pixels with color {\emph{color}} \tn % Row Count 24 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{All parameters can be either values or variables. If a parameter is left off, a default or previous value will be used.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Sprite Commands}} \tn % Row 0 \SetRowColor{LightBackground} ALLMOBS {\emph{x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, x7, y7}} & Allows you to set all of the sprite positions in a single command. \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} CODE {\emph{values....}} & Any code following this command will be stored in memory at the location indicated by the "code" pointer. \tn % Row Count 10 (+ 6) % Row 2 \SetRowColor{LightBackground} COLLISION {\emph{selection}} & Copies the collision registers and zeros the copied register. If {\emph{selection}} is 0, copies the sprite-to-sprite register, if 1 copies the \seqsplit{sprite-to-foreground} register. \tn % Row Count 19 (+ 9) % Row 3 \SetRowColor{white} DETECT {\emph{mob\#{[}, mob\#{[}, mob\#{[}, ...{]}{]}{]}}} & Used after the COLLISION command. Checks is the specified sprites were involved in a collision. \tn % Row Count 24 (+ 5) % Row 4 \SetRowColor{LightBackground} MOB {\emph{number, on, multicolor, priority, x, y, x-add, y-add}} & Chooses which sprite to make current. Initializes the sprite. {\emph{number}} chooses which sprite (0-7). {\emph{on}} turns it on or off, {\emph{multicolor}} enables or disables multicolor mode, {\emph{priority}} enables or disables background priority, {\emph{x}}, {\emph{y}} choose the initial coordinates, {\emph{x-add}} and {\emph{y-add}} set the offsets. \tn % Row Count 40 (+ 16) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Sprite Commands (cont)}} \tn % Row 5 \SetRowColor{LightBackground} MOBCLR & Clears all of the sprite registers. Recommended to use at the beginning of your program if you're using sprites, and also when you want to clear the screen of sprites. \tn % Row Count 9 (+ 9) % Row 6 \SetRowColor{white} MOBCOL {\emph{color, shared1, shared2}} & Sets the sprite colors. {\emph{color}} sets the color of the current sprite, {\emph{shared1}} sets the first color shared by all multicolor sprites, {\emph{shared2}} sets the second. \tn % Row Count 18 (+ 9) % Row 7 \SetRowColor{LightBackground} MOBEXP {\emph{x-expan, y-expan}} & Enables and disables the {\emph{x-expan}}sion and the {\emph{y-expan}}sion of the current sprite. \tn % Row Count 23 (+ 5) % Row 8 \SetRowColor{white} MOBPAT {\emph{shape\#, bank}} & Moves the {\bf{CODE}} pointer to point at the specified sprite she's data. {\emph{shape\#}} specifies the shape to point at, {\emph{bank}} specifies the bank where the coded data will be sent. \tn % Row Count 32 (+ 9) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Sprite Commands (cont)}} \tn % Row 9 \SetRowColor{LightBackground} MOBSET {\emph{shape\#, number, number, number, ...}} & Initialize a sprite from The Spreditor. \tn % Row Count 3 (+ 3) % Row 10 \SetRowColor{white} MOBXY {\emph{x, y, x-add, y-add}} & Moves the current sprite to the coordinates ({\emph{x}}, {\emph{y}}). {\emph{x-add}} and {\emph{y-add}} set the offsets. \tn % Row Count 8 (+ 5) % Row 11 \SetRowColor{LightBackground} SHAPE {\emph{byte{[}, byte{[}, byte{[}, ...{]}{]}{]}}} & Changes the current sprite's shape. IF more than 1 shape specified, will set the shape for the following sprites. \tn % Row Count 14 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Commands begin with MOB as a carryover from Simon's BASIC.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.04 cm} x{4.96 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Interrupt Commands}} \tn % Row 0 \SetRowColor{LightBackground} HALTINT & Stops the interrupt totally, returning interrupts to normal. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} INTEND {\emph{flag}} & Should be the last statement in your interrupt routine. If {\emph{flag}} is 0, JMP to BASIC's hardware timer routine, 1 will RTI. \tn % Row Count 9 (+ 6) % Row 2 \SetRowColor{LightBackground} INTERRUPT {\emph{raster, line\#}} & Create a new raster interrupt at line {\emph{raster}} (50-249) which calls the code at {\emph{line\#}}. \tn % Row Count 13 (+ 4) % Row 3 \SetRowColor{white} RASTER {\emph{raster}} & Selects the next raster line to interrupt. \tn % Row Count 15 (+ 2) % Row 4 \SetRowColor{LightBackground} STARTINT & Should be the first command in your interrupt routine. \tn % Row Count 18 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Lets you program raster interrupts. \newline \newline It is critical to halt your interrupts before exiting your program.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.8 cm} x{5.2 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Using Machine Language}} \tn % Row 0 \SetRowColor{LightBackground} Branching and Jumping & Simply put the line number after the branch or jump command, e.g. `JMP1000` \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Tags and variables & Can be used in place of values and addresses \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} LABEL & Identical to TAG \tn % Row Count 6 (+ 1) % Row 3 \SetRowColor{white} ML-safe commands & {\bf{START, GOTO, GOSUB, RETURN., REM, TAG, PROC, MODULE, LOCAL, GLOBAL, ADD\textless{} SUBTRACT, COMPARE, HALF, DOUBLE, VARIABLES, HALT, RESUME, VERSION, DEBUG, STARTINT, RASTER, BYTES, STRINGS}} \tn % Row Count 14 (+ 8) % Row 4 \SetRowColor{LightBackground} START {\emph{{[}* = {]}address}} & Specifies the starting location for an ML program. Must be placed at the vey beginning on your ML program, and only used once. \tn % Row Count 19 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Mnemonics must be enclosed in {[}{]} brackets, e.g. \newline `100 {[}LDA1:ORA\#1:STA1{]}; TURN BASIC ROM ON` \newline \newline A semicolon (;) starts a comment in ML mode.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{BASIC Keywords}} \tn % Row 0 \SetRowColor{LightBackground} ASC({\emph{string}}) & Returns the ASCII value of {\emph{string}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} BUTTON {\emph{joynum{[}, button\#{]}}} & Returns 1 if the joystick button is pressed, 0 if not. Use {\emph{button\#}} of 1, 2 or 3 to access those buttons, default is 1, \tn % Row Count 8 (+ 6) % Row 2 \SetRowColor{LightBackground} BYTES {\emph{count{[}, byte{[}, tag{[}, alignment{]}{]}{]}}} & When compiling, will insert {\emph{count}} bytes of value {\emph{byte}} (default 0), with a (string) label of {\emph{tag}}, aligned to {\emph{alignment}}. \tn % Row Count 15 (+ 7) % Row 3 \SetRowColor{white} CHR\$({\emph{vov}}{[}, {\emph{count}}{]}) & Appends ASCII character {\emph{vov}} to a string, 1 or {\emph{count}} times. \tn % Row Count 19 (+ 4) % Row 4 \SetRowColor{LightBackground} CLOCK {\emph{{[}jiffies{]}}} & Sets the CLOCK to {\emph{jiffies}} if specified, or 0 if not. \tn % Row Count 22 (+ 3) % Row 5 \SetRowColor{white} CLOSE {\emph{file\#, file\#, ...}} & Close 1 or more files. \tn % Row Count 24 (+ 2) % Row 6 \SetRowColor{LightBackground} CLS {\emph{{[}pokecode{[}, color{]}{]}}} & Clears the current text screen. Uses space if {\emph{pokecode}} not specified. Colors will not be changed unless {\emph{color}} is specified. \tn % Row Count 31 (+ 7) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{BASIC Keywords (cont)}} \tn % Row 7 \SetRowColor{LightBackground} CMD {\emph{file\#{[}, string{]}}} & Redirects all I/O to file {\emph{file\#}}. Optionally sends {\emph{string}} to the file. \tn % Row Count 4 (+ 4) % Row 8 \SetRowColor{white} COPY {\emph{start, end, new}} & Copies the memory from addresses {\emph{start}} - {\emph{end}} to address {\emph{new}} \tn % Row Count 8 (+ 4) % Row 9 \SetRowColor{LightBackground} DATA {\emph{val, val, ...}} & Hold data to be READ later. \tn % Row Count 10 (+ 2) % Row 10 \SetRowColor{white} DEBUG {\emph{0 | 1}} & Enable (1) or disable (0) DEBUG mode, which reduces the number of passes for compilation. Will result in slower and larger programs. \tn % Row Count 17 (+ 7) % Row 11 \SetRowColor{LightBackground} DEF {\emph{type var{[}, var, var, ...{]}}} & Allows you to define all variable types in a more structured fashion. {\emph{type}} can be TAG, LABEL, INT, INTEGER or DECIMAL. \tn % Row Count 23 (+ 6) % Row 12 \SetRowColor{white} DETEXT({\emph{type}}) & Returns how much extended memory of {\emph{type}} is attached to the system. \tn % Row Count 27 (+ 4) % Row 13 \SetRowColor{LightBackground} DO {\emph{line\#, times}} & Run line {\emph{line\#}} {\emph{times}} times. \tn % Row Count 29 (+ 2) % Row 14 \SetRowColor{white} DUP\$({\emph{string}}, {\emph{count}}) & Duplicates string {\emph{string}} {\emph{count}} times. \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{BASIC Keywords (cont)}} \tn % Row 15 \SetRowColor{LightBackground} ELSE {\emph{statement}} & If the prior IF {\emph{expression}} evaluated to FALSE, {\emph{statement}} will be executed. \tn % Row Count 4 (+ 4) % Row 16 \SetRowColor{white} END & End the execution of the program and returns screen to normal. \tn % Row Count 8 (+ 4) % Row 17 \SetRowColor{LightBackground} FETCH {\emph{count, destination, reu{[}, bank{]}}} & Copies {\emph{count}} bytes from an attached REU at address {\emph{reu}} and bank {\emph{bank}} to C64 address {\emph{destination}} \tn % Row Count 14 (+ 6) % Row 18 \SetRowColor{white} FILL {\emph{start, end{[}, byte{[}, step{]}{]}}} & Fills the memory from address {\emph{start}} to address {\emph{end}} with value {\emph{byte}} (default 0) incrementing the address by {\emph{step}} (default 1) \tn % Row Count 21 (+ 7) % Row 19 \SetRowColor{LightBackground} FOR {\emph{var}}={\emph{start}} TO {\emph{end}} {[}STEP {\emph{val}}{]} & Defines a FOR loop that iterates variable {\emph{var}} from the value {\emph{start}} to the value {\emph{end}}, defaulting to incrementing by 1 if STEP is not defined, or by {\emph{val}} if it is defined. \tn % Row Count 30 (+ 9) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{BASIC Keywords (cont)}} \tn % Row 20 \SetRowColor{LightBackground} GET {\emph{variable}} & Read a character and put in it {\emph{variable}} \tn % Row Count 3 (+ 3) % Row 21 \SetRowColor{white} GET\# {\emph{file\#}}, {\emph{variable}} & Read a character from {\emph{file\#}} and put in it {\emph{variable}} \tn % Row Count 6 (+ 3) % Row 22 \SetRowColor{LightBackground} GOSUB {\emph{line\#{[}, line\#{[}, ...{]}{]}}} & Runs a subroutine at {\emph{line\#}}. If more than 1 line\# is specified, will run each one in the order they are specified. \tn % Row Count 12 (+ 6) % Row 23 \SetRowColor{white} GOTO {\emph{tag | line\_number}} & Jumps to the {\emph{line\_number}} or {\emph{tag}} in the program \tn % Row Count 15 (+ 3) % Row 24 \SetRowColor{LightBackground} HALT & Will stop compilation at this point. All previous code will be compiled. \tn % Row Count 19 (+ 4) % Row 25 \SetRowColor{white} IF {\emph{expression}} {[}AND | OR | EOR {\emph{expression}}{]} & Evaluates the {\emph{expression}} and sets a flag that will be acted upon when the program reaches a THEN statement. \tn % Row Count 25 (+ 6) % Row 26 \SetRowColor{LightBackground} INPUT {\emph{var, var, ...}} & Read lines and put the values in {\emph{var}}. \tn % Row Count 27 (+ 2) % Row 27 \SetRowColor{white} INPUT\# {\emph{file\#, var{[}, var{[}, ...{]}{]}}} & Read lines from file {\emph{file\#}} and store them in {\emph{var}} \tn % Row Count 30 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{BASIC Keywords (cont)}} \tn % Row 28 \SetRowColor{LightBackground} JOIN {\emph{vop}} = {\emph{low, high}} & The opposite of SPLIT \tn % Row Count 2 (+ 2) % Row 29 \SetRowColor{white} JOY({\emph{joynum}}) & Returns the value of the joystick port {\emph{joynum}}. {\emph{joynum}} is typically 1 or 2. \tn % Row Count 6 (+ 4) % Row 30 \SetRowColor{LightBackground} KEYPRESS {\emph{{[}vov{[}, vov{]}{]}}} & If {\emph{vov}} not specified, will wait for {\bf{any}} keypress, otherwise will wait for {\emph{vov}} to be pressed. If a second {\emph{vov}} is specified will act like an IF block and will be FALSE for first char or TRUE for second char. \tn % Row Count 17 (+ 11) % Row 31 \SetRowColor{white} LEFT\$({\emph{string}}, {\emph{count}}) & Returns {\emph{count}} characters from the left of {\emph{string}} \tn % Row Count 20 (+ 3) % Row 32 \SetRowColor{LightBackground} LEN({\emph{string}}) & Returns the length of {\emph{string}}. \tn % Row Count 22 (+ 2) % Row 33 \SetRowColor{white} LOC({\emph{x, y}}) & Moves the cursor to location {\emph{x, y}} on the current text screen. \tn % Row Count 26 (+ 4) % Row 34 \SetRowColor{LightBackground} LONGPEEK({\emph{address}}) & Will return a single value from {\emph{address}} on a SuperCPU. \tn % Row Count 29 (+ 3) % Row 35 \SetRowColor{white} LONGPOKE {\emph{address, val, val, val, ...}} & Will poke into the extended memory of a SuperCPU. \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{BASIC Keywords (cont)}} \tn % Row 36 \SetRowColor{LightBackground} MID\$({\emph{string}}, {\emph{position}}, {\emph{count}}) & Returns {\emph{count}} characters, starting at index {\emph{position}} from {\emph{string}}. \tn % Row Count 4 (+ 4) % Row 37 \SetRowColor{white} MODULE {\emph{filename}}{[}, devnum{[}, address{]}{]}* & When compiling, write this section to separate module file {\emph{filename}} for reusability. The default device will be used if not specified. Address 49152 will be used for loading if not specified. \tn % Row Count 14 (+ 10) % Row 38 \SetRowColor{LightBackground} MODULE END & The end of the module to be written \tn % Row Count 16 (+ 2) % Row 39 \SetRowColor{white} NEXT {\emph{var{[}, var{[}, ...{]}{]}}} & The end of the FOR loop. {\emph{var}} must match the FOR loop you are continuing. \tn % Row Count 20 (+ 4) % Row 40 \SetRowColor{LightBackground} ON {\emph{var}} GOSUB | GOTO {\emph{line\#, line\#, ...}} & Will jump to {\emph{line\#}} that matches the value of {\emph{var}}. \tn % Row Count 23 (+ 3) % Row 41 \SetRowColor{white} OPEN {\emph{file\#, dev\#, secondary, string}} & Open a connection to device {\emph{dev\#}} assigning it to file {\emph{file\#}} with a secondary parameter of {\emph{secondary}} and send {\emph{string}} through the open file. \tn % Row Count 31 (+ 8) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{BASIC Keywords (cont)}} \tn % Row 42 \SetRowColor{LightBackground} PADBUT {\emph{joynum}} & Returns 1 if the paddle button is pressed, 0 if not. \tn % Row Count 3 (+ 3) % Row 43 \SetRowColor{white} PADDLE {\emph{joynum}} & Returns the value of the paddle, 0-255. Paddles 1-2 are in {\emph{joynum}} 1, 3-4 are in 2. Returned values are bit-reversed. \tn % Row Count 9 (+ 6) % Row 44 \SetRowColor{LightBackground} PAUSE {\emph{seconds{[}, jiffies{]}}} & Will pause execution for {\emph{seconds}} seconds. If an optional {\emph{jiffies}} is specified, will pause for an additional ({\emph{jiffies}}/60)s. \tn % Row Count 16 (+ 7) % Row 45 \SetRowColor{white} PEEK({\emph{vov{[}, index{]}}}) & Will return the memory at address {\emph{vov}}, optionally offset by {\emph{index}}. \tn % Row Count 20 (+ 4) % Row 46 \SetRowColor{LightBackground} POKE {\emph{address}}, {\emph{vov, vov, vov, ...}} & Will put values {\emph{vov}} in consecutive memory starting at {\emph{address}}. Can also be used with strings. \tn % Row Count 25 (+ 5) % Row 47 \SetRowColor{white} POLL {\emph{port\#}} & Tells the C64 which set of paddles you're polling. {\emph{port\#}} is 1 for joystick port 1, 2 for 2. Allows substitution of the required delay. Read the docs for more info. \tn % Row Count 34 (+ 9) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{BASIC Keywords (cont)}} \tn % Row 48 \SetRowColor{LightBackground} PRINT {\emph{expression}} & Prints {\emph{expression}} to the current text screen \tn % Row Count 3 (+ 3) % Row 49 \SetRowColor{white} PRINT\# {\emph{file\#, expression}} & Print {\emph{expresion}} to file {\emph{file\#}} \tn % Row Count 5 (+ 2) % Row 50 \SetRowColor{LightBackground} READ {\emph{vop, vop, ...}} & Read values from a DATA statement \tn % Row Count 7 (+ 2) % Row 51 \SetRowColor{white} REM & Turns the rest of the line into a comment. \tn % Row Count 10 (+ 3) % Row 52 \SetRowColor{LightBackground} RESTORE {\emph{{[}line\#{]}}} & Resets the pointer to the start of all DATA statements, or to the DATA statement on line {\emph{line\#}} \tn % Row Count 15 (+ 5) % Row 53 \SetRowColor{white} RESUME & Will resume compilation after a HALT. {\bf{Must}} be at the beginning of a line, or it will be ignored. \tn % Row Count 20 (+ 5) % Row 54 \SetRowColor{LightBackground} RETURN & Ends a subroutine and sends program flow back to the GOSUB statement. \tn % Row Count 24 (+ 4) % Row 55 \SetRowColor{white} REUPEEK({\emph{address, bank}}) & Will return the value from an attached REU at {\emph{address}} in bank {\emph{bank}} \tn % Row Count 28 (+ 4) % Row 56 \SetRowColor{LightBackground} REUPOKE {\emph{address, bank, val, val, val, ...}} & Will write the values to an attached REU starting at {\emph{address}} in bank {\emph{bank}} \tn % Row Count 32 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{BASIC Keywords (cont)}} \tn % Row 57 \SetRowColor{LightBackground} RIGHT\$({\emph{string}}, {\emph{count}}) & Returns {\emph{count}} characters from the right of {\emph{string}} \tn % Row Count 3 (+ 3) % Row 58 \SetRowColor{white} SPC({\emph{vov}}) & Prints {\emph{vov}} spaces \tn % Row Count 4 (+ 1) % Row 59 \SetRowColor{LightBackground} SPLIT {\emph{low, high{[}, high2{]}}} = {\emph{vov}} & Splits a variable into low and high bytes. \tn % Row Count 7 (+ 3) % Row 60 \SetRowColor{white} STASH {\emph{count, address, reu{[}, bank{]}}} & Copies {\emph{count}} C64 memory bytes at address {\emph{address}} to the attached REU address {\emph{reu}} in bank {\emph{bank}} \tn % Row Count 13 (+ 6) % Row 61 \SetRowColor{LightBackground} STATUS & Reads and clears the STatus \tn % Row Count 15 (+ 2) % Row 62 \SetRowColor{white} STOP & Stops the program execution but does not reset the screen. \tn % Row Count 18 (+ 3) % Row 63 \SetRowColor{LightBackground} STR\$({\emph{vov}}) & Converts number {\emph{vov}} into a string. \tn % Row Count 20 (+ 2) % Row 64 \SetRowColor{white} STRINGS {\emph{{[}size{]}}} & With no parameter, stretches the string field to 53247, otherwise to {\emph{size}}. \tn % Row Count 24 (+ 4) % Row 65 \SetRowColor{LightBackground} SWAP {\emph{count, c64, reu{[}, bank{]}}} & Swaps the main memory at address {\emph{c64}} with the memory on the attached REU at address {\emph{reu}} in bank {\emph{bank}} \tn % Row Count 30 (+ 6) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{BASIC Keywords (cont)}} \tn % Row 66 \SetRowColor{LightBackground} SWITCH {\emph{start, end, start2}} & Swaps the memory at addresses {\emph{start}} - {\emph{end}} with the memory starting at address {\emph{start2}} \tn % Row Count 5 (+ 5) % Row 67 \SetRowColor{white} SYS {\emph{address{[}, A, X, Y, ST{]}}} & Starts execution of ML code at {\emph{address}}. If the A, X, Y and ST values are specified, they will be loaded into the registers before starting. \tn % Row Count 13 (+ 8) % Row 68 \SetRowColor{LightBackground} TAB({\emph{vov}}) & Moves the cursor to {\emph{vov}} on the current line. \tn % Row Count 16 (+ 3) % Row 69 \SetRowColor{white} THEN {\emph{statement}} & If the prior IF {\emph{expression}} evaluated to TRUE, {\emph{statement}} will be executed. \tn % Row Count 20 (+ 4) % Row 70 \SetRowColor{LightBackground} TRAP {\emph{line\#{[}, vop{]}}} & Sends control of your program to {\emph{line\#}} on error. {\emph{vop}} if specified must be a non-arrayed int which will have the address of the error stored in it. \tn % Row Count 28 (+ 8) % Row 71 \SetRowColor{white} VAL({\emph{string}}) & Returns the mathematical value of {\emph{string}}. \tn % Row Count 31 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{BASIC Keywords (cont)}} \tn % Row 72 \SetRowColor{LightBackground} VERSION {\emph{number}} & Specifies which version of Vision BASIC needed to compile the block of code. \tn % Row Count 4 (+ 4) % Row 73 \SetRowColor{white} WAIT {\emph{address, and, eor}} & Will wait for a non-0 result from PEEKing {\emph{address}} and filtering with AND {\emph{and}} and EOR {\emph{eor}} \tn % Row Count 9 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{FOR-TO-STEP-NEXT loops and DO loops will only work on integer variables. \newline \newline POKE 2383,0 to disable the PADDLE bit-reversing.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.52 cm} x{4.48 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Functions and subroutines}} \tn % Row 0 \SetRowColor{LightBackground} POINT {\emph{vop = line\#}} & Sets {\emph{vop}} to the address of the compiled code for line {\emph{line\#}}. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} POINT TAG {\emph{tag = line\#}} & Creates a tag and points it to the address of the compiled code for line {\emph{line\#}}. \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} PROC {\emph{tag{[}. vop{[}, vop{[}, ...{]}{]}{]}}} & Defines the start of a subroutine named {\emph{tag}} with parameters {\emph{vop}}. \tn % Row Count 11 (+ 4) % Row 3 \SetRowColor{white} PASS {\emph{vop{[}, vop{[}, vop{[}, ...{]}{]}{]}}} & Defines paramaters {\emph{vop}} for a subroutine. Must be the first command after PROC if you're passing parameters. \tn % Row Count 16 (+ 5) % Row 4 \SetRowColor{LightBackground} RETURN & End the subroutine and send execution back to the calling line. \tn % Row Count 19 (+ 3) % Row 5 \SetRowColor{white} SEND {\emph{vov}} & Will make the subroutine return the value {\emph{vov}}. This must be the final command before RETURN if used. \tn % Row Count 24 (+ 5) % Row 6 \SetRowColor{LightBackground} TAG {\emph{tag{[} = vov{]}}} & Creates a TAG named {\emph{tag}}. If {\emph{vov}} is not specified, tag will get the current address in the program. Used like a LABEL in assembler. \tn % Row Count 31 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Call a subroutine like \newline `tag.vop,vop,vop` \newline \newline Strings and string variables cannot be returned from subroutines.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Sound Commands}} \tn % Row 0 \SetRowColor{LightBackground} ADSR {\emph{attack, decay, sustain, release}} & Specifies the {\emph{attack}}, {\emph{decay}}, {\emph{sustain}} and {\emph{release}} parameters for the current voice. \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} CUTOFF {\emph{freq}} & Sets the cutoff frequency to {\emph{freq}} for the SID filtering system. \tn % Row Count 9 (+ 4) % Row 2 \SetRowColor{LightBackground} FILTER {\emph{voice1, voice2, voice3, ext, resonance}} & Enables or disables the filters of {\emph{voice1}}, {\emph{voice2}}, {\emph{voice3}}, the output of the {\emph{external}} input and the {\emph{resonance}} value. \tn % Row Count 16 (+ 7) % Row 3 \SetRowColor{white} FREQ {\emph{freq}} & Specifies that the current voice will play frequency {\emph{freq}}. \tn % Row Count 19 (+ 3) % Row 4 \SetRowColor{LightBackground} PULSE {\emph{width}} & Specifies the pulse waveform width for the current voice. \tn % Row Count 22 (+ 3) % Row 5 \SetRowColor{white} SIDCLR & Clears the sound registers \tn % Row Count 24 (+ 2) % Row 6 \SetRowColor{LightBackground} VOICE {\emph{num}} & Chooses which voice will be used (1-3) \tn % Row Count 26 (+ 2) % Row 7 \SetRowColor{white} VOL {\emph{volume, low, band, high, disconnect}} & Controls the main volume and filter selection. Can enable or disable the {\emph{low}}, {\emph{band}} and {\emph{high}} pass filters. If {\emph{disconnect}} is enables, disconnects the output of voice 3. \tn % Row Count 35 (+ 9) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Sound Commands (cont)}} \tn % Row 8 \SetRowColor{LightBackground} WAVE {\emph{gate, wave, ring, sync test}} & Enables or disables the {\emph{gate}}. {\emph{wave}} is 1 (triangle), 2 (sawtooth), 4 (pulse) or 8 (noise). {\emph{ring}} chooses ring modulate oscillators. {\emph{sync}} chooses sync modulate oscillators. {\emph{test}} enables or disables the voice oscillator. \tn % Row Count 12 (+ 12) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{All parameters can be values or variables. If a parameter is left off, a previously used value will be used, or a 0 if no value has been specified before. \newline \newline The commands {\bf{FREQ}}, {\bf{PULSE}}, {\bf{ADSR}}, and {\bf{WAVE}} require you to set a current {\bf{VOICE}} before calling them. \newline \newline 0 disables, 1 enables} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Text Video Commands}} \tn % Row 0 \SetRowColor{LightBackground} BANK {\emph{bank}} & Selects the active 16K memory bank for video. This is {\bf{not}} for setting REU banks. You will probably not need to ever use this command. \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} BLANK {\emph{{[}blank{[}, bg, bars1, bars2{]}{]}}} & Blanks or restores the screen. 1 blanks the screen, 0 un-blanks. bg changes the background color, 0-15. bars changes the bar colors. \tn % Row Count 14 (+ 7) % Row 2 \SetRowColor{LightBackground} CATCH {\emph{rasterline}} & Acts like a WAIT command for the rasterline. rasterline can be 0-255. \tn % Row Count 18 (+ 4) % Row 3 \SetRowColor{white} CHARPAT {\emph{character, charset}} & Moves the "code" pointer to point at a specific character image. {\emph{character}} is the character that you want to point at, {\emph{charset}} is the character set that the character is in. \tn % Row Count 27 (+ 9) % Row 4 \SetRowColor{LightBackground} CHARSET {\emph{charset}} & Selects the desired character set. \tn % Row Count 29 (+ 2) % Row 5 \SetRowColor{white} COLORS {\emph{text, border, screen, color1, color2, color3}} & Sets the color registers. \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Text Video Commands (cont)}} \tn % Row 6 \SetRowColor{LightBackground} COPYSET {\emph{charset{[}, case{]}}} & Copies the C64 character set to location {\emph{charset}}. If {\emph{case}} is 0, copy uppercase, if 1 copy lowercase. \tn % Row Count 6 (+ 6) % Row 7 \SetRowColor{white} EXTENDED {\emph{on{[}, color1, color2, color3{]}}} & Turns on or off extended color mode. If colors are supplied, will set the 3 background colors. \tn % Row Count 11 (+ 5) % Row 8 \SetRowColor{LightBackground} LOWERCASE {\emph{{[}disable{]}}} & Changes the character set to lowercase. If {\emph{disable}} is 1, disables keyboard toggling between upper and lower case. \tn % Row Count 17 (+ 6) % Row 9 \SetRowColor{white} MULTI {\emph{on{[}, color1, color2{]}}} & Turns on or off multicolor mode. If colors are specified, will set the background colors. \tn % Row Count 22 (+ 5) % Row 10 \SetRowColor{LightBackground} NORMAL {\emph{clear}} & Resets the screen to normal text mode. 1 will clear the line link table, 0 will not. \tn % Row Count 27 (+ 5) % Row 11 \SetRowColor{white} UPPERCASE {\emph{{[}disable{]}}} & Changes the character set to uppercase. If {\emph{disable}} is 1, disables keyboard toggling between upper and lower case. \tn % Row Count 33 (+ 6) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Text Video Commands (cont)}} \tn % Row 12 \SetRowColor{LightBackground} PANX {\emph{panvalue, columns}} & Pans the screen horizontally. {\emph{panvalue}} (will be bit-reversed) can be 0-7 (0=none), if {\emph{columns}} is 0, sets 38 column screen, 1 sets 40 column screen. \tn % Row Count 8 (+ 8) % Row 13 \SetRowColor{white} PANY {\emph{panvalue, rows}} & Pans the screen vertically. {\emph{panvalue}} (will be bit-reversed) can be 0-7 (3=none). If {\emph{rows}} is 0, 24 row screen, if 1, 25 row screen. \tn % Row Count 15 (+ 7) % Row 14 \SetRowColor{LightBackground} VIDLOC {\emph{screen, printto, charset, clear}} & Moves the text screen to and of the 64 1K screens available. {\emph{screen}} chooses which 1K to use, {\emph{printto}} chooses which screen to print to (you will probably want this to be equal to {\emph{screen}}), {\emph{charset}} selects the location of the character set. {\emph{clear}} of 1 will clear the line link table, 0 will not. \tn % Row Count 31 (+ 16) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{POKE 2384,0 to disable the bit-reversing of PANX, PANY.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}