签到天数: 2169 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
3 ^9 ^4 g. T5 h% y2 X# ?Conditional Breakpoints
0 Z) e _3 [6 A* \
( f0 `" B' r: W7 s! d% VBreakpoints 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:
9 W0 g9 N: ?/ k5 A6 [8 l1 k! A2 K2 _* c3 i8 F
Connect -> Compare { ('||' | '&&') Compare } 3 B1 ?6 u( B4 a9 Y6 @) W- s4 a
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } % J6 U( Z# i/ U" O0 l
Sum -> Product { ('+' | '-') Product } 8 d: T+ b; E: v; {, _% E
Product -> Primitive { ('*' | '/') Primitive } ; t* e2 D* c8 }. u
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
" T; p6 \" _9 I; L* o, ^: v/ I4 L- N% WNumber -> '#' [0123456789ABCDEF]* $ {/ I. N1 J) Q" n( U
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
9 k- g p8 s% URegister -> 'A' | 'X' | 'Y' | 'P' 0 J. }+ W0 \5 T
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
4 R3 Q! s% X, V$ I, q8 nPC Bank -> 'K' * o* @5 ?9 Q4 g3 x6 e# ~% S
Data Bank -> 'T'
% F* p* `% d) ^' R* a2 k3 V7 J4 H6 ?) C, j, T
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.* k) J6 ` w8 u
0 ?' g$ @: V6 \7 Y! lRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.9 u: q' P* e3 W2 y" B9 ?
) V E$ A/ w! ?
Flags evaluate to 1 if set, 0 if clear.
$ p# D" l; N+ N5 `& M3 e3 R9 I
$ q# j6 S9 }& I$ iConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
$ R, M9 i# H$ w, Z- m8 E3 ~
! E" n0 h2 h- m5 o$ n) ^% A; q7 RExample conditions:( F9 s: Q2 J8 S" e' \9 ^
% J9 P: R4 Z; X: L! }
Break only if register A is less than value at memory address $0005:
4 H- c* C# R d( t* E; G- n" @& [6 d; k! H
A < $00053 Q, A& w/ W6 o# t3 i
: z; `8 c! F8 {
Break only if the value at the indirect address is not equal to FF:; J( F6 i" e3 B* k, L
1 J+ ~) d, [2 Y2 z8 |6 Z4 J: l
#FF != $[$10+($11*#100)]
$ b! y* a6 t& h( U3 N! }* @7 k# V8 v+ }+ d! D
Break only if flag N is clear or A is not equal to 00:
}& ]( y S" B# I( S
! y1 c* e7 F7 B5 ^- x5 W(N==#0 || A!=#0)! W" d) x& {9 [4 ]4 y
. P" l4 Z& D. @. W0 h, U8 i
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):: l! S/ S, f' C; g
" Y& A0 |# u0 J* m: yT==#2
7 ~" [# \( Y4 j- {' H7 u$ Q6 V% Q$ m3 E( W. T# T! @# B# v; J
以上内容来自fceux自带的帮助文档说明 |
|