签到天数: 1993 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点: ^1 f( t0 c. {: d/ U% D7 L
Conditional Breakpoints
0 L; U3 t- L4 V; {6 G/ I! x+ x0 I5 v( J) P( y* ]+ b; I
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:
! G/ }/ H. m2 ]* \
, Q" r% t/ Y' o: K( u& m: F! RConnect -> Compare { ('||' | '&&') Compare } " w( S) U7 ^) Z* c2 g2 P, M* @
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
# D' I. [3 j. T4 oSum -> Product { ('+' | '-') Product } ' \: R8 U" J" B9 v1 ~0 X
Product -> Primitive { ('*' | '/') Primitive }
7 I, P# ^+ v5 }# s# e+ p" oPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' - }# J0 F {" s; |
Number -> '#' [0123456789ABCDEF]* . Y$ ]7 i& G: {( x. L5 s2 s! e
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' / F' [, b* }: ~5 x
Register -> 'A' | 'X' | 'Y' | 'P'
4 F' i* F. ]5 s |* S4 PFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
- t( C2 B& {# u% z) w7 M8 JPC Bank -> 'K'
# ]4 T$ c- a. b# s7 MData Bank -> 'T' : ^: R; C C; m5 Q
8 \% n, N( B; v4 q
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 w" | K2 d0 W6 X: U1 Y$ u
. s. c/ j' J# s" G* F# sRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
. F* c9 P' k2 g5 x" b/ k
3 M# N8 t: u- Z; ?6 ~2 `4 {. \Flags evaluate to 1 if set, 0 if clear.+ \9 g+ l, J1 j# S7 p+ M
3 U) C* u+ A+ [; V8 f% h$ q# j
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.; a, R6 U3 g4 u
- W, `0 V: ]/ R! i( O+ U& f: ~# ~Example conditions:
# {/ C9 c( ^2 z2 S2 X- I3 r& r# r# h' ~ C
Break only if register A is less than value at memory address $0005:
4 A$ Y' c1 v# M3 |
% D, F( u; m5 {A < $0005
% S6 v! D# ^' K0 \% [- ^/ y, }" D% r& X: B
Break only if the value at the indirect address is not equal to FF:
* z5 f- c; F g2 @* n
: {& s; \/ ?/ ~#FF != $[$10+($11*#100)]* U5 W( E6 [6 ?0 k
4 G: N: {- y4 B$ i
Break only if flag N is clear or A is not equal to 00:
1 y0 b' p0 E% h" U3 g. k9 }9 {8 f) z/ y8 _ `. c1 Y" I4 P5 G; z' |$ _
(N==#0 || A!=#0)
4 L& X% w5 {; A0 `: g2 a4 ^! G- ]
- w6 [5 ~: O4 yBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):3 D0 }! d0 d) c* D* N- F5 d& J9 b# I& x
" a& T! i/ A6 n* q* V+ ?
T==#2
1 e9 W" z$ }: u- z2 V K2 P7 }) m" G: ]8 [/ k# i' I
以上内容来自fceux自带的帮助文档说明 |
|