签到天数: 1950 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
2 q2 C8 c9 m2 [* jConditional Breakpoints9 o9 s' Z8 k% B S' n
* r+ u* b1 X/ `9 X! ]6 WBreakpoints 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 F5 l5 Z1 B! F% L9 [" |
, \1 g* }' s5 ~Connect -> Compare { ('||' | '&&') Compare } * ?" ?# z# _/ {' x/ f
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } 9 t3 Y/ k9 t/ W7 c+ {: W9 M# C
Sum -> Product { ('+' | '-') Product }
% {/ L( s3 J6 C! E) FProduct -> Primitive { ('*' | '/') Primitive } 7 U" m/ M; F; f
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
% i. N; _) u" z& p1 S1 Z: O& HNumber -> '#' [0123456789ABCDEF]*
/ G: H0 s; |: v1 YAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 7 y5 p Z9 d4 Z" P0 F
Register -> 'A' | 'X' | 'Y' | 'P'
1 e9 d& g9 }' @) r6 T9 XFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 4 D1 K- G2 S# m/ J# B! H
PC Bank -> 'K' ' E! E$ I; X& O4 v# |* \
Data Bank -> 'T'
) ?. g8 G4 s3 B' C" {' ~2 t
* A% m1 i& K9 S: _" WThe 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.' H2 G0 d, ]) V7 j) U$ }5 d! i
* U2 t) v+ t4 y' {# b6 p
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
# q. ] a/ d; w6 ?
! W* A. i/ \( ^ Y6 XFlags evaluate to 1 if set, 0 if clear.# i: x. X6 q/ w# ?
5 b( |+ c X1 {Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
$ A, t. O1 `; n P. t4 n5 }+ h, q4 `8 o% j9 S+ X# P" n" O
Example conditions:. k: l& O, S0 f4 z/ O& w: J+ ~9 F$ S
) Q' y5 E: [8 Y4 g0 UBreak only if register A is less than value at memory address $0005:4 \7 ]- I2 ^2 o, ^ l% I( d% d
) H9 V+ k* C8 Z0 f7 x0 ~
A < $00056 {. T: x9 r4 }% F& ~
8 C! d- c1 x8 I' nBreak only if the value at the indirect address is not equal to FF:
! v# u4 ]9 U5 F W' g9 X( A1 U# O) g! W/ C# E
#FF != $[$10+($11*#100)]( |" p9 p1 H+ J0 l
+ y4 O$ r: a9 \9 {( \( j% Q
Break only if flag N is clear or A is not equal to 00:2 p7 ?& F* |# M0 H
! W2 a3 X$ s' D0 y( r0 D. D8 Y
(N==#0 || A!=#0)
2 ]. L+ B# m* v! D) O) E- n% j( P$ e7 ^8 Z
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
2 e2 g" }$ x' E# B+ \! O1 b v( j, M+ b* ^: \
T==#2
/ v8 f% J5 E; ]$ l& s0 d" T. C4 \! `. S$ X, |7 p
以上内容来自fceux自带的帮助文档说明 |
|