签到天数: 1951 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
% b7 y4 j4 C* t3 bConditional Breakpoints
, ]7 B Z1 o6 o: t9 a a Y% [0 C& F2 ~
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:. a2 \" s9 v. V- g" d6 X7 W
. @7 l0 ?, w: nConnect -> Compare { ('||' | '&&') Compare }
( O- G8 U- M# z5 F! CCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
) v9 S1 [( A4 G% A$ YSum -> Product { ('+' | '-') Product }
8 g3 y+ Q9 v) i: @0 b- C- yProduct -> Primitive { ('*' | '/') Primitive }
* U2 p" o3 @" k/ A5 [5 iPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
5 m( B; B, Z; [2 K* V' hNumber -> '#' [0123456789ABCDEF]*
" ~/ S3 d0 _' s J+ K& P) qAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
: M3 u5 U0 p3 o! n9 }8 W. P3 ?Register -> 'A' | 'X' | 'Y' | 'P'
1 @# x3 m j+ ?; XFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 6 K" N4 K# U. R9 ~. N* T" _. }
PC Bank -> 'K' " i7 x# [6 y9 s
Data Bank -> 'T'
$ I( d$ e5 L$ H2 X
# W2 \7 [6 B/ J3 b! IThe 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.
1 Z1 w- O( q& j( q- M( R/ o2 e6 B5 t* k4 L
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
# ?' L& c+ }* T2 Z3 j2 [; r, a) X+ a
Flags evaluate to 1 if set, 0 if clear.
- n1 U9 |# Z0 U9 M- N* d
5 _* W# v0 M3 p- UConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.) M8 O7 X1 C- l R3 V- E* q
/ M: b, T# J. a3 x& s/ {: p
Example conditions: i. ^) |( e3 k7 U
4 H& K; w2 w; F* _" o
Break only if register A is less than value at memory address $0005:& ]1 K8 ], t% y. V
$ ^) { `9 V ?- J8 A( _6 nA < $0005) a' A5 w6 ^9 @# M3 p8 B
* g- ~$ `% ^' O; P/ PBreak only if the value at the indirect address is not equal to FF:& R2 Z' q! }% R. _
8 P; C' M8 a, k; m5 S# X" z#FF != $[$10+($11*#100)]
; X! B1 W. O# ]6 A% o h- ~
# I' j+ z' r d/ LBreak only if flag N is clear or A is not equal to 00:: Z3 P! _- L- e( F$ ^! l
- b8 ~8 M- Z* Y, j0 r# o
(N==#0 || A!=#0)
& K' n+ V$ t$ H
1 ?/ }, n9 H& m- pBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):* P: Y8 |5 Y R2 H
( s9 Q+ O1 V( v2 ]9 Y' s1 eT==#2 ) t4 [' V H# Q8 F" P, z9 m( N, r
$ [) y5 H/ N8 q5 Y: f
以上内容来自fceux自带的帮助文档说明 |
|