签到天数: 2106 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点. F9 _- r* W. n
Conditional Breakpoints, ?% F+ S6 q0 |2 L; w" [
/ O0 R1 x: o4 {( n4 @( h8 x1 l# d
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:6 I* w3 ~6 P/ K& u, h, q8 w" p
* d! E& k8 q/ R! A* Y
Connect -> Compare { ('||' | '&&') Compare }
5 X! R& [" E8 I$ W; e, V: x2 I, lCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } " x2 h+ q2 {4 N
Sum -> Product { ('+' | '-') Product } 7 q( K! }' s2 C M3 n1 T
Product -> Primitive { ('*' | '/') Primitive }
5 s7 E$ P& V, e! e4 HPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
% {- H/ _/ Y" t; p7 \# aNumber -> '#' [0123456789ABCDEF]* " s ?+ x% f! U6 K, g1 U) q) y
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
' U# E. s) w; G/ w3 [) E- L, [2 `Register -> 'A' | 'X' | 'Y' | 'P'
) a% x% U' O; u: c# KFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 9 Z) D+ ?6 L) {
PC Bank -> 'K' 9 z3 B/ w& F; t. h) c7 e
Data Bank -> 'T' + m% E% @6 Y- m. V) S+ x
# f# {6 H1 o0 [. t! 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.) B4 C9 ~6 c) r4 _
0 m+ H5 Z9 n; O% lRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
0 W D5 l' ~5 n' E, M8 t) K) ~6 U* I0 Z; p& O
Flags evaluate to 1 if set, 0 if clear.+ _4 V; e; |& m0 q; I
% A( b% M; ]+ P: x5 l, E* j+ A
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
$ `. l9 G8 g& ^. ^0 i' u. n; Q1 j$ w( Q; y! }2 f
Example conditions:
( d0 r3 R1 Q" w: ]3 Y
( b$ a6 b1 I# ~5 t6 l% e9 sBreak only if register A is less than value at memory address $0005:7 V0 A2 G! t' _- q. K% {. J6 r0 S$ ^
# A% U6 Q0 x* T5 @A < $0005$ H" N) [" u/ L* V) `' x5 ?
' O T* t+ k1 O
Break only if the value at the indirect address is not equal to FF:
, d: `# J* k& h I* \: d- v [& D) k% J, r! u3 Z
#FF != $[$10+($11*#100)]9 `: P/ c, F( m; X7 ^& c' e
, e' f1 X5 k0 I
Break only if flag N is clear or A is not equal to 00:
: J9 P7 u, u/ v/ u1 j* S- F: @/ j- Q8 E9 E3 f! [& L. k! G) ^
(N==#0 || A!=#0)
; d4 l( t6 s" Z, F7 j* j' i @9 S: K) r3 X( D! [1 \! V! X D* d
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
. b% e; ~+ \7 o- q8 A; N- l
1 \, q/ X3 n/ bT==#2 / z1 J& h$ X3 X
" l% N! }5 @* X" |" q3 t
以上内容来自fceux自带的帮助文档说明 |
|