签到天数: 2171 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
5 h% f7 U- H$ J) n1 R GConditional Breakpoints- |7 s5 b' @6 {0 L
8 N9 x, c: @& F4 @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:9 C5 m1 E* f6 \- O3 d8 b' W& |3 I
/ V& v$ V/ E7 ^3 n* S x
Connect -> Compare { ('||' | '&&') Compare }
+ E/ L0 u$ h. j, a4 {Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
0 h6 [) g" h% ~$ R; C7 q; KSum -> Product { ('+' | '-') Product } / W: I( f9 G5 {
Product -> Primitive { ('*' | '/') Primitive } 3 ^. ~% I& R5 N q( m
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
6 g, M6 X; f( \- T' Y* FNumber -> '#' [0123456789ABCDEF]*
/ q6 A4 G- H) v; a7 K4 VAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' ) D, g0 O+ q. \$ Q. R
Register -> 'A' | 'X' | 'Y' | 'P' 7 G( o) K; r' X1 ~7 q8 [
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
/ @% B( x4 L1 Z$ b. F- _PC Bank -> 'K' 5 G4 |; L. |3 Z. ^
Data Bank -> 'T' % f; x _/ a% r8 {) N# Q6 \
5 _ B4 A% L7 `4 H
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.
7 `0 t9 Z8 v( h U" a: g$ y( v5 T
3 i$ a2 R; w M: _# YRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
) w+ H/ M s$ d
8 D( c: o" U8 }, EFlags evaluate to 1 if set, 0 if clear.; {- t/ B- F. ^/ r. _) n. \& V: {
" v0 Z8 y+ }3 s# i6 P/ {+ fConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
. m9 b' Y& O+ \: J7 M# ]9 u) [+ l7 Q4 d0 K
: M* r5 ]6 i; V6 {1 VExample conditions:
6 D8 K0 ~) j, V' Y; D$ t( ]+ H; Q- `. j; D' T. `8 j% B; A
Break only if register A is less than value at memory address $0005: }% t% p$ y( s0 ]* U- g
! M3 S* @! U0 o! l3 a: QA < $0005+ c- P0 f9 J, Q$ k4 t6 ?
- \$ z8 O5 u/ h: l
Break only if the value at the indirect address is not equal to FF:( i. V+ \8 n' i; P5 i
; N6 n3 `, Y% o/ ]+ R$ B) f
#FF != $[$10+($11*#100)]
+ D! ^& G9 s1 w( @: ~5 [) v( H2 `) r% c: J8 S2 m( r2 k
Break only if flag N is clear or A is not equal to 00:
/ d! k9 h6 Q6 @1 Q5 B8 g* a1 y! }2 C7 D2 z( q' D
(N==#0 || A!=#0)- b- X! S$ d2 K$ t" X
% p7 _ C* Y+ N' s4 R. Q* QBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):2 H# f. L0 m3 e
+ [* k: {, g& P4 g$ z: B
T==#2
* }0 W# j+ l) ^; G3 R. q" `# P/ N( g
以上内容来自fceux自带的帮助文档说明 |
|