签到天数: 2020 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点( U% |- c1 M$ c- L
Conditional Breakpoints+ S' f4 T' B# c# H0 _
' Y2 t2 u, a3 V1 v4 Y! s- M* e
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:
! I e, A* U2 p) j3 G; T$ U8 Q* H! ^, \8 A% y6 N2 g
Connect -> Compare { ('||' | '&&') Compare } 1 r) G) c- V4 `3 t
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
$ q/ X1 b0 u' a( H' jSum -> Product { ('+' | '-') Product }
~. ^! R, U* S3 N+ SProduct -> Primitive { ('*' | '/') Primitive } # J6 x0 f* ~2 ]& H
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
# w& L2 r' y7 l# N( ~; FNumber -> '#' [0123456789ABCDEF]*
, z* M" Z2 D; K, f! B$ `Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 8 o- R9 m8 n8 K; g8 s
Register -> 'A' | 'X' | 'Y' | 'P'
; t# J" [% G# }% ^1 {0 hFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
4 o& r5 W9 d; \PC Bank -> 'K' 5 b) |/ L5 Z/ _
Data Bank -> 'T' ! _ h7 ?" H4 k! V
, n5 e7 U L. M" \8 ^2 A* ^
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.
O2 e f9 C: l M5 ~# T/ w
, a# X, E# T# a% uRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
; `% ^4 r6 Y4 h9 J4 n
: }% G0 |; a* WFlags evaluate to 1 if set, 0 if clear.
! L& Y% f( H k V3 ]. `
3 l2 a8 I7 f* ZConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
9 d0 p8 M$ m9 i, ^; w* [/ b. s- w; T
Example conditions:
+ {& g9 m: d) L& {5 @5 j
3 N6 {0 Q/ |9 l, T' p# oBreak only if register A is less than value at memory address $0005:
* f8 U: k* I$ M- O2 \$ N) f$ a9 w0 J# t( M* \
A < $00054 r6 m0 a, A2 F# m8 `2 b
. ~( @1 E8 g! Q3 pBreak only if the value at the indirect address is not equal to FF:
8 A' o& V# t2 [0 h% o: A) q2 y3 {) _2 Z! m. K1 l" K
#FF != $[$10+($11*#100)]& p2 D6 ^; R- h1 f- o; I
8 z6 m0 i M# M
Break only if flag N is clear or A is not equal to 00:
1 x2 S- x/ o; T8 _0 Y* D* m7 y4 ]- O. P
(N==#0 || A!=#0)# s6 I" k- _8 y1 }
3 m A; t0 ~- ~
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):4 {/ U3 V6 Y0 e7 ^4 Q9 ]+ U5 a
& U' K8 r4 ~( c: d, D6 G! a- BT==#2
9 ]) G. N9 T5 z) U/ T, w- J, g" T2 R) v! L
以上内容来自fceux自带的帮助文档说明 |
|