签到天数: 1769 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点! C& C8 l R* k g" J4 t' _1 n
Conditional Breakpoints
y- T8 P- }& j) Z' S5 y. q9 M% D" a
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:
' z+ j: `) j. ~- v+ V& L8 S9 C- |! o
9 A; [# \! @& N7 I/ WConnect -> Compare { ('||' | '&&') Compare }
0 E+ I, p, a, p9 G G' ICompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
2 }/ x/ m* M9 q- Q' m- RSum -> Product { ('+' | '-') Product }
+ B* E4 E+ s$ u- IProduct -> Primitive { ('*' | '/') Primitive } 2 V0 N* `- M" ^+ o7 r
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
9 O# c$ l; F% b/ \Number -> '#' [0123456789ABCDEF]* ! _# W& E3 X# n$ b4 y ?
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 8 w4 \- z! W% k7 G( w
Register -> 'A' | 'X' | 'Y' | 'P' 4 a' L6 U% H: ] s. y: U7 q8 U
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' $ [) m! E' R: M, O- H5 v
PC Bank -> 'K' 3 W c/ H) r: u' @! A
Data Bank -> 'T' : @; A( l. ~! Z* I
- U/ ^" _# @ E& V' ~2 X" `0 g
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.2 Z* {& \/ F* @5 g( G; H
" M' ?+ d. D7 p7 G0 k) U9 x
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
+ U- j; y3 Y5 ? \4 e4 P' j) f) t; I4 `1 s8 X
Flags evaluate to 1 if set, 0 if clear.
8 u2 O+ ^5 Y) P3 y$ _ `/ o5 U# a$ K9 |3 f& ^1 ?$ Y, ]
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.7 K8 l: B: Q+ {. }2 W
/ U3 ?9 T+ ~, \) t
Example conditions:
- a8 U- Z) Z8 L$ G- @ j7 L
0 O+ U m$ ?6 a$ n8 D3 bBreak only if register A is less than value at memory address $0005:9 i0 t* ^$ b% I# p- v4 F
0 F: A' @% L% C; OA < $0005; {- d& J" u+ B/ O& g4 ~3 O
% h$ E% \( K, S" }2 FBreak only if the value at the indirect address is not equal to FF:% B& u1 I8 @' O% b0 [0 ?
, d% }! f4 r( W2 C$ R) K) F
#FF != $[$10+($11*#100)]3 h' g) g6 k+ @6 ^
% ?5 R$ S2 n, G* |# QBreak only if flag N is clear or A is not equal to 00:& h% Y/ P$ {6 M* n2 v) y' A& m
. E; y, B0 K7 ]- I
(N==#0 || A!=#0)3 V0 v b+ B, u- r0 i
) l) i9 K8 r( e5 Z! D# E1 K, r$ b$ S' DBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):( k/ N3 {4 y5 D; a4 @1 v3 a4 V2 b5 d b
- f2 I8 o$ r- } r: \: vT==#2
7 `4 g$ A: E# B; A. ]& f
4 \+ g0 C- T N5 f/ g5 M j( M以上内容来自fceux自带的帮助文档说明 |
|