签到天数: 1903 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点0 w: R H# r& I3 s( P
Conditional Breakpoints: ~' N0 Z( J' \9 H; U
) y, q! s/ C+ IBreakpoints 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:
: x+ e1 D* W/ N" @/ e& N
$ E, E: B- i% M2 v( O2 g. ^/ AConnect -> Compare { ('||' | '&&') Compare }
0 c0 L7 m/ O$ XCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } ( ]6 {; p q# j% _- @
Sum -> Product { ('+' | '-') Product }
; e7 v$ C6 l2 P: aProduct -> Primitive { ('*' | '/') Primitive }
' ^" F, X$ r) A8 E! d8 \+ XPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' / A8 V& i, x' j7 q9 Z
Number -> '#' [0123456789ABCDEF]*
; h/ f% e: F' cAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
) g H! ~. J: T( uRegister -> 'A' | 'X' | 'Y' | 'P'
4 }( ^* l- @" E& y: y0 `Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 1 {+ g/ x% ?# G
PC Bank -> 'K' 5 W, d/ l( F9 f, ^9 P
Data Bank -> 'T'
0 }/ I9 z0 R5 ~! _ v
( f8 r ?! S) uThe 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.3 t0 H7 P& p }
6 }0 d9 w p1 D5 ~- nRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
* x' R8 l* u! h9 ^4 {) P9 \2 P- |2 p7 O6 V# G1 U: i1 @4 s8 z
Flags evaluate to 1 if set, 0 if clear.
5 Q9 x$ w4 q5 i! `% k! F; N$ Z9 @4 h
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.1 M7 i9 M/ S' H* `
) e5 A2 V& q& a8 H y5 v5 o# @+ \- R
Example conditions:& Q( X3 P8 b+ Y
+ z* y& V0 {8 x' |8 o
Break only if register A is less than value at memory address $0005:
) V3 B5 O) s. t) }$ Z) ]% l) s' l% l( t4 D/ y
A < $0005
: L4 z$ m* R& A' N: t$ B
: H' w. M( Z3 H3 a2 n$ k3 [! _Break only if the value at the indirect address is not equal to FF:6 G! u, V! b; F2 r
+ o3 u, N/ A& i: Q
#FF != $[$10+($11*#100)]+ Z8 q3 g% m$ `: }' C( Q) X9 }8 ]
5 f6 a, X4 j. T+ X. |
Break only if flag N is clear or A is not equal to 00:
' G# E6 l0 w( V5 {0 f7 N) m- |/ N& A+ }, v9 Z8 D
(N==#0 || A!=#0)
' w0 y! ~0 W; m Z. @" ^# P
( G) a! W" g2 IBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):6 [1 j# g7 p/ i
3 N, ?% x. J/ T9 F7 B' qT==#2
/ B3 W T1 A( w3 r/ p7 g6 _. z/ T& U% K. M
以上内容来自fceux自带的帮助文档说明 |
|