签到天数: 2211 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点& L* E8 r( p3 f3 ~
Conditional Breakpoints
2 H& n- t1 J9 C" K- G2 u
5 d3 I* b7 G' J4 V& n; M" C( ?0 @9 bBreakpoints 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:6 ?% r" T4 s6 @; a
2 m3 a4 v" C" Z/ @; c ]Connect -> Compare { ('||' | '&&') Compare }
% S/ G" s+ m B( f( a! |0 f* A/ yCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
! k- m x" N2 m: Y. @. @/ y: k1 ESum -> Product { ('+' | '-') Product }
0 k; D$ c& B2 ?: vProduct -> Primitive { ('*' | '/') Primitive } + B5 X* v8 q: O$ k
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
1 L5 Q& w, X; KNumber -> '#' [0123456789ABCDEF]* . `- w$ {. f. `. M* {: t
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' / C! b+ b5 a9 y* z2 _) g5 W/ l2 o0 ~6 U
Register -> 'A' | 'X' | 'Y' | 'P'
6 D+ h% z. P4 p9 e8 q" ^4 D, @2 yFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
, S/ A% y: [1 [% JPC Bank -> 'K'
m8 ]0 E& J: A2 i4 V* t( ~Data Bank -> 'T' : u/ Y, O6 K6 T7 ]- Z& I- O
4 e$ o; Y& q# h5 {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.
3 ~. o0 q) R Q. X% Y% i0 J1 N* ?/ ^. q. f, {
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter. \, C7 M1 ^) i0 ^) @- K4 m
, h. V; y8 e$ F5 L# {
Flags evaluate to 1 if set, 0 if clear.. s- }+ Z+ I5 f+ K1 ?
6 i! \, K% m5 T- w
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
6 Y, @ Q3 M( F2 [6 j5 N: c
* }6 F4 c- |, tExample conditions:
. y3 O; m& d# ?; t$ p0 {% ~ w. K7 S# a" J
Break only if register A is less than value at memory address $0005:
: s* j) b0 O9 `2 I/ h9 X y" c0 X% q9 B6 O# i
A < $0005
9 B; y: y2 P1 \* m) s! s8 O/ a: z' ?1 o
Break only if the value at the indirect address is not equal to FF:
5 e5 @/ r: w5 n1 N6 O, r
0 H2 ~$ b: j, Q6 J% m#FF != $[$10+($11*#100)]+ t9 C+ c- N% Z- h9 m. k
& Z! h+ `" K3 X2 ]Break only if flag N is clear or A is not equal to 00:0 H: W1 `2 [9 Q! C7 M6 |
, k0 N8 ~( `$ i s
(N==#0 || A!=#0)
, t# l+ Q; j' T1 T- @8 d* @6 A) A
5 D' J! `" |! g+ U1 N+ q7 O6 ^Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):" k+ i, \) p9 Q, w$ ]2 n
7 R( }6 n* [, J7 l- u- t
T==#2 4 v7 a6 [3 s8 ?* p/ ]# A; Q) M
& j& O6 u) {1 g$ G
以上内容来自fceux自带的帮助文档说明 |
|