签到天数: 1773 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
' Y s3 V0 p- N" p! s( qConditional Breakpoints9 {9 C, {+ a& t% p
. L! B1 x/ r F* ~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: a7 G2 L( G9 p6 r
+ q9 j4 {- o/ u7 x+ R
Connect -> Compare { ('||' | '&&') Compare } 8 c: `. ~7 w, O+ W
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } & t6 Q+ a! H# s; `
Sum -> Product { ('+' | '-') Product } 9 V6 t" n" v$ H$ w$ ~" a' x3 B
Product -> Primitive { ('*' | '/') Primitive } $ O5 ^! M9 \9 m u" g6 U! |5 K! F
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
7 r# g$ S) g `/ H8 _3 P$ PNumber -> '#' [0123456789ABCDEF]*
( P1 ^) `; V) E6 B' c) h' zAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' ; |3 `, \( c2 D# @8 ^: u
Register -> 'A' | 'X' | 'Y' | 'P' 4 P6 f5 m# l$ u$ k) d; ^
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 3 [1 u4 `: P% S# X+ J' S8 `
PC Bank -> 'K'
& P- ^# y7 r; x0 vData Bank -> 'T'
; p; l+ h8 [6 B7 G1 Q4 p3 |8 {, g) p4 |. v
The 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.: u5 J1 H4 H0 i2 N% N. h+ W% D
- V) N4 R* o! QRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
" p6 s b: X- Z' o
' c; v; x# \" c' RFlags evaluate to 1 if set, 0 if clear.! T. X- c* ~( s: H
. R% `7 P3 {7 p2 vConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
# s% ?1 X" k9 g! \2 T
0 S. ]9 f/ d! a" E, zExample conditions:# ~- V: z! s( P
$ G+ H, C3 H4 l2 TBreak only if register A is less than value at memory address $0005:
6 i# X9 w/ D, J1 G5 i9 m0 k9 P2 B9 N
A < $0005! k g0 I( T5 L
$ b, U( R4 J6 x" c5 X" mBreak only if the value at the indirect address is not equal to FF:
* S! T) Q+ {+ d1 F' _
3 D0 Q% N" f- x7 H+ J$ f7 k4 U#FF != $[$10+($11*#100)]1 }3 ^1 D, |: s/ w$ o: T
4 ^5 U& ]% Z0 K, H+ r( Y
Break only if flag N is clear or A is not equal to 00:
5 t9 [6 q$ @: U+ p' Z6 k2 H3 _( d! k C1 S
(N==#0 || A!=#0)0 s; \' R s. L' Z; J
6 \) C" a% _$ _: s* M# W0 s$ V) q
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):; W" ~* n" w3 ]0 ^* T0 ]( s
$ e( S2 J9 i: X* ^& oT==#2
) t5 N) [. U. {( a' G
2 S' D4 ^. J. P) x9 A以上内容来自fceux自带的帮助文档说明 |
|