签到天数: 2201 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点# G5 i$ g" _9 @& C* U
Conditional Breakpoints0 i! w! x0 o& L# e* {
3 U: ]. `) [! ~/ kBreakpoints 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:" R5 G' _- ~0 q, ^# G5 h
! A, v3 P$ M+ u& |Connect -> Compare { ('||' | '&&') Compare }
" h& f+ q4 U& Y, w& \6 u0 Z* [Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } ) H7 b; ?3 P* |2 }
Sum -> Product { ('+' | '-') Product } 0 ~* e, k" x9 h- k- X2 N7 a V
Product -> Primitive { ('*' | '/') Primitive } & e+ `6 \) W, y! s
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
) t) n w# H2 c) p% [' HNumber -> '#' [0123456789ABCDEF]*
B/ b8 U& Q1 v; O5 |Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
* u& q. x" E) I! ], Y. Z( P. PRegister -> 'A' | 'X' | 'Y' | 'P' # q3 o. g( g& q( Q4 \; X3 Y, [2 {/ `
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
; p I8 N3 q7 p; O* SPC Bank -> 'K' 3 T5 ^' s, P1 d5 f' v
Data Bank -> 'T' 4 ~, O" e4 m4 r1 ~0 e
, f: `* }' f# x7 K5 Y
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.) k8 s; ?& r* B7 j l
8 }! X4 B8 z9 d9 v$ G" K
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
R' }) \5 h# n0 m- m6 [: d3 S3 S4 e8 }5 E
Flags evaluate to 1 if set, 0 if clear.; ^* I* A; A( `; b
4 `0 @6 D7 w% ]! R/ K& d& q, q% K) b5 VConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.9 o' [; o. n% [
2 q% E) d& O( j* e t; }' x/ YExample conditions:- a* |1 ^, U+ H0 F5 x. V
* z, p, ]+ r ^ E9 M# S( q
Break only if register A is less than value at memory address $0005:
6 e) |" [$ _9 ?7 w" d
4 A" T( L v& [0 TA < $00052 S3 {$ V$ b. t* k
1 O# z8 F, s/ N9 N
Break only if the value at the indirect address is not equal to FF:3 h1 \0 H- h/ K& l
! ^. A" r$ f6 M( y
#FF != $[$10+($11*#100)]
+ N- x6 k$ \( G& \- o' h! I4 B5 }6 i7 P& O" U+ [* j0 }
Break only if flag N is clear or A is not equal to 00:
( x# t* s) F% E& P6 O! k3 O* E s* Y5 ~9 j
(N==#0 || A!=#0)
1 `. ?- y! ~3 k1 Z0 o, D- \% h" N; C) _
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
5 ?& G3 m+ `! Q" l1 g
* F7 Q1 G2 ?4 ]T==#2
2 B8 L3 X# S' H
( \5 F, \1 }, K9 g! M- l6 |" o以上内容来自fceux自带的帮助文档说明 |
|