签到天数: 1978 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
4 G- O+ K1 m6 ]0 RConditional Breakpoints6 W! _7 @8 Y. o U4 {
" f+ X3 m, t/ O. z) ~2 O
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:+ g) c" C8 x2 Y2 b/ G, X
- `0 ~6 S( k. |$ [! `$ GConnect -> Compare { ('||' | '&&') Compare } & h9 d$ Q2 ^& \: R# t
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
) T% |% w/ ?- Q$ d; M# gSum -> Product { ('+' | '-') Product }
9 x& Q+ [6 p. w$ ?) ?* J1 jProduct -> Primitive { ('*' | '/') Primitive } ; O% |# y& M, } E* x
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
$ r1 _! j* |6 x3 U1 z$ BNumber -> '#' [0123456789ABCDEF]* ) D9 e+ E! z( j6 G5 i$ a
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
4 _5 r: H* F- n! {5 f0 ERegister -> 'A' | 'X' | 'Y' | 'P' 0 \) r" I9 T2 [2 V. r
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
4 n1 @+ |8 i; a6 PPC Bank -> 'K' 5 B R4 m+ Z( |( y6 z, O1 y" m
Data Bank -> 'T' 6 ~) K- \8 a% a0 f0 }
7 b' O( N4 f% b( y
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 n2 Y4 G' j i1 F1 g. j
4 {- \4 a' D. ?1 \, E( hRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
8 t h/ Y6 ~9 ~' y) Y1 c. y+ T2 ]0 Z* O0 G2 u# p/ u9 L) |
Flags evaluate to 1 if set, 0 if clear.
' G6 A. Y4 z+ g* V; D
8 Z# c0 O# H8 `$ N% w8 K, z( _) {Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.5 K( ?) H0 z2 _3 a% O$ L7 @
0 F: m! f: D+ ?1 S) ~: }
Example conditions:
) J" R; P: o* U
' N8 C) H3 u6 ~) r) ~. c: ZBreak only if register A is less than value at memory address $0005:# k- A/ J# w- F9 G' E
# ^5 g& R& w! Q5 e- N5 h- D _A < $00056 s- }5 Y* Z( g3 S) X
; B( R( x6 a% ?( b
Break only if the value at the indirect address is not equal to FF:
& a4 h) f" m$ K' K* \4 [( L: W' c1 a% M2 E" k: _3 u
#FF != $[$10+($11*#100)]
G& z- z/ n9 i m6 H1 ^8 G! R1 Q, D% U: o0 ]4 @( |
Break only if flag N is clear or A is not equal to 00:# Z" |/ S! t# [' R. t8 [# b' s
& C; X/ s/ j% n! j2 ~(N==#0 || A!=#0). l* t; K3 @# n
1 X9 l( ?9 M) V0 W1 rBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):8 B0 G( w( V" v& I5 _
4 j/ [8 {/ Q2 |
T==#2 # L7 y( D0 V( K5 m& P, H
% ~2 \3 ?. p1 }5 v5 g/ [以上内容来自fceux自带的帮助文档说明 |
|