签到天数: 2131 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点( {0 G$ _" `9 v+ R7 A) x' ^: x
Conditional Breakpoints
! i4 n+ G. O v4 C! E* r
5 D4 a+ a+ d$ Q: E5 EBreakpoints 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: P) Y. {" V+ z# C' P
l. r! ~* {6 e1 L8 W8 R# AConnect -> Compare { ('||' | '&&') Compare }
4 V7 r" K5 B" V' m; N$ b" C. cCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
: L! x" H) Y, T# P0 gSum -> Product { ('+' | '-') Product } \) i* Z8 D1 m: j+ A9 l. ?
Product -> Primitive { ('*' | '/') Primitive } / o$ i% [1 q4 C
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 7 {# K: ^7 R% o( e) Y! m* {$ b+ ?
Number -> '#' [0123456789ABCDEF]*
1 _) b! \' C% }4 r7 EAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
0 @/ l1 H0 `- F7 q1 B0 v \5 dRegister -> 'A' | 'X' | 'Y' | 'P'
! D9 p; x; Q# i6 pFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
& f2 \+ h7 J, Z1 q/ NPC Bank -> 'K'
6 y+ V8 ]$ H$ g0 Z+ a3 y( pData Bank -> 'T' , Z% g: V2 `7 ]) v3 H p' h
- r& x& X8 ]. ?. D8 i2 B# M5 vThe 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.
4 C7 w+ k/ @( S* v- N9 F7 l5 s8 S, S+ _. A& I6 O
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
r# [+ p2 O- F
# F* {, i1 E/ LFlags evaluate to 1 if set, 0 if clear.3 ^5 ]( }) o) S4 e% B5 n
1 R& z+ Z3 C& k8 x4 U) vConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.. j' |# U; e* d: ~
I9 k8 m5 g9 E( V) O* @, d
Example conditions:
" Y- C0 T% O# E( j& b( C$ N) l, k5 i- n0 _4 ^+ [: k
Break only if register A is less than value at memory address $0005:% }, F- z3 r; w# ~. h* U
7 J$ E7 j( E( B+ I( d
A < $0005
1 ?. a$ @( [: s+ W, X0 `- i7 M: B+ z+ C6 s; |& t* D% U) f; `
Break only if the value at the indirect address is not equal to FF:
' ~& f8 ^2 s3 {1 r9 j+ `! D7 \9 J; t" g" i/ b
#FF != $[$10+($11*#100)]
% ~/ r: |4 h* w2 `; e! }: V; c( V8 w( W
Break only if flag N is clear or A is not equal to 00:
2 w1 T a, r) Y9 _ D" t; q* S
" T& S! a9 _+ G& l/ h% J4 [(N==#0 || A!=#0)
9 Q2 F( U$ `; a1 f4 ~ @! I
% R7 n/ y5 s5 rBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
( U) a7 u) D. n! p9 Z
1 V O# ?! T1 y* p0 xT==#2
7 ?2 h. ?1 e) \8 o7 r5 }: P* O% P3 e* n% ~
以上内容来自fceux自带的帮助文档说明 |
|