Instruction manual

Selected Program Listings
ROM monitor
3
# File 2K_ROM_8.asm
0000 ;ROM monitor for a system with serial interface and IDE disk and memory expansion board.
0000 ;Expansion board has 64K RAM -- computer board memory decoder disabled (J2 off).
0000 ;Expansion board uses ports 2 and 3 for the serial interface, and 8 to 15 for the disk
0000 ;Therefore the computer board I/O decoder is also disabled (J1 off)
0000 ;Output to port 0 will cause memory configuration flip-flop to activate 2K ROM 0000-07FF,
0000 ;with 62K RAM 0800-FFFF
0000 ;Output to port 1 will cause memory configuration flip-flop to activate all RAM 0000-FFFF
0000 ;
0000 org 00000h
0000 c3 63 04 jp monitor_cold_start
0003 ;
0003 ;The following code is for a system with a serial port.
0003 ;Assumes the UART data port address is 02h and control/status address is 03h
0003 ;
0003 ;The subroutines for the serial port use these variables in RAM:
0003 current_location: equ 0xdb00 ;word variable in RAM
0003 line_count: equ 0xdb02 ;byte variable in RAM
0003 byte_count: equ 0xdb03 ;byte variable in RAM
0003 value_pointer: equ 0xdb04 ;word variable in RAM
0003 current_value: equ 0xdb06 ;word variable in RAM
0003 buffer: equ 0xdb08 ;buffer in RAM -- up to stack area
0003 ;Need to have stack in upper RAM, but not in area of CP/M or RAM monitor.
0003 ROM_monitor_stack: equ 0xdbff ;upper TPA in RAM, below RAM monitor
0003 ;
0003 ;Subroutine to initialize serial port UART
0003 ;Needs to be called only once after computer comes out of reset.
0003 ;If called while port is active will cause port to fail.
0003 ;16x = 9600 baud
0003 3e 4e initialize_port: ld a,04eh ;1 stop bit, no parity, 8-bit char, 16x baud
3 The RAM monitor program monitor.bin is identical to this ROM monitor, except it was assembled to target address 0xDC00, and it has a small code prefix to move
the code to this location after CP/M loads it at 0x0100.
45