签到天数: 1836 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
u" @" ~+ Q% n% P4 H6 Y; g8 wConditional Breakpoints
' {' ?+ |8 X/ r+ |% `2 g
4 f2 O& g9 q2 L7 [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:# O/ {) c; V- {! w' f
& R+ T3 X Y, O- N: m
Connect -> Compare { ('||' | '&&') Compare } + w( F% g; j0 _
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
' F4 ~5 J$ s# aSum -> Product { ('+' | '-') Product } 0 i% j* |4 i+ S
Product -> Primitive { ('*' | '/') Primitive } $ y: o, j1 R* }2 ~& P$ e8 ]5 y
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
- x3 I6 _* u$ q9 W* g$ V1 `Number -> '#' [0123456789ABCDEF]* + A" X- p' F! {" k8 f! A
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' & y% E& T4 U& [* h' S
Register -> 'A' | 'X' | 'Y' | 'P'
8 s+ i) c+ D; t* I: ^Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 9 o' }& @$ r+ u8 g5 e
PC Bank -> 'K'
1 l9 C3 R6 T" {5 ^$ r! z' }4 ?Data Bank -> 'T' ; M% k1 g9 j& A, D) s" \2 w7 V
1 e+ A' j. T% w1 [7 N
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.
8 u# f [/ X% ] ^7 \9 R4 I7 y4 B, u" h. Z3 L
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.: w. _+ h5 @1 M
! H7 p0 i3 v: b' x6 r8 A3 t
Flags evaluate to 1 if set, 0 if clear.
0 G6 B5 k5 o, _; E1 K$ _5 ^1 v! Z. R5 e1 i; `. o
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
4 Q1 e5 ^* r* Z8 l/ M7 g; Q8 O% n: x* W2 Y& Z3 `: ?6 J7 a
Example conditions:2 `( U) E, z% p& a7 a/ x
( h' [5 t9 _: G6 ?. H3 U/ GBreak only if register A is less than value at memory address $0005:( F9 T3 y2 t& {' w' D& ~
: @! [* g) |2 a
A < $0005! o* |) F" H. c+ p* m
9 _0 R: i; W% A6 v2 g5 I
Break only if the value at the indirect address is not equal to FF:
9 F6 l) F( H- e" z
" d; `7 g/ N$ b1 U' i#FF != $[$10+($11*#100)]
. U( P$ z1 [. a% T$ Z# x7 k
) m2 r8 V z3 }+ gBreak only if flag N is clear or A is not equal to 00:
$ _; `' U2 a0 @: }
7 M$ S7 P, X4 x5 D9 s( S+ ~9 O/ ](N==#0 || A!=#0)) t3 e8 U2 B5 u9 c! c+ _
+ L* n% {) u7 a
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):- Q6 P8 K: h6 m- }; u% j
i) A7 Z4 y! ~7 T2 x* q8 S
T==#2
; u2 s/ I* s( S# {$ l+ n" z5 v- ` O
以上内容来自fceux自带的帮助文档说明 |
|