签到天数: 1900 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点9 t2 g. Z- D( A& R
Conditional Breakpoints6 R* D3 J& d% f0 Q, m% A2 G) D, ]
) B1 l" ~ W9 s, P7 d/ S. b9 C
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:% t |4 @' [* {/ }+ X4 v
0 h- ?0 y+ C3 @0 {# FConnect -> Compare { ('||' | '&&') Compare }
; y, c8 z) N, |3 gCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } , L( f5 y1 g& t1 s; W
Sum -> Product { ('+' | '-') Product }
/ s8 b/ v8 t2 o6 ]Product -> Primitive { ('*' | '/') Primitive }
/ o- d6 M6 U: m# B. ]Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
9 w* F0 O j; P5 J3 U6 N: `, K( {2 hNumber -> '#' [0123456789ABCDEF]*
: \8 k" t7 l0 \7 i7 tAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
5 a, D. i7 |8 V/ y0 Y5 [Register -> 'A' | 'X' | 'Y' | 'P' * J5 Z2 M( T' _+ X2 q7 X7 l; k
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' % l# \$ p, t8 R2 h7 @+ T9 b
PC Bank -> 'K' & t2 s+ W* s$ \7 x- P
Data Bank -> 'T' & I# u' `" w; m; r r
/ Z* p i' E$ N+ [
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.& q! B7 k/ ^3 N, Q0 I0 u
( S1 Q' Y8 ?9 ]( DRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
, [& m" w' R+ F* B5 v
/ k' z2 f$ j FFlags evaluate to 1 if set, 0 if clear.
, }0 x/ m$ g) B: n" n8 {% l/ B1 f
$ ~( ?! w; k9 c# C) [* Z7 eConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
, g- a! I1 Q4 D1 s, Q& N3 n. q
/ u6 \7 \6 U& G( N+ J0 qExample conditions:
2 r3 x: P; N' |8 E" V3 V$ Z3 F2 g9 W& \$ L1 o% j* A7 c0 |
Break only if register A is less than value at memory address $0005:0 P: @# G9 w, y+ F% @7 V2 j& x
3 X2 p& v R' g9 v
A < $0005
* ?. o: ^6 p0 {; O# [
# [4 _# Y- v3 {) I6 r6 Z# _4 X- IBreak only if the value at the indirect address is not equal to FF:. h& s1 e! Z3 U% v6 o* C) B7 M
0 X+ L2 s' X& O ?6 K" t#FF != $[$10+($11*#100)]
' H" }; z0 `7 f+ U( Q3 ?1 I- s5 S
/ J$ i& K% L9 K; `2 U" }6 }0 oBreak only if flag N is clear or A is not equal to 00:
; u+ S& v9 d2 G( }% {: m' V1 `: M( D6 [
(N==#0 || A!=#0)
9 V9 t4 q2 n5 f! }$ W6 }/ Y+ G' X1 R3 c/ g
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):- r+ ]8 k4 |) B* t
* T) a; I# R) i$ P! P
T==#2 # [& R/ P' R& b
9 q* f' m# q7 f1 R) L6 ]
以上内容来自fceux自带的帮助文档说明 |
|