签到天数: 2179 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
% [% |0 B8 ?, H1 F. ZConditional Breakpoints- y/ T. ? P8 u5 a
4 u5 J7 u* K; g; ~/ x
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:) ^$ @7 e o* f6 X4 X0 v$ ^
/ G# Z+ C4 r& l' yConnect -> Compare { ('||' | '&&') Compare }
& G( r# c& z8 c6 E' wCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } , h3 X, X9 X% i% i! M* _0 ~; q
Sum -> Product { ('+' | '-') Product }
s; [ b) S3 ~/ b" qProduct -> Primitive { ('*' | '/') Primitive } 1 ?4 D* R" s2 _$ @6 j+ b0 u; r2 k
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' * A8 E5 J) n( ]+ @3 @$ t6 C
Number -> '#' [0123456789ABCDEF]*
1 c) K) ^+ y' o& |8 b% m: |- b) o% ^$ xAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 1 M5 u9 _1 b2 ^% K. y
Register -> 'A' | 'X' | 'Y' | 'P' ' t; D/ u+ d* S! o, B/ w
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 8 s7 X! M' N8 F
PC Bank -> 'K'
( V, x0 m1 Z# p( _! A6 ZData Bank -> 'T'
- p% N; k6 c! |! t2 N4 b, b: l& w( c" J5 j) R
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.
" Q) J; B2 K9 J, E- c% x
$ B |6 B* b$ v: H. T5 n/ [" U" URegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.7 Q- ~1 X0 t9 O
4 B0 v# C5 ^) x7 z8 Z! fFlags evaluate to 1 if set, 0 if clear.- r2 n) J' a0 `3 ]5 j% w7 I2 j
& R' K- Q* ]& NConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
8 `) O' X; c6 f
' d% {' J# T8 }# h! p5 sExample conditions:
( Q1 }- p3 D! F4 \1 g, f, I% z/ D% l$ n" p9 i& K% X' p
Break only if register A is less than value at memory address $0005:1 z/ P) k! x* n$ ~( V
6 j+ |7 o0 J. h7 MA < $0005+ `" G% r( `; `: a% I; N
& d. D% X- l. g3 w+ aBreak only if the value at the indirect address is not equal to FF:
! j- M9 u/ o, j2 V6 C
+ W% \! m& r5 ?0 H8 p& `2 v1 l% Y7 K#FF != $[$10+($11*#100)]5 v/ a; ~/ t* D/ f
$ J# F( z( i, j9 I _( T
Break only if flag N is clear or A is not equal to 00:% C% j2 X( A: g8 ?: d
. ]2 k9 D Z |(N==#0 || A!=#0)2 g( X5 b/ w. R9 t, E& Y
1 c$ ^( v0 K( i- v0 O1 |9 |: K: aBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
* s! G/ G0 G4 d; O. B
* a# K5 r5 t% ?: h, O' gT==#2
; I' k# w5 |9 z9 t# }7 m6 f! ^2 {! R: P1 f! {' t( r* O. A+ `
以上内容来自fceux自带的帮助文档说明 |
|