签到天数: 2136 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点) `$ h0 r2 e% s# q' i6 _3 t+ {
Conditional Breakpoints( h, J4 y- k$ p$ l
( K$ T; E7 f3 d! x/ A' G- c' c" y% j% gBreakpoints 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 k% z+ W. F0 e1 l- ^0 B
$ X! c9 h3 H$ a7 t+ P/ U+ c
Connect -> Compare { ('||' | '&&') Compare }
+ z3 n, `: U3 H! K" m4 ?Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } 8 ~7 H9 i1 Y5 ?8 D. \
Sum -> Product { ('+' | '-') Product } # f6 i4 ?3 T; @: }
Product -> Primitive { ('*' | '/') Primitive }
$ X d) Q4 _+ X( t- ZPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 4 b( {) a3 v7 k" P0 g- p5 ?. M1 ]
Number -> '#' [0123456789ABCDEF]* 5 ^, `+ n. f3 l! D
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' ' X \, I0 m: m9 d
Register -> 'A' | 'X' | 'Y' | 'P' # U) {4 t2 e, N) p4 \
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
a: I- t4 G" `3 R; Y1 J) h7 N- lPC Bank -> 'K'
" z- D9 f' V2 @: @( GData Bank -> 'T' " T! L2 J, W3 \: I6 B+ {. Z
0 F0 V3 @$ Y- `0 O! ]/ E! O( c! s
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.9 \# y$ G4 w1 \0 u; b
+ B7 b8 }2 N& ~+ l, G7 `& T
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.& ^% t" F" a8 `
7 i( {8 C: a* ^+ M: OFlags evaluate to 1 if set, 0 if clear.1 \; b" ?& W w# U% {
4 j0 `/ O$ f: V) c% g, r; W
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations." R( i& [& w1 C1 W
( F( ]+ s: f- D& D
Example conditions:
' U7 ]! s, ?6 k: Y& P3 h3 v8 E+ Y% r% Q* o; s
Break only if register A is less than value at memory address $0005:8 e) _. m2 w. }4 U
& K# E0 g4 s s4 t, ]A < $0005
$ {' x: N& S5 h- e( P, X/ `% H9 l" `
Break only if the value at the indirect address is not equal to FF:
/ ~0 c* |$ i, J/ Z v2 r
3 R/ h: C4 [$ X& y0 }1 m4 j#FF != $[$10+($11*#100)]/ {* L% b+ ]- h
4 C4 }) a; C$ \+ c7 F/ i2 W
Break only if flag N is clear or A is not equal to 00: k- c o/ e6 c7 [
a5 i) J) R7 C0 T1 H0 n7 A(N==#0 || A!=#0)
& ^- o- L S1 k0 \2 P$ s8 c
# I v' o* @8 O6 P. L1 ^: J! {Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
- ^5 l0 C+ y' T6 l2 I& Q4 l. ^& p$ T8 H8 y% _3 i- E
T==#2 ' m% C+ R2 [5 r: E
7 B& \4 R5 R/ Z+ s以上内容来自fceux自带的帮助文档说明 |
|