签到天数: 1930 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
, g3 @* l& P& z0 r+ E! ~Conditional Breakpoints
$ w; c1 O' j8 z; D5 e3 Y+ _6 R* e1 d
. n* D. E: \8 v8 P2 n% N. V5 |. iBreakpoints 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:; |* Y5 g5 N2 N- r& g6 t8 l
' e2 \; @% y1 M$ w* [) j z, E
Connect -> Compare { ('||' | '&&') Compare } : w3 M7 X }# P" {8 c, b
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } 8 ] y5 w& t% L0 T
Sum -> Product { ('+' | '-') Product }
. z4 @/ h$ I$ M9 R/ sProduct -> Primitive { ('*' | '/') Primitive } 0 ]2 ^" `: u' `$ d
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' : ?& P0 C9 h2 h1 q" }+ b
Number -> '#' [0123456789ABCDEF]* ) z2 F8 Z: s: {6 g3 x+ F
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
1 s7 b/ z9 a- i4 _& ~, G" nRegister -> 'A' | 'X' | 'Y' | 'P'
% }3 u8 H. G, i0 C0 `. D! LFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' ! m! R+ j& z! q. m4 X
PC Bank -> 'K'
[7 F2 Y9 }# F+ P* M' E8 ?$ qData Bank -> 'T' 8 W. J5 o" m! H2 U
# }; g1 g3 I! ~9 {; C$ G& xThe 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.' T/ b$ m! }# U9 c; g, F1 O F1 ~# U
" @! f; T" ^! d& M' j f
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.7 N% U; T: X3 Q# _
1 u9 x# v% H! i H2 uFlags evaluate to 1 if set, 0 if clear.
& ^4 f. O; i1 O5 r k! ^+ ~& H' t& J) l4 K8 f
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
) P# u- s3 G. T/ N1 @2 U# n, n; S4 w) X5 j% L! R; Y
Example conditions:% p# X" L% H, m- }+ I6 r
. D) _' {* w8 J ?0 ^! w( xBreak only if register A is less than value at memory address $0005:4 j* v$ x. d) a* I5 F" y- s8 N7 Y( j
; ?$ p' g; S, _( o/ P. b3 G
A < $00057 W+ G& R9 }. e8 W" E; d
/ K1 @* {. ]2 T5 z' D/ a+ QBreak only if the value at the indirect address is not equal to FF:
; g1 Q! N- E) w! B% y) j- E, Q9 H8 a' h. M6 i! c
#FF != $[$10+($11*#100)]
9 b+ ]. _* h4 U* g0 E+ A$ p! k; h( E& {; K& c9 \/ `& K$ r- T/ [
Break only if flag N is clear or A is not equal to 00:! V, x& B( P7 G! _- }$ Q$ M6 i
% ^' n h' q, Y+ b" y(N==#0 || A!=#0)
% H h( `/ {5 z2 p
% p+ @2 u# E0 PBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints): D8 w, G- _2 X% a% |
9 l6 g( p0 {# z: x( ]- C& H$ x
T==#2 9 L$ l5 ]8 @6 G4 V+ }( e4 t0 Q
$ {! D( e0 ^0 p. e) q9 W* W
以上内容来自fceux自带的帮助文档说明 |
|