签到天数: 1890 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
* y9 H% H/ B8 G/ C2 U- J. LConditional Breakpoints; L- ]6 ]. o4 t7 _' i) S) |
: M5 ]+ k( ^* a; j# Q6 L5 R( CBreakpoints 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:
+ i9 Y h: c5 r) z9 v) d4 S1 w2 S, k/ u2 u: I* z
Connect -> Compare { ('||' | '&&') Compare } 4 A, W% Y7 h5 L# ~
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } ( M m3 G6 r9 f# y- T
Sum -> Product { ('+' | '-') Product } # {* F0 H+ }- M1 @
Product -> Primitive { ('*' | '/') Primitive }
8 U2 P. ?. S3 y% ~Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 7 V( S/ _5 `- W1 p. Z6 i
Number -> '#' [0123456789ABCDEF]* P% r. \/ I2 M* x: V
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 2 m# |& T b3 _+ y6 T% n
Register -> 'A' | 'X' | 'Y' | 'P'
2 j+ n d7 X- @7 SFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' , ]$ w4 W- J M% V$ f$ C
PC Bank -> 'K' ; ?0 g8 o( \7 a- t2 e# v
Data Bank -> 'T'
+ L- q- O& I `4 v, O9 o1 y# v0 C9 H# c3 t! M) M# d- e
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.
5 r8 x9 G( H+ A T; E4 w& q1 E9 h4 Q4 T D' U3 N
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.0 S) e, ?+ b6 P I, w
: i! Y# h# Q, T
Flags evaluate to 1 if set, 0 if clear.
' R c2 N6 }( \: s9 Z% h3 _ d% y- b+ o
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
. B( N6 l; A+ W
# a: Y+ }- ^ O! TExample conditions:- p' V2 l0 }0 d5 _& \( S6 L
+ A( o! r. P) y' F5 l- s+ |# YBreak only if register A is less than value at memory address $0005:0 n G3 V# F0 X: H& F1 z# N2 k
/ Q ~) r, ^6 v. [( G6 tA < $00051 j' K: y# i+ j- I- ]: O
; U" v2 y. O+ F6 w1 a x t I7 XBreak only if the value at the indirect address is not equal to FF:% d! G4 m0 S1 c0 s, ]/ @4 P) {3 I
8 v/ Y% W. Q" r7 L#FF != $[$10+($11*#100)]& G+ {; k' ?1 n7 S# P4 a
; N% m8 H; d; |+ w+ `Break only if flag N is clear or A is not equal to 00:: q( l3 O; i' i6 q. f9 @1 N0 n4 \' ^
) o/ z3 K. a$ T! ~1 c& [2 o(N==#0 || A!=#0)
$ a4 H; N/ Z2 |7 ~- E4 d* S) u ?9 N% w
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):+ f9 v7 w! @/ `( ]% j
0 L3 y/ ~1 @0 V$ Z' E; ?' RT==#2
8 Q! K, }) u. _$ k: V; O9 z. o3 Q# m/ y ~
以上内容来自fceux自带的帮助文档说明 |
|