签到天数: 2213 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点: P& h& [( P/ c! X- _- O; d4 v% F
Conditional Breakpoints, j" Y- S( L! W, ?) G# n
- W& x6 p9 T7 i
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:' W' \/ A# l6 \( k. d& `: `
: w4 d a2 K$ x. h
Connect -> Compare { ('||' | '&&') Compare } 2 @" `1 \$ h+ ]5 q3 K2 E# k0 `+ J
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
& W2 k5 A5 j" |6 _+ ~Sum -> Product { ('+' | '-') Product }
2 ^- O! {- _7 o$ u! P& g, s+ nProduct -> Primitive { ('*' | '/') Primitive } % y, W i0 r3 B# k( T
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' b z* ?0 U! ?+ }, w- {
Number -> '#' [0123456789ABCDEF]* / i3 E" p9 w1 B7 [" n0 f; y+ ~
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
8 m- o; g0 B+ a; G, Z6 ORegister -> 'A' | 'X' | 'Y' | 'P' . g) g' t5 S- x% q# W& M6 b
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
F& q6 X8 L, m: D2 S. r( kPC Bank -> 'K'
" F# |0 Z/ f1 E5 N+ i, YData Bank -> 'T' * Z) F$ s# z% ~# s/ g6 O! P/ j
+ h; O2 t/ g! v! ~8 jThe 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.8 O B3 k! b0 _( R
1 r: S4 w% k. ]: i8 [- A1 H
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.- F/ n+ ]* D$ C3 C {
! R3 }; g( _* ^: G8 M/ lFlags evaluate to 1 if set, 0 if clear.
. M8 O/ B5 r' V9 w! h8 }# p d/ R1 L% K/ _; x$ @$ M4 {
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.' Q1 G9 ?; u* S, R( B, w5 K7 i
2 p! L; u+ L( a6 X$ b
Example conditions:+ b- n, k j" i4 ~
- S6 X) `! K- P2 B/ B1 O4 v6 x1 i
Break only if register A is less than value at memory address $0005:
) C7 L. L+ l' _: H; E; @- R$ V% K. E3 A% u$ _, D
A < $0005" Q7 a' X! y% O$ C. Y" q3 t
# p" ~, m3 e$ b3 v- Q- ~
Break only if the value at the indirect address is not equal to FF:: p+ A& j- y7 H5 |" ]! ?% e
) F: m$ K- ~$ I+ w* c
#FF != $[$10+($11*#100)]
, r7 `; Z8 C- ?! S) h
4 v% N. _3 w& J5 lBreak only if flag N is clear or A is not equal to 00:
! N6 ~+ [: n( w$ E! c) T" M( \
: Q8 X% A( u3 e) N, C4 H- ](N==#0 || A!=#0), l6 L) Y1 P( k% O: E3 P( P) R, @
0 M& _5 L6 P% _4 tBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):7 [( N) S2 Y- X
0 c2 d6 Q$ L4 F: J3 ?% kT==#2
# i c( ~( `; p% G" F$ h& T3 G) |% Z3 X- ^: D0 u" {8 b
以上内容来自fceux自带的帮助文档说明 |
|