签到天数: 1910 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
! |' n6 O2 G8 j5 K# dConditional Breakpoints0 T: |7 S! |* U/ H& W. k4 x% C
$ X0 }9 ^! E$ Y: Y2 f8 z/ m7 c) K+ `
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:( h( ? L( m$ v* e/ y& W+ S
: o d$ w$ E6 N1 DConnect -> Compare { ('||' | '&&') Compare }
1 f F! g5 m- a$ jCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } * p9 F; j4 J3 {5 X/ ^3 |3 b
Sum -> Product { ('+' | '-') Product }
% h, [& b* h! C4 i8 t) [2 eProduct -> Primitive { ('*' | '/') Primitive } ; k1 |( Q) ?! X a! G
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
! X9 u) U: m5 _) Z& a( o; TNumber -> '#' [0123456789ABCDEF]* & _' e% U* Z2 K
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 8 u, s! x' J8 V/ d
Register -> 'A' | 'X' | 'Y' | 'P'
; Z* W2 P7 N5 W& z. P! JFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 3 [6 [/ |" z. ]0 w" C
PC Bank -> 'K'
/ _- s/ ?1 t: ?2 _! sData Bank -> 'T'
; ]0 [0 z* Q9 v8 V
7 g4 p- X$ ~% k) i% d7 _/ }+ DThe 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.! j2 l$ N( z; S/ W
, R9 N. Y. E' p) BRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
4 V* a5 ]/ P7 G' Y0 h9 i. c. r" r, i4 `
Flags evaluate to 1 if set, 0 if clear.% S: @7 p, K; v$ `1 p* S" J$ G
; R! W$ ^8 a! a' p; SConnecting operators || or && combine boolean terms. Parentheses dictate order of operations." W" ]) g1 t6 W. Y+ \8 w# h
+ s* F: z+ B' m6 iExample conditions:/ p2 }1 C6 w# J# ^4 U( O3 @
! r* a8 f( S9 zBreak only if register A is less than value at memory address $0005:- x% q ^# O3 P4 E
3 F4 D+ ~- M5 m- L8 E: H% Q
A < $0005) @" S' n/ J( n3 H0 ]' @5 ]0 f9 i' l
3 W9 w% V* H1 v% T# n4 R8 QBreak only if the value at the indirect address is not equal to FF:" j* Y- I$ i5 d0 t
7 n1 u: T" ~" E! Z% t: N% J#FF != $[$10+($11*#100)]
- M" f9 r; y9 \; u: E! v% i) Q& H4 {* @ _% i, A- [% ?% O
Break only if flag N is clear or A is not equal to 00:' {9 c5 J3 Z5 y3 h: W
$ H4 t% f G0 P
(N==#0 || A!=#0), k0 j' C e3 `' Z: p. M
/ z5 k* k3 E. o: m- \
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):5 C1 v I2 o! Q* v
% @- w& A9 _) h- U+ n7 j$ F | NT==#2 & X. g& l! x" j1 s: X$ l. x4 n3 O
; w0 p- l' \( ^" N' O0 h
以上内容来自fceux自带的帮助文档说明 |
|