签到天数: 2161 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点6 \( K2 a- [- _& ]! L: E
Conditional Breakpoints
& [2 J: D! D% }9 E% e8 y; D2 Z% g9 e5 \5 W+ ^# F
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:- ~, p% l+ X. S0 u% F
$ T/ F# B/ D; M' JConnect -> Compare { ('||' | '&&') Compare }
; F2 h/ e9 T: Q3 R& ^, cCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
3 c2 H% \/ ]/ p" Q. uSum -> Product { ('+' | '-') Product } & `+ s g6 `( X! Y, C
Product -> Primitive { ('*' | '/') Primitive } 4 _8 X* E9 H3 X! e+ G
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
& a; |, {- K+ M3 dNumber -> '#' [0123456789ABCDEF]* 5 Q& u/ w: p+ B
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
6 [1 D% ~# Z9 j. [! M3 a: }Register -> 'A' | 'X' | 'Y' | 'P'
& a4 B, q3 p" F, f# kFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 0 h; V) S. b# q% D' m! d. D8 U
PC Bank -> 'K'
& n9 N# {; R& F$ XData Bank -> 'T'
! B0 ?6 Z; ^: u F# Z% b5 n' @% [, `4 t+ H1 [ |: E$ f
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.( b) ]* o) ?- [3 n+ s$ g- P
! J/ y- s/ B0 y; k. JRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
! F4 _% L) |7 h+ u( b' q5 ]3 F9 |( u3 C1 S9 {& d3 D
Flags evaluate to 1 if set, 0 if clear.
/ D8 G5 F2 t9 T2 u( h
# e. `8 F) R( h, ]$ i- bConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
9 K3 }# v! [* y- ]4 s1 |, r; h& l# v; u' a" h. C7 d
Example conditions:
1 k/ Z* h" P$ Q( q* x
, ?$ Z% N2 N- u7 M1 K5 j$ `' nBreak only if register A is less than value at memory address $0005:# |3 |7 Y% i" D
. b# ~5 s8 P$ p! t# @
A < $0005
- k6 j9 @2 m a. t4 \# s8 A( b9 R$ e& w% |( p3 j
Break only if the value at the indirect address is not equal to FF:
6 o Z$ K6 |, ?
/ \8 d# @: L" E$ v4 H4 Z#FF != $[$10+($11*#100)]
4 a+ Z0 Z3 w1 a
- b, c$ l1 Q9 |8 K9 BBreak only if flag N is clear or A is not equal to 00:4 Z7 |+ K, G- Q8 X! X
0 g: K# H# z# d+ m
(N==#0 || A!=#0). d: C0 A. S5 Y! y" ]5 u$ ~
% ?8 n+ |, ~0 I% M1 b$ x; A! R+ iBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
* S* Q+ p E9 ?0 |: L0 t1 T' R' p* C. m" {
T==#2 2 ~8 S+ z1 y0 u+ c8 g0 f0 q. L
/ p* I2 v2 w s9 `# W
以上内容来自fceux自带的帮助文档说明 |
|