From 86006af348be75412fdc3dfb5a037b89a01122e8 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 24 Aug 2026 16:17:25 +0200 Subject: Allow the --start flag to accept identifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is coupled with the new -n/--nasm option, which works in the same way as in `readrom`. Signed-off-by: Miquel Sabaté Solà --- crates/runrom/README.md | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'crates/runrom/README.md') diff --git a/crates/runrom/README.md b/crates/runrom/README.md index 5e232db..9bd5070 100644 --- a/crates/runrom/README.md +++ b/crates/runrom/README.md @@ -36,14 +36,30 @@ You can run a ROM file by simply: $ runrom /game.nes ``` -This will display all of the instructions being run. By default it will run from -the reset vector. You can change that with the `-s/--start` option, which -accepts a 16-bit address from where to start execution. - -That being said, most of the times you want to test a specific function. For -that, you can toggle the `-f/--function` option, which tells `runrom` that the -address is just a function and, whenever a top-level `rts`/`rti` instruction is -found, then execution can be halted. +This will display all of the instructions being run. + +### From where should the VM start? + +By default `runrom` will start from the advertised reset vector. You can change +that with the `-s/--start` option, which accepts a 16-bit address from where to +start execution. The address can be given in hexadecimal format, but you can +also provide a full address name with the `-n/--nasm` option. With this option +you provide the location to the hidden `.nasm/` directory for the project (see +more details on [nasm's README file](../nasm/README.md)), which is then used to +translate the given identifier with the actual address. So: + +``` +$ runrom --start my-function --nasm game.nes +``` + +### When should the VM end? + +A lot of times you want to test a specific function. For that, you can toggle +the `-f/--function` option, which tells `runrom` that the address is just a +function and, whenever a top-level `rts`/`rti` instruction is found, then +execution should be halted. + +### Other features Moreover, you may also find interesting the `-d/--dump-memory` option, which will display a summary of memory addresses which have been updated along -- cgit v1.2.3