Reference
When you are using the BETRIC computer, you will be mostly interacting with with
commands provided by the BETRIC ROM operating system. These are explained in
detail here. For a softer introduction to BETRIC, please hop on over to the
Quickstart Tutorial!
d - Dump memory
Shows a "dump" of the memory specified at an (optional) address. If no address is specified, the dump begins at address 0000. The dump consists of three columns. The first is the memory address for the starting byte of each row of data. The second is the actual contents of the binary memory, displayed in hexadecimal format. The third is an ASCII translation of each byte shown in the second column.
Examples:
d will dump starting at the default address 0000.
d 23A will dump starting at address 023A.
p - Put into memory
The "put" command takes two parameters. The first is the memory address to which you wish to write data. The second is one or more bytes of data, expressed as 8-bit hexadecimal pairs separated by spaces.
Examples:
p F0 34 puts the single byte value 34 hex (00110100 binary) into memory location 00F0.
p 0 62 3A F1 puts the values '62', '3A', and 'F1' into memory locations 0000, 0001, and 0002.
u - Unassemble a program
The disassembly command shows any program, starting at address 0000, disassembled to assembly language. This can be helpful for checking or debugging your programs. The output is in three columns. The first is the memory address for the starting byte of each row of shown memory. The second is the actual BETRIC machine language contents of the memory, displayed in hexadecimal format. The third is the BETRIC assembly language translation of the machine language.
Example:
u shows disassembly for program starting at address 0000.
r - View/modify registers
The register command allows you to either view the contents of the registers of the BETRIC virtual computer, or change and view them. To view the contents of the registers, simply use ther command with no parameters. If you wish to modify the
contents of a register, give the name of the register as the first command, and the hexadecimal byte value you wish to assign
to that register as the second.
Examples:
r views the current contents of the registers without changing them.
r a ff puts the hexadecimal value 'ff' in register A
go - Run a program
The go command starts a program starting at memory address 0000. All programs to by run by BETRIC must be entered so that they begin at address 0000.
Example:
go runs a program at address 0000.
putchr - Display a character or string
A command not associated with programming in any way, you can direct BETRIC to display a character or
Example:
putchr Hello Human. 23 2 7 Will display the string "Hello Human." in column 23, on row 2, in color 7.

