签到天数: 2138 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点) r5 ~* x, ~3 Y# }
Conditional Breakpoints3 p3 H" ^ h: M
; R& ~# r9 \0 b0 V8 h% b
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:
" x9 P3 u: f' i1 x7 v$ s3 X
; N, m( v- f' n0 o) s. L3 vConnect -> Compare { ('||' | '&&') Compare } 6 _ Y$ x7 d2 _, f- n5 Y. V8 W+ b
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
' U* y5 G; \' \" DSum -> Product { ('+' | '-') Product } , s; ]+ U& @& V+ w" {
Product -> Primitive { ('*' | '/') Primitive }
+ W* I: ~( ^0 \8 A5 `: x. o; j, vPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 5 V- t8 B" U2 ]
Number -> '#' [0123456789ABCDEF]* / W0 {8 n: \5 ` A/ m8 w
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
2 a9 l+ C" l! Y" RRegister -> 'A' | 'X' | 'Y' | 'P'
) A% X: ^, z' j! k- jFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
! l6 M. A+ Y, b( _. b" ]PC Bank -> 'K'
9 e( ?% \" Z( d3 j/ q" B) TData Bank -> 'T'
) _6 I X& C: p: g! j! ?
) L! t1 M7 z; ~6 x5 r. g" qThe 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.! M" @1 ?) ]5 H3 w! X
! _$ w0 Y g8 K9 m% A" R
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.$ b" [6 t6 g. L" \
+ W3 r9 V ]/ n& n( m! n; g7 k) ]
Flags evaluate to 1 if set, 0 if clear.
: ?6 w4 T2 M, _0 F0 c+ q6 b1 D1 V' G+ [$ \, ]4 r% I& p. j6 N/ j
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
6 K" s, Q0 w9 O, Z, h# Y2 W# {. @& _! ~4 U5 N. `$ a9 f; U. f
Example conditions:
' d0 _. J+ h+ `2 M, d/ q+ W- l1 S1 l5 x: z8 y) {! f9 Z
Break only if register A is less than value at memory address $0005:
+ r: L* I Y; b8 p! J i0 B& G' c9 s3 v, {* j8 F2 l
A < $0005 d4 E: t2 L5 S* {
+ i3 i6 n* t$ I
Break only if the value at the indirect address is not equal to FF:2 A; H8 ^1 a* z/ f
5 p1 v" d4 ]& v- Z7 }6 K#FF != $[$10+($11*#100)]
9 }, p4 w5 B; e* E5 H. {6 w- h& ?" d6 G
# L/ C- ?3 z8 Z3 {( |Break only if flag N is clear or A is not equal to 00:
2 A0 D+ B' S1 c0 j9 v5 o: k7 u, N% t6 M$ S1 ^5 L; d
(N==#0 || A!=#0)3 P& ^, c) @5 F5 `: G
# Q& c$ A% J8 F7 M U: P2 dBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):! C6 d* c, `5 [3 \) x1 n7 N3 C
1 ^5 B* m# m; E- q* a( @0 C5 X
T==#2
( r) h( s* ~: @. ]' d2 C1 ^
% g) S7 ]$ v( f以上内容来自fceux自带的帮助文档说明 |
|