签到天数: 1887 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
5 a+ c7 R/ b1 [0 Y! I7 fConditional Breakpoints+ U8 w$ l; _: T- q* @
6 l/ ?7 t4 \- Y; U! 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:0 p4 [! ^# x+ \* R: a6 V9 j
- ^$ f" a2 k! q) pConnect -> Compare { ('||' | '&&') Compare }
+ `& v0 F8 h) q/ uCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
4 c2 b+ T2 ~4 ?Sum -> Product { ('+' | '-') Product }
/ i! X5 g3 v& c: M3 NProduct -> Primitive { ('*' | '/') Primitive }
8 q, W9 M& o$ k* W6 N) o9 JPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 5 k9 S' C K" o; r
Number -> '#' [0123456789ABCDEF]* % W8 s' Q1 q4 m$ t9 `+ r
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' $ }; s, G# U: w3 S
Register -> 'A' | 'X' | 'Y' | 'P' ( [- Y1 f7 q3 o7 R
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' & p5 D1 {- E5 p
PC Bank -> 'K'
- n1 G. L8 L0 }2 X8 PData Bank -> 'T' 2 o8 K2 ^. O8 |9 p% e; b' d
G/ m& E9 g" W/ pThe 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.
# C, ^' o1 ^, P- a) S
- C6 J% b$ V# B9 E/ h$ K1 ORegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
5 ^5 m) H9 s7 w1 W) {' j8 D
. G: i! K1 b! [3 D0 @3 h) z5 @5 g. rFlags evaluate to 1 if set, 0 if clear.. h5 u$ z. l4 _5 j/ f/ v0 {
2 ^: Q8 s7 o2 R2 i6 @
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.. g. G; R: |7 M1 I) r- l7 x
2 T% [3 I( }" W( ZExample conditions:5 s( `. d" y; f) r) L
" @# l) B7 t3 s; P: T- a
Break only if register A is less than value at memory address $0005:
* r/ j( w! i. P+ f* T2 b( e4 w3 |
A < $0005- q- o9 ?0 j! S6 [
- }9 H- {! H# f6 |1 F4 R; {
Break only if the value at the indirect address is not equal to FF:# [* }( y. u) o( ^( v
# V4 o, X) }, @9 e ?: p#FF != $[$10+($11*#100)]
+ j6 {4 y( U& B+ j+ I: ~' N! P8 |; z6 }5 r- d9 J2 l
Break only if flag N is clear or A is not equal to 00:
2 A7 o/ `6 D0 r6 ]& Q! s* o" S3 B, x
(N==#0 || A!=#0)8 }) ]4 _* T2 l. p
; I9 n1 K3 T) v2 Z$ M5 L1 Z+ _4 bBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):$ f2 ?: Z7 P; M7 t0 V7 ^, M) _5 Q
4 r% c4 s; O* v
T==#2
2 h. P/ a/ o, I; @3 ]+ K
) V) ~ n5 g' j" ^$ V$ T/ f以上内容来自fceux自带的帮助文档说明 |
|