25 #define OPCODE_RET 0xC9
44 static int internal_rom_is_in_use = 0;
52 place_ed_trap(
addr, trap_no);
59 memset(
memory, 0x00, 0x8000);
70 internal_rom_is_in_use = 1;
74 internal_rom_is_in_use = 0;
81 if (
addr > 0xFF || !internal_rom_is_in_use) {
123 DEBUG(
"MEM: trying to write ROM at $%04X" NL,
addr);
131 if (addr < 0 || addr > 0xFFFF)
132 FATAL(
"emu_mem_write(): invalid address %d" NL,
addr);
133 if (data < 0 || data > 0xFF)
134 FATAL(
"emu_mem_write(): invalid data %d" NL,
data);
140 if (addr < 0 || addr > 0xFFFF)
141 FATAL(
"emu_mem_write(): invalid address %d" NL,
addr);
173 conputs(
"\n\rPress SPACE to exit");
203 int oplen =
z80ex_dasm(o_dasm,
sizeof o_dasm, 0, &t1, &t2, disasm_mreader,
addr & 0xFFFF);
204 char *p = strchr(o_dasm,
' ');
210 for (
int a = 0; a < oplen; a++)
211 sprintf(o_head + a * 3,
"%02X ", disasm_mreader(
addr + a));
213 snprintf(
buf, buf_size,
"%04X %-12s %-4s %s",
addr, o_head, o_dasm, p);
215 snprintf(
buf, buf_size,
"%04X %-12s %s",
addr, o_head, o_dasm);