签到天数: 1999 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
: _0 H4 s# i3 A& A& g" V% p6 _6 ?2 xConditional Breakpoints& t7 q- K! q- }) P; _9 A0 p u& C" k4 k
5 N H f' W( o: U0 [
Breakpoints 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:+ U3 w6 A* C) i5 L" N
8 I0 \$ J" F6 R. i; C2 k. o" E; O0 u
Connect -> Compare { ('||' | '&&') Compare } : i2 |3 x9 K$ R2 g* {) s
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } F% F; K) Z/ d) P [$ s( m1 z% T
Sum -> Product { ('+' | '-') Product } 9 M: N+ _1 }( ^3 k
Product -> Primitive { ('*' | '/') Primitive }
8 j* J/ F" ? w; g. ~! ~Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' / \; \, o7 p' w, [! k7 k' V* [* D
Number -> '#' [0123456789ABCDEF]*
0 {& Q! H/ V3 r' ` `Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
: U" ^' N+ E4 [# C, r! `4 m: J( w5 nRegister -> 'A' | 'X' | 'Y' | 'P' . g" m9 Z$ Y; x" t7 ]( p" ~, F0 }
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
1 ^- L$ O+ [1 g5 fPC Bank -> 'K' A/ `0 R% J8 o
Data Bank -> 'T'
2 Q% L9 U1 L6 B
4 q# K- |' h/ ]% kThe 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.# z" M' ~: j/ } B: L1 `
/ ^- q' A) ]5 G" w! h. _# _- B
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.0 `9 U1 P6 @. X7 F4 ? ?
]2 p! V% Q1 t$ w% G" u1 [3 d
Flags evaluate to 1 if set, 0 if clear.
9 k: S2 K6 v' Z; }7 F- A8 M1 }( y8 c( a0 L3 X+ M0 H
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.; h+ f& j2 `) Q: m* ~2 I
. Q }$ v" R8 K, e; u) E2 n3 rExample conditions:3 F& O, V8 O( [$ l5 A9 @
& G, x0 E( ^9 f9 d5 V+ c
Break only if register A is less than value at memory address $0005:- @1 |8 l. M3 m* U% {- \1 ?
; ?5 ^) E' `- TA < $0005
" Z' V4 N* \5 ]7 n3 |8 y
: g1 Q$ J% {* t& B0 lBreak only if the value at the indirect address is not equal to FF:
. q2 I2 u5 X! N- T+ p
5 u/ {7 W" _( x2 \( k$ N9 C$ W#FF != $[$10+($11*#100)]( ^5 o/ g. y4 I$ H) v! _8 M$ l
$ Q0 t C% W( k1 e {; T0 bBreak only if flag N is clear or A is not equal to 00:! ?0 J3 [3 j, E+ ?! k: Q" `8 c7 K# Z
. U, k/ G) L' Q* R( c. ]: C/ K% \
(N==#0 || A!=#0)
$ W$ D B4 ?' K& s& s
; l; o: P4 U. [0 Q( H6 |Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
+ W! J# U R& K- K7 t* w
- C; x) G( c1 {0 X( TT==#2 * m# n" k4 }" C2 F: e1 t. t
9 h4 S2 x. V& B! h$ C
以上内容来自fceux自带的帮助文档说明 |
|