签到天数: 1976 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
% Q" c7 C' f$ d6 W9 Z) [1 a) TConditional Breakpoints) w, F9 n. ^; r
+ @" Q7 j- {( \
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 c/ o8 M/ g* h
& G B& n/ O. v4 e% TConnect -> Compare { ('||' | '&&') Compare } . L* X" @4 E0 A/ S: x
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } * |* _( R1 m u' T
Sum -> Product { ('+' | '-') Product } 5 c6 ?: X+ b, T. ~' @6 F; H" l0 j
Product -> Primitive { ('*' | '/') Primitive } * R: ?: r, g+ H0 I l* J0 V
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' & e7 q# j% z- P+ w8 G. C
Number -> '#' [0123456789ABCDEF]* , z: A U& X0 F$ t* I+ v
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 7 n; s: F, b/ O$ w
Register -> 'A' | 'X' | 'Y' | 'P' 6 F' ~4 n3 Y: [- b" i6 C% Y
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
* J* o) v& x# d$ i7 LPC Bank -> 'K'
3 X% I9 ~3 @# B# h. ~) sData Bank -> 'T' ( I& u' ~' G0 N) K- q" @0 r
! Q: c) E C) k1 C
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.' N8 W$ Q) A/ t0 o
% Q% G4 `( F& r" cRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.- g7 r* S. D0 {3 W. i/ A! N, \6 ]
' e/ @1 x% P& |; O+ `& c+ D
Flags evaluate to 1 if set, 0 if clear.2 h1 o2 ` r1 M, R# E/ h7 T
4 r& [+ ]: @( f# rConnecting operators || or && combine boolean terms. Parentheses dictate order of operations./ R' n7 a- s! A3 M" _
# N% w& L) W, f/ U, K c* l
Example conditions:- f1 O4 [" v4 f6 d9 X( C$ r+ U
3 s, q% r0 b; N, \
Break only if register A is less than value at memory address $0005:
1 b9 \5 P% ~' Z- z$ Q/ ]; L
! f4 Y5 j9 \( f; U3 sA < $0005* u) ?6 y$ _7 S! d u( W2 r7 P: ^
n v4 o, N' A, v( `, U1 uBreak only if the value at the indirect address is not equal to FF:
: }0 J1 f9 S. n. A* U. H! G; \% I3 T3 Y; D
#FF != $[$10+($11*#100)]
6 [! V" | E, u& P- V8 V) R& P! } P0 B( O* P k
Break only if flag N is clear or A is not equal to 00:; ~: i& y' E; W$ g+ \5 c# L
/ Q5 ]& ]4 K9 B6 o3 |6 C
(N==#0 || A!=#0)
0 a6 E) R9 ?7 ~5 P+ a1 O* _
( l( c& u( @/ q5 H$ yBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
4 I5 a# v R9 l' Y2 g. i2 M; p6 N; |2 B8 z4 }
T==#2 ! B2 E3 N6 r& z! l& @7 Z
# k" c% E0 D% A. S% y3 c
以上内容来自fceux自带的帮助文档说明 |
|