签到天数: 1948 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
$ P2 D7 Q, o# v; J/ eConditional Breakpoints/ c; X4 i3 O9 F+ j. P
- S. w2 Q! n i7 x" @; C0 y
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:7 g ?& ` p8 O. D- W( X
5 D$ m5 g' _/ R" P4 q) ^
Connect -> Compare { ('||' | '&&') Compare } : c f* x! c+ i5 j
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } 8 G" E, N$ \4 a6 r- |! ?9 A
Sum -> Product { ('+' | '-') Product }
. q. L2 ~! {4 B1 Z. y7 q/ u/ \0 }Product -> Primitive { ('*' | '/') Primitive } 1 c: P5 @! V7 c" i
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
$ \6 O* r) e& j9 {Number -> '#' [0123456789ABCDEF]*
. J( m$ r2 c; @4 `$ ]7 v; HAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 1 |1 D" y( n& l% _9 j/ P/ K. n
Register -> 'A' | 'X' | 'Y' | 'P' 7 E; k5 F8 f: b
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
) p$ A' i3 Y9 L) m0 qPC Bank -> 'K' , H, E! v( j1 U4 h9 v5 |/ }4 U3 A% N
Data Bank -> 'T' 0 J1 ?+ h; L5 u" W
8 _; T( @, y- F ^8 L: F5 Q VThe 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/ P, d' Q( v* R# S! v& }; [ m0 I/ v
% A, {1 }0 S! VRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
9 T9 ~" M; ?" ~" J& Z
/ F9 d, y% G% u/ i8 @Flags evaluate to 1 if set, 0 if clear.
' Y S n; q$ `7 X$ M4 _# @% l+ a: X$ M r
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
' v. C1 y8 @0 Y" `! k1 G4 G q8 X! B: _' w
Example conditions:% p3 k7 D* t& N$ b8 O, \' L
6 ~$ u- }3 P a, ^% d, D* U
Break only if register A is less than value at memory address $0005:8 _- Z5 @! y: ?0 |( a
1 M9 g% Z) w& c& J0 R( IA < $0005) @3 R+ h3 _$ }4 f+ \# ]! h
% Q* l# ?) z: r8 t- t3 \- L: eBreak only if the value at the indirect address is not equal to FF:1 c6 T$ }! a0 R9 A0 n
$ B! y, w# n% V% K5 ^# w1 I#FF != $[$10+($11*#100)]
; s$ n% W6 t! R$ Q6 q( p* Z% C$ J) [7 @; z
4 M* @8 n' t/ Q8 BBreak only if flag N is clear or A is not equal to 00:
( j- |# E/ d0 C1 b; Q8 s0 V0 y% D: {5 g' _+ O! d, V
(N==#0 || A!=#0)1 R A' ~: F9 G
7 X4 x2 N5 [1 S) `% _8 iBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
3 W8 L4 {* s; C- ~" G1 o" x: |6 D) B5 I! ?
T==#2 ; b4 ^* ]6 `* ~1 l. \
0 p* J4 J) t3 B5 i& j U以上内容来自fceux自带的帮助文档说明 |
|