签到天数: 1940 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
5 |4 H, z4 w& [& K3 eConditional Breakpoints2 i0 q0 z( v/ b5 ?
: X3 n& g" ~, TBreakpoints 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:& w& X) x; w9 g9 u# d V }
* s- ^1 b4 K' j: y8 B% w2 s/ X1 mConnect -> Compare { ('||' | '&&') Compare } 7 e* H; Z- `! F. b- I, z
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
9 _, `% |& l. t* _$ Q, BSum -> Product { ('+' | '-') Product }
3 S2 E. i( Q/ w/ K0 ]' [Product -> Primitive { ('*' | '/') Primitive } . s# C1 c& x; d
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' ; v m, q5 F0 X8 N0 z. C. K9 D
Number -> '#' [0123456789ABCDEF]*
; h4 V. s3 j2 G6 W- zAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
2 z C/ [* T" B+ T- RRegister -> 'A' | 'X' | 'Y' | 'P'
% o6 R- F9 L5 |. e) [8 JFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
4 \" N) H T. J, uPC Bank -> 'K' , ^" \* B: k7 Q" }
Data Bank -> 'T' " l" K- h9 y- A* E# u6 i
/ W; }8 d4 O: B$ i, F9 d9 G( JThe 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.
8 f" j" e Y! O7 E8 \) r) Y* h, g% J" h0 y- G, O
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
, D7 j5 y6 r0 E% f+ x
# a' l3 B! Z7 ]) `/ ^/ DFlags evaluate to 1 if set, 0 if clear.
3 f* w+ L$ Z8 V
+ c5 K, I1 o a6 t: @ a5 w, B3 _Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
) Y1 ^6 } z2 a" b) o- u
P8 e8 `% B- F9 R" EExample conditions:( H1 ^& { \. |9 i: U
& W' h5 u- _$ R9 R( D2 z* m: fBreak only if register A is less than value at memory address $0005:+ O" X( n% V: {; P' p
* j& B; L. ?5 I; nA < $0005# w6 F/ T, D5 y% i y+ f6 |3 {0 C7 t
9 }' p, x1 v+ X- O8 B: U
Break only if the value at the indirect address is not equal to FF:+ k5 d: p: D$ T5 H
$ \ G; }1 H# _9 B
#FF != $[$10+($11*#100)]( l! f8 b( W- f3 C
: J) ~7 q& P+ I, uBreak only if flag N is clear or A is not equal to 00:( n* z5 R# ]; y9 \/ E$ w' O; [8 j
' l0 r0 L6 `3 {, D, \
(N==#0 || A!=#0)
/ p1 i9 S: Q5 ?' }+ Q# }4 a
6 J& I0 C+ {" p% t/ F& n0 ABreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
+ {: H% a' P7 s7 ^% s% r- h! m) ?6 ]8 |% H$ s( A7 A
T==#2 ! t8 M: R5 v0 ~ G8 f% ?, F1 }
* j9 l" e( P9 B, r2 P, Z以上内容来自fceux自带的帮助文档说明 |
|