Machine-code monitor, fast serial, memory files, Ctrl-Alt-Del
Monitor: the CPU gets an NMI (taken at an instruction start, or from HALT) raised by the Pause key, BASIC's MONITOR, two hardware breakpoint comparators or a step counter. It enters through a trampoline at 0066h (the same bytes in BASIC's ROM and the monitor's, basic/tramp.s) that switches in a 32 KB monitor bank over 0000-7FFF. The monitor (monitor/, C) runs on the terminal's new alternate screen (CSI ?47 h/l, a second screen page; graphics hidden) and shows registers, flags, a disassembly from PC, the stack and memory. Commands: Enter/S n step, O step over, G/X go, B breakpoint, D/M windows, E edit, R registers, and SAVE/LOAD/ DIR for memory files. The disassembler covers every opcode; monitor/test-disasm.py round-trips all forms through sdasz80. Lockstep CPU tests still match the reference emulator. BASIC: MONITOR, CALL addr, BSAVE "N",start,len and BLOAD "N"[,addr] (memory files: load address then bytes). The DATE clock moves to F3F8h so the monitor can date files. F000-F3F7 is kept free for machine code (program area 21076 bytes). Serial: SW1:0 = 10 is now 921600 and 11 is 3 Mbaud. A 17 KB burst to BASIC lists back identical at both on the board. send-bas.py reads the echo while sending; unread, it could stall the PC's flow control. Ctrl-Alt-Del in Z-80 mode restarts the Z-80 like BTND. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
767377f38d
commit
634e314010
27 files changed
+37481
-3039
No files matched your search
+6
-5
@@ -115,20 +115,21 @@ module text_display #(
|
||||
end
|
||||
endmodule
|
||||
|
||||
// 2400-cell character buffer: read/write port for the terminal engine,
|
||||
// Two 2400-cell character buffers (the normal and the alternate screen; the
|
||||
// top address bit picks one): read/write port for the terminal engine,
|
||||
// read-only port for video.
|
||||
module char_ram (
|
||||
input clk,
|
||||
input [11:0] a_addr,
|
||||
input [12:0] a_addr,
|
||||
input a_we,
|
||||
input [17:0] a_wdata,
|
||||
output reg [17:0] a_rdata,
|
||||
input [11:0] b_addr,
|
||||
input [12:0] b_addr,
|
||||
output reg [17:0] b_rdata
|
||||
);
|
||||
(* ram_style = "block" *) reg [17:0] mem [0:4095];
|
||||
(* ram_style = "block" *) reg [17:0] mem [0:8191];
|
||||
integer i;
|
||||
initial for (i = 0; i < 4096; i = i + 1) mem[i] = {10'h00A, 8'h20};
|
||||
initial for (i = 0; i < 8192; i = i + 1) mem[i] = {10'h00A, 8'h20};
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (a_we) mem[a_addr] <= a_wdata;
|
||||
|
||||
Reference in new issue
Block a user