| |
Cybernator
Registered: Jun 2002 Posts: 154 |
Conditional breakpoints in Vice
According to the manual, conditional breakpoints are set like this: break [<address> [if <cond_expr>] ]
But I don't see info about cond_expr. I need a breakpoint when A==some value.
If I write: break $1000 if A==$10, the condition is: 10==16, which is always false.
I'd appreciate a tip or something. |
|
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
i made a program that does this:
_start
inc d021
dec d020
sta 02
_last
jmp start
then wrote break _last if $02==f8
it works
|
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
? condition gives you the info
|
| |
iAN CooG
Registered: May 2002 Posts: 3197 |
Quote: ? condition gives you the info
Both internal help and html documentations seem very vague on this subject. Debugging a game I tried this:
break 290e if 2914==0
$2914 is ALWAYS 0 but monitor never breaks and goes straight.
I cant also use registers,
if a == 0
is interpreted as location $0a
if AC == 0
is interpreted as location $ac
if X == 0, if XR/Y/YR causes "unexpected token"
|
| |
Steppe
Registered: Jan 2002 Posts: 1510 |
Have you tried it with the "$"?
break 290e if $2914==0 Hm... |
| |
iAN CooG
Registered: May 2002 Posts: 3197 |
Quote: Have you tried it with the "$"?
break 290e if $2914==0 Hm...
Yes, of course with and without $.
Anyway any number is hex for default unless I set it to decimal with "radix d". |
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
If you want to break on the A,X,Y = something,
use $030c, 030d, 030e |
| |
iAN CooG
Registered: May 2002 Posts: 3197 |
Quote: If you want to break on the A,X,Y = something,
use $030c, 030d, 030e
Those are register updated for Basic usage, AFAIR. Quite useless while debugging games ;)
ADDR AC XR YR SP 00 01 NV-BDIZC LIN CYC
.;f501 fe 82 01 f7 2f 37 00100001 000 002
(C:$f501) m 30c
>C:030c 00 00 00 00 4c 48 b2 00 31 ea 66 fe 47 fe 4a f3
as you can see no values match the registers.
Anyway I tried also this and as i expected didn't work.
Maybe it's the Windows port of Vice (v1.14) that is faulty.
Sometimes "del" crashes it, I have to remove breakpoints using the mouse on the disassebly window... another reason for me to feel more comfortable with CCS internal monitor :) |