签到天数: 2135 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
! d: W* X8 t* Q2 z& @5 B/ ZConditional Breakpoints: s, j0 |6 x3 l9 H G( C
4 `& Z) I3 e- K' `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:
5 x/ e. T6 I9 q1 j% h0 B5 B
* @- f- C% Q# d8 m! @Connect -> Compare { ('||' | '&&') Compare }
2 Y4 B; T( u. ]% N, w/ N4 `" b* r; oCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } % k$ ?" }9 M$ X1 j/ q% e
Sum -> Product { ('+' | '-') Product } 5 g6 A# t5 ^( c
Product -> Primitive { ('*' | '/') Primitive }
# Y+ r: Z. o y* I n t+ A iPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
" s- A, N) J+ j! Z: K( yNumber -> '#' [0123456789ABCDEF]*
% M4 J {, p) i, Q! k; bAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 4 k' P9 _) ^9 z6 I0 G- y% p9 M6 D2 x
Register -> 'A' | 'X' | 'Y' | 'P'
0 F0 G* m" K- b, IFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
& `7 b5 `. I: ^) v: N2 C& G% uPC Bank -> 'K' K( v/ H% S+ ]3 J! B3 f1 q1 y
Data Bank -> 'T' , E2 y7 ]* L8 y" k, {
6 ^+ P W L* k0 H; }
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.; g8 u4 f9 [: {. R9 b
0 b- [8 G, Z- o5 H- o$ GRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
! ?, U& }4 f7 Y* @' {; E) J
" }) q$ W d( O7 y: E3 RFlags evaluate to 1 if set, 0 if clear.3 L" c) Y9 v$ Z/ Z7 H
, g! t8 P: U, s' x0 }) X- `
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
; [/ E( d8 G: V: Z
, I- H7 l6 {# P$ @9 q. rExample conditions:
& k! w2 x4 b, M
0 } y* W0 W, ~, rBreak only if register A is less than value at memory address $0005:. u" N! ]4 c' O3 Y; I$ p
/ O l. l' f' H2 T8 IA < $0005$ E4 }* F d2 f1 u* l) l$ W8 e, l$ g
; w. ~+ ~0 `9 w1 o8 w1 p2 |$ h
Break only if the value at the indirect address is not equal to FF:2 `# L' w8 l1 c
h. D4 @7 e: D. Y#FF != $[$10+($11*#100)], X5 P% G1 c n6 k1 n$ L
2 R& ]; F- ^- {9 T7 jBreak only if flag N is clear or A is not equal to 00:! ]" G6 y# R6 T3 t$ U( k G
& p9 M! U& a6 `; ]$ D7 [(N==#0 || A!=#0)+ R; b' n; j5 a. H2 J$ }6 p; O
8 q O* s3 n$ E
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
0 I3 D$ A7 T8 m$ E0 o) a- r8 Z3 X0 ^/ J# ~# [; v0 y
T==#2
" d/ r; z ]8 C8 o; |( E5 h
# p5 X" f( V0 G* k1 d以上内容来自fceux自带的帮助文档说明 |
|