Colin MK II
Hitachi Basic Operating System commands
HBOS V1.81

Click on the command descriptions above to view a detailed description in this area.
Command: B - Set / Clear Breakpoints

Syntax:
Set Breakpoint   - B(n)<Addr><CR>
Clear Breakpoint - B(n)<Addr><CR>

Example(s)
B1 090A<CR>
This sets breakpoint 1 at address 090AH, which displayed the contents of the user registers.

B1<CR>
This resets breakpoint 1, allowing the program to run normally.

Purpose:
This command was used to set ‘breakpoints’ in the user's code. Originally, only one breakpoint was allowed in the C-SYS firmware. Whilst re-writing the firmware as my own Basic Operating System, I extended the capability to 5 usable breakpoints.
Command: C - Copy memory up / down

Syntax:
C<Srce Addr><Dest Addr><Byte Count><CR>


Example(s)
C900 901 100<CR>
In this example, the contents of location 0900H is copied to 0901H. 0100H bytes will be moved in this manner.





Purpose:
The 'C' command allows the user to copy a block of memory from one point in the memory map to another.
Command: D - Disk boot

Syntax:
D<CR>


Example(s)
D<CR>

If successful, after loading the CP/M operating system, the screen will be cleared and the following prompt will be displayed:

CP/M 2.2

A>
Purpose:
To load and run an operating system from disk. In our case, the operating system is CP/M 2.2.

The 'D' command loads the CP/M operating system from the 1st two tracks of drive 'A'.
Command: E - Execute a program

Syntax:
Run new program           - E<Addr><CR>
Re-run / continue program - E<CR>

Example(s)
E800<CR>
This command runs a user program starting at 0800H.

E<CR>
This command runs a program from the original starting address, or continues an interrupted program.

Purpose:
Used to run a user program which has been loaded into memory. There are two uses of this command.

1 - Run a program from a user selected     address.

2 - Re-run the same program as before,     using the original run address.
  - Continue from a breakpoint.
  - Continue from a program suspended by     typing <CTRL-C> at the keyboard.
Command: F - Fill memory

Syntax:
F<Start Addr><End Addr><Data Byte><CR>


Example(s)
F1000 1FFF 55<CR>

In this example, the memory locations from 1000H to 1FFFH are filled with the Hex byte 55.




Purpose:
The 'F' command is used to set a block of memory to a specified value.

Note 1: The data byte defaults to 00H if not specified.

Note 2: A quirk of the system means that if FF<CR> is typed, the whole of memory is filled with zeros.
Command: H - Hexadecimal arithmetic

Syntax:
Addition    - H<Word 0>+<Word 1><CR>
Subtraction - H<Word 0>-<Word 1><CR>

Example(s)
H9AE-800<CR>
01AE
Here, 0800H has been subtracted from 09AEH to give an answer of 01AE.

H-700<CR>
F900
Here, the value 0700H has been negated giving the result of 0F900H.
Purpose:
The 'H' command is used to carry out 16 bit Hexadecimal arithmetic.
Command: I - Input from I/O port

Syntax:
I<Port number><CR>


Example(s)
I12<CR>
20

In this case, a read from port 12H has resulted in the value 20H.




Purpose:
The 'I' command is used to read data from the specified input port and display the value in Hex.

Note: <Port number> specifies an I/O port number in the range 00H to 0FFH
Command: J - FDC chip setup

Syntax:
J<CR>


Example(s)
J<CR>
To be completed.


Purpose:
The 'J' command is used to setup the WD2797 chip for reliable operation.
Command: M - Modify / Examine memory

Syntax:
M<Addr><CR>


Example(s)
M0800<CR>
0800 3E

In this example, the contents of memory address 0800H are 3EH. The user can either modify the contents or leave them as is. (The user's choice).


Purpose:
The 'M' command is used to examine and modify the contents of memory. By entering a memory address, the user is shown the current contents as a Hex byte. Data is entered in Hex.

If the user wished to leave the contents the same, then <CR> is entered.

To exit the modify mode, the user simply types a period (.) and <CR>.
Command: O - Output to I/O port

Syntax:
O<Port number><Data byte><CR>


Example(s)
O26 5E<CR>

In this example, the Hex byte 5E is sent to I/O port 26H.





Purpose:
The 'O' command is used to send a data byte to the specified I/O port.

Note: <Port number> specifies an I/O port number in the range 00H to 0FFH.
Command: R - List user register contents

Syntax:
R<CR>


Example(s)
R<CR>

This command displays the user registers in the following format:

FBFF 0800 0000 0000 0000 0000 0000 0000
 SP   PC   HL   IX   IY   DE   BC   AF


Purpose:
The 'R' command is used to display the contents of the user registers which are listed in the order SP, PC, HL, IX, IY, DE, BC & AF. A title is printed underneath each register pair for identification purposes.

In the example shown, the SP is set at 0FBFFH, the highest address available below the data block in a 64kB system.

The PC is shown at 0800H, the first available memory address above the 2kB firmware address space.
Command: S - Set Real Time Clock

Syntax:
S<CR>


Example(s)
S<CR>

To be completed.






Purpose:
The 'S' is used to set the time and date within the Real Time Clock (RTC) chip.




Command: T - Tabulate memory

Syntax:
T<Start Addr><End Addr><CR>


Example(s)
TD400 D40F<CR>

The command above results in the following display on the Custom 80 screen:

D400 41 42 1B 00 45 46 47 48 AB..EFGH
D408 30 31 32 33 34 2B 0A 37 01234+.7


Purpose:
This command is used to display the comtents of memory, RAM or ROM. Due to the initial design of the Teletext VDU output, display of characters was limited to 40x24. Because of this, memory tabulation was carried out 8 bytes per line. Any non-printing ASCII characters were shown as a period(.).

Valid HTML 4.01 Strict Valid CSS!