签到天数: 1888 天 连续签到: 1 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
! z q) B$ _! @: K S4 tConditional Breakpoints
8 @* b9 q H" {; \+ K
& B* J, t* I9 N2 y1 K" 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:. W" W2 A2 a, i
5 T/ L1 s$ P: OConnect -> Compare { ('||' | '&&') Compare }
. _+ ^+ F4 _, S9 mCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
( B9 Q9 w0 W" E7 oSum -> Product { ('+' | '-') Product } $ }# R, r1 G8 y1 p) f4 p
Product -> Primitive { ('*' | '/') Primitive } 6 f" Q6 G$ r" K5 v
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' W8 |9 |/ Z/ ] W: R5 c' \: x- W
Number -> '#' [0123456789ABCDEF]* ! }, S- j ]' o% C# J: y; D3 ^
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
( j- Q- C K' cRegister -> 'A' | 'X' | 'Y' | 'P'
. C: J' ]; h ?; R% D- kFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
2 J; N. [9 w. }( F0 i. |9 hPC Bank -> 'K' ' C# i- _ T" x; e( t* i
Data Bank -> 'T' / P( F, J2 A. y! I6 z
' H6 }/ [- P. ?$ H1 p6 _0 |
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.
- ]6 u x3 O" q7 ]7 z" H
) h8 P/ V$ e, w- K! ^7 U' Q$ P; w' aRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.3 j! a' y! y: [5 l+ @" ~
' O' x; P# J4 y* [- b4 P
Flags evaluate to 1 if set, 0 if clear.# a* T! f/ {5 Z8 I% B0 \; @) l8 Z8 w
% t( {- K' h( M7 Y% ]& j+ \) U5 tConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.3 `7 {5 k0 H/ _4 e' q9 f) V
3 L" j e9 a' `3 |% K( ? tExample conditions:2 _# W/ w0 T, `: m; [
( q7 M/ ]* Q7 w* {4 `/ O3 \
Break only if register A is less than value at memory address $0005:6 F5 F3 }" U( T/ b% k8 g9 X- u
- Y- d; y) w: n) |& J1 A; k
A < $0005
2 q1 @, s, |' R7 ]) x0 r2 s. b* x4 d" J ^- w
Break only if the value at the indirect address is not equal to FF:. f. Z, ?( B% N1 a3 }
6 _ m0 u5 a/ R) h1 ^2 ~* @- j#FF != $[$10+($11*#100)]
" V9 _1 O$ ]% A6 C3 E, D
, D% V6 g7 j6 bBreak only if flag N is clear or A is not equal to 00:9 b M& Q9 W8 S
8 F8 ~% I* K; L7 U; G(N==#0 || A!=#0)
# H+ H- b6 [, i. ~/ @
$ H* j5 V2 n b( |/ c5 ]Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):5 i: {, q( x2 g
+ T1 R7 b" M) y) ?& LT==#2
. X+ L: [+ u6 W$ | c$ g; X
! ~. F) v1 W( a' x9 c7 B以上内容来自fceux自带的帮助文档说明 |
|