签到天数: 2137 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
2 L: R) n: V: y0 V8 O& cConditional Breakpoints: H5 V) K* b) ~2 Q
6 Q; Q( @3 Q+ t% \( U5 A( G
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 p6 t4 U- A# z" t% v
, e9 K! {0 ^1 X, x
Connect -> Compare { ('||' | '&&') Compare }
r( C! [8 X0 S5 r. tCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
5 n. `8 i) B* C$ jSum -> Product { ('+' | '-') Product } + `) y5 z$ T# u( M7 v) p6 Z
Product -> Primitive { ('*' | '/') Primitive }
* L7 F9 N9 ^& K: APrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 7 [$ ]) W8 J: N0 i& J, y4 {
Number -> '#' [0123456789ABCDEF]* " [. \( z- @! p. Q! r3 ~! v. p
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 4 h$ Z4 D+ K }: u; p3 c* M
Register -> 'A' | 'X' | 'Y' | 'P'
* c. V! H# N) S" r# ]1 G# k) `Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
/ o6 \4 s- `) Q. S* ?4 G0 JPC Bank -> 'K' 2 p5 F" p3 S9 M9 R" _1 f; g9 u4 P4 [( r
Data Bank -> 'T'
" ~1 V9 O ?( [; i2 Y
9 d1 Y* {" F- P& A. z) U. GThe 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.
6 k& B2 ]; m5 ?* y0 ^0 \
0 Y1 ^+ i* o8 L5 p4 h- `( o* LRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.) I) H* ^5 u6 R+ t4 D! f
$ `9 Q' }! A6 G# ^. O3 L' i1 sFlags evaluate to 1 if set, 0 if clear.2 [2 h- k& s$ W( V+ \- ~8 ?# I
" ?* N) X. f; O5 E6 b7 S: e0 S
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
1 X2 I% K$ r* o! {* d1 M' m
+ H; ]- Z" r8 M; LExample conditions:
* i! d ~; o6 @: a
( y K" G2 E1 W) P# e/ XBreak only if register A is less than value at memory address $0005:
7 S0 ]& M. X+ g9 R
4 j: m0 p$ N7 l4 w4 r, D' _A < $0005# J( K2 `+ w) H- K \1 t: b l
T% k u7 g$ p0 K1 B3 N. _Break only if the value at the indirect address is not equal to FF:
. V' k+ t) R3 C6 [$ E; i3 W7 `! `
3 U* Y& _1 A5 c7 d1 n" p" E4 N/ m" t#FF != $[$10+($11*#100)]
u) X% z) t+ I
" M' O3 ]7 T) I1 B2 R& ABreak only if flag N is clear or A is not equal to 00:2 }* a" @* {3 c8 x0 O
) `) S7 f$ Y3 _5 [( a1 a# u
(N==#0 || A!=#0)
4 o1 T- ~5 \1 X/ o9 N* J* H; t
9 c$ G: _( ]& ?9 \- C( j: J! z, wBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
5 O, s$ G. e2 t2 }8 F
9 p8 L6 j4 u# o$ F9 h2 D7 ~T==#2 - n( p# i E0 i
9 Z' T& \! B6 E- g* [6 b以上内容来自fceux自带的帮助文档说明 |
|