签到天数: 1906 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
) j* e$ R" c4 b2 TConditional Breakpoints
; u7 D' H# k$ G& G5 l: h4 P/ ?
! N9 J1 t! y3 x4 ?4 g- r8 g* pBreakpoints 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:3 [' u: @4 W) x' Z
( u7 p$ N+ f+ \, wConnect -> Compare { ('||' | '&&') Compare }
" b1 e' T6 d8 w7 X' cCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
0 k/ Y$ P3 a! W5 Q( i8 v& q+ P8 X( CSum -> Product { ('+' | '-') Product } . B) g* ?5 L0 C% r& r' f3 R) j
Product -> Primitive { ('*' | '/') Primitive } $ Q/ Q2 F/ G! s' b
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' ' ?+ Z1 @; R+ O( @/ _
Number -> '#' [0123456789ABCDEF]*
~( m- W4 M3 O$ d v4 y) JAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
( s/ D, @4 j% `' \; O0 c" }Register -> 'A' | 'X' | 'Y' | 'P' 1 G) g& q }' n- f6 B! l9 x1 w
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
: ^: b/ u& x! q* y2 uPC Bank -> 'K' - o" @5 [! F5 U( }- n
Data Bank -> 'T' / H7 @6 h" F& ^2 A9 m
9 m1 o8 M: T1 d5 a7 PThe 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.1 y+ p$ N$ m$ o' ?: B
2 b$ _" u. n) V3 z! o9 W) F! gRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.+ E, A4 c' F; s8 ?
; H" O' {$ v, @2 e' d* G. C0 J4 mFlags evaluate to 1 if set, 0 if clear.4 s6 Z1 Z1 J* D; E5 _+ c4 \
1 N1 b r$ ~2 t, g" \2 U4 fConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.6 ^% s2 ]6 x0 K
- ?6 q. C% l7 O3 a9 \" j
Example conditions:
( D6 o( D5 I# g5 Y9 N/ k1 l* Q8 }3 J$ F. h8 E1 G" C; \1 r3 P. v
Break only if register A is less than value at memory address $0005:4 J- V4 [4 ~: y7 C
" t1 E0 ^3 E% A- t
A < $0005
1 v8 }& Y+ F8 Q' G5 q
, A# y; `- P, l) V+ R/ l* OBreak only if the value at the indirect address is not equal to FF:/ ]6 k! f& x. O5 w: Z# e. z
9 x" i* \, d' s* g4 y8 l#FF != $[$10+($11*#100)]
5 n+ R2 m: ~; v. ^
( g- _# s% o3 D0 o# I+ t" H9 VBreak only if flag N is clear or A is not equal to 00:+ J) M* K) |' p3 Q* s) }. j1 M( s3 e
6 }4 |) Z- ]6 j% s; E# |
(N==#0 || A!=#0)
2 h* F3 X& L9 z: }$ t, @0 l5 D' a0 C8 ~! `& d; O5 ~; s) Z0 f
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
1 e: R+ U% _& `0 G9 n2 q) F
6 p, E( Y! ?) g- b1 [T==#2 7 M c' C @" R, I! l) t( Q3 ?# P
% y2 ^% q; k( d. E3 Q0 w
以上内容来自fceux自带的帮助文档说明 |
|