Skip to content
This repository has been archived by the owner on Oct 12, 2020. It is now read-only.

Monitor

LGB edited this page Mar 29, 2016 · 7 revisions

Xep128 monitor program

Xep128 has a somewhat lame monitor functionality. It's used as a "classic monitor program" (disassembly, memory dump, ...) but also for setting/querying emulation specific features. It can be accessed two different ways:

  • From the emulated Enterprise directly with :XEP commands (or only XEP in case of eg an EXDOS window)
  • Note, most commands has long output lines. It's highly recommended to use 80 column display mode, eg in IS-BASIC, command text 80 does the trick.
  • From the Xep128 console (press - in case of default keyboard mapping used - numeric key pad minus button in the emulator to access it). In this case the XEP or :XEP part of the command cannot be used.
  • In case of Windows a new console window should appear (do not try to close it by yourself ... use CLOSE command if you don't need it)
  • In case of Linux/UNIX the stdin will present a prompt (but you still use the "console window" hot-key first, in the emulator!), so you need start Xep128 from eg a terminal window for this.

The most important command is HELP where you can see the list of available commands. It shows some version/compilation related information as well. Constructions like HELP[?] means, that the command has a "short name alias" as well, "?" in our case. Again, the usage of HELP command for example:

  • HELP or just ? (short alias) from console/monitor window (stdin on Linux) after you activated the console, or already open
  • :XEP HELP or even EXT "XEP HELP" from IS-BASIC, :XEP ? or EXT "XEP ?" with the short alias
  • XEP HELP or XEP ? (short alias) from an EXOS command line, or EXDOS window

From now, XEP and :XEP parts will be not written, just the command name. HELP command also accepts a command name, ie HELP CPU, with some short help on the given command itself.

The most important commands are:

  • AUDIO tries to switch experimental and known-to-be-buggy audio emulation on
  • CLOSE close the console window
  • CPU query / set emulated CPU type and clock
  • DISASM (short alias: D): disassembly, see the next chapter on "classic monitor features"
  • EMU run-time information on the emulator
  • EXIT exit Xep128
  • EXOS information about EXOS (queried with EXOS 20 call)
  • HELP (short alias: ?) compilation level information on Xep128, also list of all commands, with an argument: help on a given command
  • LPT dumps LPT, warning: can be very large output, not recommended to do from XEP ...
  • MEMDUMP (short alias: M) memory dump feature, see the next chapter on "classic monitor features"
  • MOUSE query/set emulated mouse type
  • PRIMO enters into semi-hardware Primo emulation mode, still buggy, especially if tried from console window ...
  • RAM query system memory map, or configure RAM layout (this will cause emulated EP to reboot)
  • REGS (short alias: R) shows state of Z80 registers (and also the Dave B0...B3 ports)
  • ROMNAME short ROM name info, used primarily by the EXOS (not XEP!) HELP command on "ROM list"
  • SETDATE sets EXOS time/date according to the emulator's OS (this command only works via XEP, not from console!)
  • SHOWKEYS toogles SDL debug feature on/off: all pressed keys are displayed via OSD
  • TESTARGS internal monitor command line testing feature, can be ignored by the user

"Classic" monitor features

Currently, Xep128 supports memory dump, disassembly. These commands need to specify address of the operation. Basically monitor continues the disassembly/memory dumping from the previous command entered if no address specification is given. If so, a single hex number is interpreted as the address from view point of the CPU. If two hex numbers are given separated by ':', the second number should be the segment number. In this case, the address is nothing to do with the CPU address. Also, though a segment is only 16K long, you can see things like C000 within a segment. For real, the lower 14 bit counts for the system, but for eg disassembly it is important in case of absolute addresses with jumps, or for being clear at the addresses printed at the beginning of lines, etc. Here you can see the difference of the two method:

For example command memdump 3ff0 will do something like this:

; CPU paging relative from 3FF0
3FF0:*F8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
4000:*00 F3 ED 56 3E 02 C3 2E C0 80 57 82 C6 81 C6 E5 C7 ..V>.....W......

While command memdump 3ff0:f8 will do this:

; Absolute addresses from 3FF0:F8
3FF0:=F8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
4000:=F9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

The '*' before the segment number shows that it's "calculated" segment number from the CPU "page-segment mapping". In that example we had segment F8h on page 0 and segment 00h on page 1. The second example asked for "physical" segment addressing, so it only dumps the given segment and continues linearly, F9h is the next segment after F8h, simple enough. This mode is marked '=' before the segment numbers.

About the same is true for DISASM (D) command as well.

Clone this wiki locally