签到天数: 2020 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
& U3 P4 [- @1 z9 f( Z* DConditional Breakpoints4 q% m5 \" ]: e/ B0 q$ Q" N
0 t: z& {; t3 e8 H$ OBreakpoints 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 k2 Q3 C8 ~( _2 u
9 T+ f1 w& j. X; w. c7 G
Connect -> Compare { ('||' | '&&') Compare } ) i7 H' u9 e. C+ d3 T1 M' a
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
3 z4 @* q% u7 P9 e; ^# BSum -> Product { ('+' | '-') Product }
! l( T( Q y7 y* |9 }3 zProduct -> Primitive { ('*' | '/') Primitive } / a) ^+ I5 y# E5 v) k/ Q
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
5 O7 B0 [$ _0 `Number -> '#' [0123456789ABCDEF]*
1 Z% U, I4 G- L* o3 y9 uAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
8 Z& q1 j5 J; w. K7 L. F- TRegister -> 'A' | 'X' | 'Y' | 'P'
4 }( b1 M# X" DFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
9 G7 Y) c2 f# ]5 p1 i. O: \PC Bank -> 'K'
: m: T& N2 A& R& M; X2 V" [Data Bank -> 'T'
7 m1 k0 L. _2 F* ^
]' H: g$ M; L( 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.4 D/ R1 w2 | z* p; T' M% ]) O# S
; y& U8 M0 U; i, S) Z; lRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.4 Q1 m3 T" c* U, h; I! r7 f
! g1 E, q% w p: t% f! g1 P2 i
Flags evaluate to 1 if set, 0 if clear.' q9 M+ r$ E' O1 I% d0 P" n8 {
) C, p( |" @2 I- J5 i/ X4 {9 y
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
{, X7 O2 ]' v8 _! n
! ~5 O' J0 u6 ~- O$ Q. HExample conditions:. |: V" w) a# M* D4 D
& ?" _' f3 e0 `! s2 BBreak only if register A is less than value at memory address $0005:
' K* `+ U7 C3 q( M4 P% I* ]' J& S0 ]# n, Z! f7 U7 x% F% d4 i" W+ j8 j8 f
A < $0005
% e+ v7 i9 ]/ s7 M1 P* ?
4 a1 { W) w( s, TBreak only if the value at the indirect address is not equal to FF:
3 U1 k* G6 J& {7 v1 t5 E, j+ @+ @% ^
#FF != $[$10+($11*#100)]
+ u% H$ G# T, {4 j& H1 S5 ?% o% h5 }. I( u8 V
Break only if flag N is clear or A is not equal to 00:
$ d* R/ ^0 n9 b3 }9 T4 A, V4 g2 V' D. m. O; F) z& W: @, w/ X
(N==#0 || A!=#0)
( d0 I+ `' ^% m9 ]9 _( N' E. w6 t# z) {: x
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):1 Y/ D6 ~8 q! I) U7 r# I2 g
7 v+ W n# Y) x& lT==#2
* c; h {, Q" Y5 O
A: J" o6 ]" o" d1 l) X8 d以上内容来自fceux自带的帮助文档说明 |
|