randrew / uxn32

Uxn emulator for Windows and Wine
169 stars 7 forks source link

Can't step program? #11

Open HazeSystem opened 1 year ago

HazeSystem commented 1 year ago

It seems that no matter what I do, there's no way to pause a program and step through it in the debugger. I've only been able to step through a program that has a bug that causes execution to halt.

randrew commented 1 year ago

There's a device you can write to that triggers the debugger. I forgot what it is.

HazeSystem commented 1 year ago

Ahh okay, it's writing a non-zero value to .System/debug (#0e). Could you add that to the Readme perhaps? :)

randrew commented 1 year ago

It's in the Varvara document, sorta. Maybe @neauoire could change the Varvara documentation so that it says "invokes some emulator-specific debug function" or something?

neauoire commented 1 year ago

Ah! yeah I went and made it clearer :) #010e DEO is indeed the way to do this.

Sending a non-null byte to the 0x0e port will print the content of the stacks or pause the evaluation if the emulator includes a step-debugger, sending a non-null byte to the 0x0f port will terminate the application.