Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Conditional breakpoints in Vice
2004-05-21 17:29
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.
2004-05-22 11:32
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
2004-05-22 11:33
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
? condition gives you the info
2004-05-22 15:24
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"

2004-05-22 18:15
Steppe

Registered: Jan 2002
Posts: 1510
Have you tried it with the "$"?

break 290e if $2914==0 Hm...
2004-05-22 18:49
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".
2004-05-23 01:27
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
If you want to break on the A,X,Y = something,
use $030c, 030d, 030e
2004-05-23 05:23
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 :)
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Andy/AEG
BANDIT/BANDIT-COOL-S..
Smasher/F4CG
Hydrogen/Glance
leonofsgr/Singular C..
Scrap/Genesis Project
Asphodel
Guests online: 102
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.038 sec.