签到天数: 1894 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点, R- j6 s( Z Q* f; h# J
Conditional Breakpoints
" g1 W, n9 u& x# W
) q6 S* a$ Q6 nBreakpoints 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:" x8 v9 F s3 M" m0 p0 @
, d: U" ~9 W# e8 `9 M1 C) \+ [
Connect -> Compare { ('||' | '&&') Compare } ; z/ @# T! l* I4 Y
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
) M6 U* L5 t+ M0 ySum -> Product { ('+' | '-') Product } 1 H p% g2 F: B% s) Y0 Y
Product -> Primitive { ('*' | '/') Primitive } ; Y! z7 X. K- @7 ~/ {. L' l
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' ' u& F4 C4 j/ w4 K
Number -> '#' [0123456789ABCDEF]*
+ a, O( L! X1 F3 u- S- EAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' & g# L0 u1 b: N8 R+ Q* t. ?0 S: k
Register -> 'A' | 'X' | 'Y' | 'P'
) U4 H9 G5 M5 h% [0 _* s* vFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' " w+ D: B/ u* e! C
PC Bank -> 'K'
$ ], B! P& o \Data Bank -> 'T'
7 H% ]. }0 G8 T! O% f: u a+ z/ i6 g* G
/ I' x+ w \# fThe 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.
) O" o5 y5 x' R/ J1 G6 [# l' {$ n& f4 [* }! P, |/ a/ O
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.' \, H4 h3 Y' w' i6 _2 o* a% F
: {# P! l( \# e. |
Flags evaluate to 1 if set, 0 if clear.
" B' }4 F8 D* k7 A
( k6 D3 R3 i1 t0 q+ ZConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
8 _9 }9 e. j; u; l: g# R% _
: W) k9 A6 I- V, B; b) r2 R/ W jExample conditions:( ?8 w2 i Y) l9 H
$ @- ?- L7 i" ?$ K0 W {
Break only if register A is less than value at memory address $0005:# w# Q) y; {& Z
8 ^% c1 H6 D( `4 D& dA < $0005, X, E$ ~% e& C) a
3 ^# g, _( l: g: Q6 O; {! _. v
Break only if the value at the indirect address is not equal to FF:. i4 m& \* }7 t0 \( h8 c+ g
0 c1 j: P6 o9 T& L$ J7 ?/ b2 g; L) `#FF != $[$10+($11*#100)]
8 U1 ~7 n" j6 e u
7 p. A; o# e$ d. x7 EBreak only if flag N is clear or A is not equal to 00:) M; M( J( G' Z0 n: Q) C
! E% I7 J2 L$ R
(N==#0 || A!=#0)
{& k6 q5 Z8 p
. B! q# O, d* bBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
8 a. U" t! {( h4 {- n8 \0 r- A0 s3 g; `4 Y# E4 L5 _3 }: a( z0 D
T==#2 5 x. J( B- {. Y A3 p6 o7 C( x
0 ]# G' I( E! g以上内容来自fceux自带的帮助文档说明 |
|