签到天数: 1826 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点6 `4 d! F, @' T6 P; q+ T
Conditional Breakpoints" q) T) i2 e0 k
% k/ p: f# ]* p7 a9 i* u) W4 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:
% @% \/ V0 @/ d$ B* I! E* d0 E
& p1 r. S' X4 j. `0 rConnect -> Compare { ('||' | '&&') Compare }
$ ^4 A# h0 A3 G# K, @Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
0 u1 \0 U9 t5 y3 [- ^/ A+ sSum -> Product { ('+' | '-') Product }
1 r) }- A3 n7 MProduct -> Primitive { ('*' | '/') Primitive }
8 b: j( ~" @8 I$ e& FPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
: N) Q. H+ C% b3 R; |! X" F8 O- ]Number -> '#' [0123456789ABCDEF]*
1 f1 ]0 N- V; N' UAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 5 a' o/ L' i$ q4 T B+ @) K
Register -> 'A' | 'X' | 'Y' | 'P'
1 s! e, x+ E2 _! M- ]Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 3 ^; U3 f, G( U3 J0 Q5 |2 M" j
PC Bank -> 'K' H, {! f8 `) b+ W+ D6 r
Data Bank -> 'T'
* i2 q8 j. c( g9 J8 L( H. E6 l
5 u( _* p7 W2 Z4 ~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 e7 V4 s ?+ }# w
! C F, K5 n8 [6 D5 w! g8 e: nRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.# c$ G8 a3 @5 ? E2 L
% M% ^! D2 b0 ^: d& M) h' M! e
Flags evaluate to 1 if set, 0 if clear., _$ J5 P* ^3 z; q
! `9 L2 V; \9 j# L; DConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.' a4 G2 b5 s1 ]2 v/ i9 |
" l- s6 Z0 e7 a
Example conditions:3 }, w% I2 F$ t8 t
2 J9 v# _5 i+ KBreak only if register A is less than value at memory address $0005:
5 P( h* i" e" e: t1 C( I. O! `/ ]/ w& V7 r8 _
A < $0005
( R1 X- }5 T; n5 g& D5 w% I
3 u4 r- y4 a- ^5 f+ |2 OBreak only if the value at the indirect address is not equal to FF:
6 S7 k0 V$ X+ U. M* ]8 H" c% k( ]$ f
#FF != $[$10+($11*#100)]! v4 U5 ^0 k/ B1 j- T
% N; O/ j' F5 k/ `$ W. m1 UBreak only if flag N is clear or A is not equal to 00:
7 A6 g& k3 m) ^) ^$ ~1 z T4 C$ x1 N% o
(N==#0 || A!=#0)) d3 V. R+ } |5 ~) r
, M, E0 l' T3 U R* r# aBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):0 T4 X: A; L9 {: b, {4 C
$ q/ n% T2 ? O' K" F7 J2 q
T==#2 + K5 S: h; _! s3 p1 t$ Y
6 f7 e, L) c! t& i3 O, [2 D以上内容来自fceux自带的帮助文档说明 |
|