签到天数: 2157 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点0 E) C# ~' t! l0 j
Conditional Breakpoints
7 d& H& `' H: @
7 {) [: F7 f4 M' 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:: i2 ]: r' p: U
9 A- }, g0 o* S
Connect -> Compare { ('||' | '&&') Compare } ; i8 g4 V* {! V/ e5 D2 c1 b9 q
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } . j+ d3 U5 o6 U7 f( d2 w6 I/ E
Sum -> Product { ('+' | '-') Product } H. @; {3 _( V: d1 Y* ]
Product -> Primitive { ('*' | '/') Primitive }
" v4 e1 D8 t( i1 [$ Q; l P: @2 `3 oPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 4 P$ `1 E e$ p8 P4 u3 Z! T, A4 I
Number -> '#' [0123456789ABCDEF]*
1 z) N( u! e5 Z% ^& U X* P' kAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' . @4 a9 W* F+ O! r8 B
Register -> 'A' | 'X' | 'Y' | 'P'
' p! f9 X/ ]' S. c: G: `3 h. qFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' X2 O1 K8 x& j+ i+ a! I
PC Bank -> 'K' * I+ C' }6 m0 W- ?$ w$ m6 L' O
Data Bank -> 'T'
! v) `3 _: R) y7 z6 K
: T6 T+ J' E& L* ^0 g2 k8 eThe 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.
/ }2 I$ p' s4 h8 G
2 O# ^" o, F# \3 YRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.+ Q) Z- n# c6 |& v/ x+ {$ z
8 }8 X4 V" M6 o1 y* c$ jFlags evaluate to 1 if set, 0 if clear.+ E5 A$ {7 |$ I3 k+ o9 e
! a) G) `" q8 v5 n4 kConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
; N$ F3 f2 D" [0 W: f; S& H' q( z j; Y3 H3 f8 y# T
Example conditions:6 g4 S- F& X0 K- U
) d5 T* |5 O( O3 f" ~+ UBreak only if register A is less than value at memory address $0005:( M1 }* x" \( m' T& u Q
+ D) l9 w, v: J* oA < $0005
8 y5 Q. _7 R7 y/ J. |5 a) H4 T. o, l9 }# E3 F
Break only if the value at the indirect address is not equal to FF:
. J5 R$ j% m# G- w/ W4 L4 e
1 F7 Z; I8 l1 p4 @+ L#FF != $[$10+($11*#100)]
6 [& O) e5 Y; K+ b" h- W* ^
8 a4 f }9 L7 H- M! o4 a8 u8 UBreak only if flag N is clear or A is not equal to 00:
M8 E" }" Q' b0 e9 q3 x
) s9 f! C: r" `(N==#0 || A!=#0)
1 B P/ e" c& f' ~9 J
( k6 _; T6 ?% {3 |& t( i: QBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
! C7 K0 k) K1 O" q# P, z) u3 \( C( U/ n. \' Q
T==#2 0 c, @: s$ Z4 J! f) l2 Q# b# p
* v. ^! a ?+ |. `( q; K
以上内容来自fceux自带的帮助文档说明 |
|