base:using_the_vice_monitor
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
base:using_the_vice_monitor [2015-04-17 04:34] – external edit 127.0.0.1 | base:using_the_vice_monitor [2018-02-27 10:39] (current) – link corrected eddie | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Using the VICE monitor ====== | ||
+ | |||
+ | I am sure all of you are familiar with [[http:// | ||
+ | |||
+ | ===== Invoking the monitor ===== | ||
+ | |||
+ | This works differently depending on what target platform you are running VICE on. In Windows, you press **Alt+M**. In Linux, the keyboard shortcut is instead, for some elusive reason unbeknownst to any but the VICE developers, **Alt+H**. | ||
+ | |||
+ | ===== Loading/ | ||
+ | |||
+ | < | ||
+ | l "< | ||
+ | s "< | ||
+ | </ | ||
+ | |||
+ | For those of you who code in TASS, this is extremely handy, and it's quite useful for us others as well. The key here is using ' | ||
+ | |||
+ | ===== Reading the status display ===== | ||
+ | |||
+ | If you type '' | ||
+ | |||
+ | < | ||
+ | ADDR AC XR YR SP 00 01 NV-BDIZC LIN CYC | ||
+ | .;ded5 00 00 0a f1 2f 37 00100010 000 001 | ||
+ | </ | ||
+ | |||
+ | I will skip the normal C64 monitor stuff and move directly on to the two last and most interesting information posts: '' | ||
+ | |||
+ | ===== Breakpoints and stepping ===== | ||
+ | |||
+ | These mechanisms are the core of any serious debugging job. | ||
+ | |||
+ | < | ||
+ | break [< | ||
+ | </ | ||
+ | |||
+ | This is the mother of code. You all probably know how to work breakpoints, | ||
+ | |||
+ | < | ||
+ | break 1000 if .Y == 1 | ||
+ | </ | ||
+ | |||
+ | Note the double equality signs to denote comparison and not assignment! Anyway, now that we know how to set breakpoints, | ||
+ | |||
+ | < | ||
+ | step [< | ||
+ | next [< | ||
+ | </ | ||
+ | |||
+ | Where the optional count argument specifies how many instructions to execute. The difference between '' | ||
+ | |||
+ | ===== Import labels into the monitor ===== | ||
+ | (This section was written by Frantic) | ||
+ | |||
+ | In case you are able to output the assembled labels from your assembler, then you can make some script to convert the info into the following form (note that you have to add a dot before the label names) and add that to your makefile before calling VICE: | ||
+ | |||
+ | < | ||
+ | al 1000 .player_init | ||
+ | al 1003 .player_driver | ||
+ | al d400 .SID_V1_FREQ_LO | ||
+ | al d401 .SID_V1_FREQ_HI | ||
+ | al d402 .SID_V1_PW_LO | ||
+ | al d403 .SID_V1_PW_HI | ||
+ | [etc…] | ||
+ | </ | ||
+ | |||
+ | The command " | ||
+ | |||
+ | < | ||
+ | x64 -moncommands yourstuff.txt -8 yourprogram.d64 | ||
+ | </ | ||
+ | |||
+ | If you do this, VICE will execute all the al commands in " | ||
+ | |||
+ | < | ||
+ | break 1000 | ||
+ | al 1000 .player_init | ||
+ | al 1003 .player_driver | ||
+ | </ | ||
+ | |||
+ | In this case, this would mean that the VICE monitor would pop up each time you call the " | ||
+ | |||
+ | ===== Further reading ===== | ||
+ | |||
+ | The VICE Manual has [[http:// | ||
base/using_the_vice_monitor.txt · Last modified: 2018-02-27 10:39 by eddie