签到天数: 2216 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
) w; x/ c: x2 g6 n5 O3 W; u" l! pConditional Breakpoints2 h: N0 C- J, P
) |; G0 S& S8 X; q& LBreakpoints 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:8 z D% F* n5 T1 B
7 v C a- E1 {" ~; f
Connect -> Compare { ('||' | '&&') Compare } & n, e; `7 L8 Y
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } 1 B0 R; c/ G [. w4 G" O" a# h
Sum -> Product { ('+' | '-') Product } 1 B& V' H0 f% U0 I/ W% g
Product -> Primitive { ('*' | '/') Primitive }
; c% p, x1 k: l) e# ]$ P+ VPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' # b7 {7 q. u3 C1 ~7 s, D. |
Number -> '#' [0123456789ABCDEF]*
& b% }( z5 |0 i. v- z1 {Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' ! D5 }# K, C3 f6 ?5 Y# c I
Register -> 'A' | 'X' | 'Y' | 'P' 2 }9 f8 Q; O+ s- y" Y
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
' B1 l$ U4 O% n' E* y) g5 B) q3 IPC Bank -> 'K'
: F V+ P* n" Q- [3 F NData Bank -> 'T'
. a4 R* o Q! J1 s' k
" I& c& E- w J: XThe 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.2 e3 g* T. l8 k3 @
1 z9 M, k U& |
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
! V! ^8 h/ z C, ~4 X t3 \. c
C4 q! N7 r* B( x2 S# TFlags evaluate to 1 if set, 0 if clear.
9 ~' H8 J r% D& c. n, N* E0 n: i2 f+ C& f
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.5 L& n( C. D2 ]3 l, {0 H5 e
4 S6 o9 v) ~5 K6 O0 X \9 `Example conditions:
\1 g1 y( q! K) G/ }. c" u- Q8 |1 m, Z$ `/ m
Break only if register A is less than value at memory address $0005:& F3 ?& k0 C! }+ ]0 V( J% V# L
6 [5 L. e& w6 P2 H
A < $0005& U3 \; V' ~* v( b7 ^" [
8 b0 F6 X7 B$ }' d u
Break only if the value at the indirect address is not equal to FF:
! S. W. W/ P1 }1 R& g# \: `9 G7 v% u5 F9 C, g
#FF != $[$10+($11*#100)]5 H* s9 ~: R1 e3 h, U' D
* h) n1 S6 [" m( q8 m* T
Break only if flag N is clear or A is not equal to 00:
7 n% K. t5 c# G1 p$ u& w
( @; L: C, t+ H# b7 S5 f(N==#0 || A!=#0)0 [' W" L: A& ]) O- U
* k; E1 y) y+ u, @4 y
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
5 L" R% ?, F1 c. p+ V/ X4 t& v, S0 G2 V$ @$ N1 t [
T==#2
5 B' ?$ S3 C9 B) w; ?. e* l
( h& p r* P6 j) ?4 h6 l以上内容来自fceux自带的帮助文档说明 |
|