签到天数: 1964 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
. v4 e0 t; S7 |, fConditional Breakpoints
& c4 Y; x7 M0 l. M" W, Z# g3 v* G, l! B u- 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:
+ a J( A7 B' A5 s% z! R1 g, W9 g
9 b. d5 p m, OConnect -> Compare { ('||' | '&&') Compare }
0 ]9 V9 x+ B+ c" L- qCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } 8 I# ]8 g% R. \
Sum -> Product { ('+' | '-') Product }
! i" e# s% N# z* aProduct -> Primitive { ('*' | '/') Primitive } 8 a7 T) L, C$ r" L0 \; t
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' : o c$ ?! ~4 M0 c' \ \
Number -> '#' [0123456789ABCDEF]*
. W! y+ R1 s4 S/ |. |0 mAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
( l" C( e* z, r% \Register -> 'A' | 'X' | 'Y' | 'P'
; R/ ~# u' v1 Z1 EFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
. A1 F8 T' @& F- t0 E% LPC Bank -> 'K'
& L) r# w% H3 DData Bank -> 'T'
6 S2 v* s) h" m3 U/ @* m! P! z( p8 L( U0 m6 b3 t$ W) i
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.9 A, t3 y4 {6 `, ^9 i, t: d
4 J9 x2 [0 {$ [- F
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.2 r. A, }' c: }5 Z' q
% ~2 A) F9 q4 [& K4 B2 O- a
Flags evaluate to 1 if set, 0 if clear.: S) k: f+ v. e# _! J7 c
- W$ l/ N3 b b' B2 f6 Q8 s
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations./ C! j' d: }* ~
0 G+ R' e" g0 o5 R+ d6 y* dExample conditions:' s6 i r% K1 A c
8 T: \4 Q5 \8 t2 p, CBreak only if register A is less than value at memory address $0005:
- N5 A$ T5 e: J$ p: w. C: W- r$ U' ]' I( a$ `0 R+ m
A < $00059 U; x6 E. b5 R4 c, D, f5 ?! r
0 q) L- S) j$ ^9 k9 S! ]" Z, N, h
Break only if the value at the indirect address is not equal to FF:7 k- _/ X w9 j; P, o
) o0 z5 }) ?3 i4 N4 p
#FF != $[$10+($11*#100)]
& e8 j( [ p0 x# h' `8 Y9 G5 t( l0 Z. T! h
Break only if flag N is clear or A is not equal to 00:+ }- G- b' T0 v# ]7 V- Z$ j2 ?
: p0 W2 h8 V6 V$ j(N==#0 || A!=#0)
1 ~% }5 M% Z \5 J ~# l/ S3 X
6 C' w- B' ?0 ^. X+ \2 f2 t. ]Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):& ?# G% `: ?( R) |+ k, Y1 @1 j2 X
6 l9 U6 z O8 n; p9 t1 MT==#2 . L! Y8 G/ j7 f: b
* W5 x- A+ h+ p' Z. a以上内容来自fceux自带的帮助文档说明 |
|