Skip to content
Matt Waltz edited this page Jan 12, 2018 · 5 revisions

CEmu offers many software commands that can be executed directly from user programs in order to do useful things such as setting breakpoints and opening the debugger.

Available Commands

Open Debugger

Open the debugger for any reason. Write 2 to address 0xffffff.

scf
sbc    hl,hl
ld     (hl),2

Set Breakpoint

Set a breakpoint address. Write 3 to address 0xffffff. Register DE = breakpoint address.

scf
sbc    hl,hl
ld     de,label
ld     (hl),3

Set Breakpoint

Remove a breakpoint address. Write 4 to address 0xffffff. Register DE = breakpoint address.

scf
sbc    hl,hl
ld     de,label
ld     (hl),4

Set Read Watchpoint

Set a read watchpoint address. Write 5 to address 0xffffff. Register DE = watchpoint address. Register C = Display length.

scf
sbc    hl,hl
ld     de,label
ld     c,2
ld     (hl),5

Set Write Watchpoint

Set a write watchpoint address. Write 6 to address 0xffffff. Register DE = watchpoint address. Register C = Display length.

scf
sbc    hl,hl
ld     de,label
ld     c,2
ld     (hl),6

Set Read/Write Watchpoint

Set a read/write watchpoint address. Write 7 to address 0xffffff. Register DE = watchpoint address. Register C = Display length.

scf
sbc    hl,hl
ld     de,label
ld     c,2
ld     (hl),7

Set Watchpoint

Set a non-breaking watchpoint address. Write 11 to address 0xffffff. Register DE = watchpoint address. Register C = Display length.

scf
sbc    hl,hl
ld     de,label
ld     c,2
ld     (hl),11

Remove Watchpoint

Remove watchpoint address. Write 8 to address 0xffffff. Register DE = watchpoint address.

scf
sbc    hl,hl
ld     de,label
ld     (hl),8

Remove All Breakpoints

Removes all current breakpoints. Write 9 to address 0xffffff.

scf
sbc    hl,hl
ld     (hl),9

Remove All Watchpoints

Removes all current watchpoints. Write 10 to address 0xffffff.

scf
sbc    hl,hl
ld     (hl),10
Clone this wiki locally