签到天数: 2136 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
6 I3 O3 I% W: ?Conditional Breakpoints
* A$ T }& G7 n; f" O7 i4 Q6 E
8 w5 f( o4 d. P$ P/ s/ g/ p, B9 HBreakpoints may also have a conditional statement that causes them to execute only if that statement evaluates to true. The conditional breakpoint grammar has this form:- H( C! P, S% }9 {
' l+ Y1 F( V3 q/ I ^4 rConnect -> Compare { ('||' | '&&') Compare }
% H5 `' x. p4 Q+ m) P6 f! lCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } , Q5 E- F/ q% G% q
Sum -> Product { ('+' | '-') Product }
8 d9 E3 {0 i7 R. uProduct -> Primitive { ('*' | '/') Primitive }
/ p" _4 y4 p$ nPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' , P. n! G# u# S/ e
Number -> '#' [0123456789ABCDEF]* 1 D$ V( Q% d5 r7 F7 q" {
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' / ^) S/ C" F4 [1 u* ~. l
Register -> 'A' | 'X' | 'Y' | 'P' : q. Q' b9 g5 j5 l. s
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' * O) y* s# o) k* v7 u
PC Bank -> 'K' * U z* v+ Q. v: X' ~) D- j
Data Bank -> 'T' + p% a9 J! ]7 S
l* d2 h) |! I% b
The parser is very strict. All numbers are hexadecimal. Always prefix a number with # for an immediate value, or $ for a memory address. If a memory address needs to be calculated use $[] with the calculation inside the brackets. V! @ d0 C, P& N% i
$ m6 k j' B) z* ~. G" {3 D7 ^
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
% H$ k" c+ b0 H% a# J9 O7 R. Q1 Q' E" x" j2 n- i7 @, }" b
Flags evaluate to 1 if set, 0 if clear.6 ~6 D! g4 r. @8 B1 m" }: A7 y
5 c( M* x- ~7 i5 _+ J) P+ M* N
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations." L! I8 h! X( o n4 ~
- W: J4 c5 w/ Y4 X, i! KExample conditions:
" H/ h4 w4 y3 R" D* \2 K# k8 V; W3 ?/ o" Q( q. w
Break only if register A is less than value at memory address $0005:
j, `) E7 Z7 G, }- V! J1 l, Q; }$ N# t& t
A < $0005
! X7 o r. E. Y+ |6 p6 ?. Y4 F) t z" |
Break only if the value at the indirect address is not equal to FF:
+ w( N( F2 E9 k' f
+ ?7 Y4 z a" H S5 }7 z# }#FF != $[$10+($11*#100)]
! o9 ~2 i+ @3 T8 t3 V% g5 F6 G& H4 S1 J) A* n+ H& y! ~5 s
Break only if flag N is clear or A is not equal to 00:
2 U* Z4 W" [ M0 k5 u* @7 f. j0 O% l% S! R. r6 d
(N==#0 || A!=#0)
3 U" s/ J, q/ B1 a Y; B4 _- l6 g6 L
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints): m) V' U' m5 u1 `' T; @* ~* h
8 p% F* i: t. V! {8 c: Z+ tT==#2
# W8 b# @( \) o* R$ y
* C9 ?( E% D+ Z; W' H2 f4 }以上内容来自fceux自带的帮助文档说明 |
|