签到天数: 2190 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点7 U8 C4 r6 a6 C6 n' A: v) X
Conditional Breakpoints
* _3 _: a- P$ ~ A
( m, Q6 }/ b: W8 L/ O- QBreakpoints 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:
5 R% m$ ^: O" H
2 D$ f% s' s& x- O" ]Connect -> Compare { ('||' | '&&') Compare } / P. Z E# |6 ?
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } / Q1 R; Z, I& r# r W; H- k3 H' P0 i
Sum -> Product { ('+' | '-') Product }
' h- L( }; P8 C- `- N f2 M2 LProduct -> Primitive { ('*' | '/') Primitive }
& i \' P5 @. r+ F- U6 ~1 R/ Z2 k- MPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 1 e& X% X8 j p5 f, I+ K- Q
Number -> '#' [0123456789ABCDEF]* & E$ i q7 Z( H3 K4 Y
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
. k2 D2 o# Q7 w; _* ?- { pRegister -> 'A' | 'X' | 'Y' | 'P'
6 G/ D- J- ?) A8 AFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
' s+ Q* Z' k" _) ]* uPC Bank -> 'K'
& B$ e! j* I/ D* _Data Bank -> 'T' 1 [6 T! c# g5 Q* p% {
2 x( _$ l- T1 a7 ~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.
' O/ ?# [3 C% O: |& j1 U2 Y# c6 ]! k0 W8 {! }& c
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
% N1 a6 G; h8 I8 r& _) h- W ~% q( D' @6 z1 v2 k
Flags evaluate to 1 if set, 0 if clear.
9 V a6 y' Y. F4 i X8 ^" X6 h [. r" W: {: }; y" f' m4 ?. T
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.# G) E3 i, R1 M! [
1 s( T& C8 h' |Example conditions:& P3 N9 r3 D4 l% U6 E
- n3 _' A( L$ f" d* \4 a
Break only if register A is less than value at memory address $0005:, A, F! U# f o
l3 y* Q5 b- C n, N4 pA < $0005
( n& q, [# M4 E- R @8 V% U' L; |6 F1 |
Break only if the value at the indirect address is not equal to FF:
% g. Z6 W% ]# l' s+ K6 ]5 O! w& e- y- y8 }; f$ z# D
#FF != $[$10+($11*#100)]) L* E* ?) ^( x7 `$ l) b
: I1 \8 G7 c' W
Break only if flag N is clear or A is not equal to 00:; @7 v5 w/ D# G
; P8 h( o! g& ?, @0 T3 C(N==#0 || A!=#0)3 q h" k$ o' U$ r m: A
$ C( S: i, A; c) i0 j
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
0 g+ ?- i: q6 o9 _# e7 I; J' A7 |/ L" S& V2 O' y3 [/ M, _
T==#2 5 J2 }8 g! n; d
2 l2 s3 d' C4 s- t
以上内容来自fceux自带的帮助文档说明 |
|