签到天数: 1900 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
. d9 ?" f2 f. @" ?Conditional Breakpoints Q9 u U/ u' D7 i+ }- I7 G! W& K
) g+ |/ I7 X; y# P, |5 W4 T4 S" S
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:
9 ^% ?8 L! W) q: f/ ^- v! f5 \5 S2 |
' k3 s$ F$ ]7 QConnect -> Compare { ('||' | '&&') Compare } - h0 D) u* O4 J( V
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } # E$ i7 L2 j& t
Sum -> Product { ('+' | '-') Product }
+ w; l& e+ J! ~7 ?Product -> Primitive { ('*' | '/') Primitive }
2 r& X! F5 Y- OPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
) A6 b3 q- W, oNumber -> '#' [0123456789ABCDEF]*
3 G C5 D: Y- d4 xAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
5 w9 P0 w. E; T" v2 ~4 G7 BRegister -> 'A' | 'X' | 'Y' | 'P'
; p5 ]3 ?7 b$ U p1 p6 o& o8 ZFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 2 P0 y( [: A+ ]- ^
PC Bank -> 'K' ' g3 H: Y* }5 K" t9 I
Data Bank -> 'T'
2 ]& \' d4 ~+ c2 k
! @4 W3 W0 S( F/ l+ IThe 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.
/ [& o8 W" Q% j& R4 b- F* z
+ F @4 G" n6 F$ \Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
* D, c( U7 _* d( x. r# ~1 e( L4 r2 _- ?7 O+ X
Flags evaluate to 1 if set, 0 if clear.
1 U' p0 K" `7 ?# y; R; x) N( ?
! d! A' X0 g* DConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
2 n0 P/ W7 a! J4 @9 |6 K' g' a( ~
. [ o8 s. M- a$ q8 a& LExample conditions:
' P4 x: ?, h8 L. |5 p5 S: b' g+ K8 c4 d7 [& U. y
Break only if register A is less than value at memory address $0005:
/ n/ Q! u- V f2 U) }8 y9 ^2 ~* a1 O
A < $0005
9 }( D& d4 A: x3 D" E/ x) t1 S$ t, E Q1 w" B
Break only if the value at the indirect address is not equal to FF:
% z: g+ P0 p1 ~, A7 _
0 G8 u8 S# \7 n3 |9 w#FF != $[$10+($11*#100)]% ^5 |& B8 v$ e
4 ^$ k' ^/ X- J4 t. C, V! x
Break only if flag N is clear or A is not equal to 00:
0 D+ s7 K$ K( c+ b9 q
8 \+ {' I/ A5 {- [(N==#0 || A!=#0), k& q" N/ `! V$ T
6 D7 J# A+ b. @Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
+ S5 G' V2 F% C7 M% |& s) H
4 H5 o. }. t; f- iT==#2
6 b- O4 ^0 R0 P$ B% M- _, ~* [' ?( y
以上内容来自fceux自带的帮助文档说明 |
|