签到天数: 2072 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
; a# q \0 z6 g, H/ k4 g! M: |Conditional Breakpoints
' N" P$ ~* x i) @9 W* t' l* S$ h. i# H& G ~, Y( x! m) M) h, W3 E& 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:
9 ]& `0 L8 ^. H, m' C
; E9 c8 V7 H) [1 P& b. m$ wConnect -> Compare { ('||' | '&&') Compare } 2 h6 ^( w* x6 y. ~' L1 P$ B
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
" V, D3 [6 w0 h* X! J- ?& _( V! ?Sum -> Product { ('+' | '-') Product }
0 |1 W6 t$ D& _! H% ^Product -> Primitive { ('*' | '/') Primitive } 5 p" c- D- p4 v
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 0 |& N9 x0 R+ {% h8 b; J6 Q
Number -> '#' [0123456789ABCDEF]* # b; V S6 M2 T
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' % k9 a% P3 p, ^2 D# F
Register -> 'A' | 'X' | 'Y' | 'P'
# h- I/ `% W# n8 l, {3 PFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 9 U+ J [! |6 C- d1 A7 M
PC Bank -> 'K'
1 K' y- v, f4 P2 d; c& nData Bank -> 'T' 1 m; M# f$ J' Q
% k Z' n7 Q+ hThe 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.# d9 s/ c& n# @2 ]7 _8 L1 a s7 F: N! M
# R# z2 ]. T- H+ ^: D) i) d( _
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
. q L4 k2 `( m3 L* ?' |5 k6 v5 ]
Flags evaluate to 1 if set, 0 if clear.2 I3 X, `/ v0 R! ]1 o
C7 D( k# b; _# r4 gConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
X2 {: x" Y. ]" o: o
6 Q; p) t4 S- c) R+ Y+ I/ ^Example conditions:
3 g* ~+ y n7 U" T! i4 [: K6 {: Z) A
Break only if register A is less than value at memory address $0005:8 w& K u9 l f5 F" o8 Y3 q
( q( w3 x0 U# c# a& V* WA < $0005/ G% K* P9 |" T9 d! s) |
* S# ~( w0 {5 \0 U+ ~& f8 U
Break only if the value at the indirect address is not equal to FF:7 K" @8 `, v, I. o) I
3 |" F" v1 ?7 a9 m#FF != $[$10+($11*#100)]
: q; P$ z; g4 m8 x
: c( i. S x3 T' m! ^Break only if flag N is clear or A is not equal to 00:
# s. v+ b2 c1 f# v; A/ g
5 ^8 `* G2 o: D* T4 y(N==#0 || A!=#0)
! S+ o1 a# {% i1 }6 d
4 e+ U6 F. n: G8 S6 z1 wBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
2 R* ?$ j( @ f0 p |9 @
* z" t( G. c4 `' K$ {6 p6 jT==#2
8 d% a( _ I, b0 f. S+ u$ L9 J* r& _2 m# X- {) j
以上内容来自fceux自带的帮助文档说明 |
|