签到天数: 2115 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点" C# X9 H; z. q5 k, Q {* B Z* y
Conditional Breakpoints
& z4 V7 W( F6 S5 y8 p. ^! P2 W% I7 l, w4 h
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:% ?8 E- Y: [6 J2 s! W+ U. |
' y" S% y& ^8 E# L6 ~% H5 o/ w0 SConnect -> Compare { ('||' | '&&') Compare }
" j( v) t% K+ X2 ACompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
( F6 Q) |9 q2 b: b* HSum -> Product { ('+' | '-') Product }
v& h: v8 W, h! U DProduct -> Primitive { ('*' | '/') Primitive }
4 }, u, v. a- w4 u2 D! b+ c$ oPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
' r3 g$ L$ a3 T9 h. q% aNumber -> '#' [0123456789ABCDEF]* 4 i) N' F& Q" r4 W; _5 ]! u# G* ^! `( d
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' ! j7 w0 R- Q! K$ _8 I) {9 U
Register -> 'A' | 'X' | 'Y' | 'P' 0 p4 I, D& L: w
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
4 q5 L2 E1 j3 w" VPC Bank -> 'K' & G1 U9 U( k( A! [0 `
Data Bank -> 'T'
- V6 ]. R- S! k1 y# b0 d3 B- `* Q
% |- |) k. A0 _8 N V: W. OThe 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., H- h/ S' D4 t, k/ P+ Q
# l: \$ l. V9 t1 g) {6 p5 h9 TRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.& n, H5 b% G; f6 C% y6 w) C
' q; k: F. V. H7 j! T7 ^/ OFlags evaluate to 1 if set, 0 if clear.
% z8 r5 E5 W/ s2 _. k7 d% l# f; t5 A+ X; [4 v0 K; |; V! Q
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
. Q9 B( u2 x1 H; v6 n, }
- l- B! v+ G s5 h! fExample conditions:
' U: E# z# m- d) E1 e
% V3 S) `; y& m! O1 r$ ]8 MBreak only if register A is less than value at memory address $0005:' J' G1 `# Q- J. L
, A/ b& o/ G# sA < $0005
$ i& v+ k4 P5 ?) C
7 J! N3 h$ v& CBreak only if the value at the indirect address is not equal to FF:
8 @% |" {! P' W+ ? e0 u+ Z, i. t# _5 V' l$ A. p
#FF != $[$10+($11*#100)], u( g8 ~) C# V! R4 E' j7 D
# k* q1 C, s' j x
Break only if flag N is clear or A is not equal to 00:
9 N9 A9 x0 A6 C3 W2 R0 o" q$ B" [/ o4 z
(N==#0 || A!=#0)0 e# N% {8 h) @" z5 O+ n
1 i" J- k, Q4 _0 [7 _
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
8 u/ V4 w3 V4 K8 E4 k, m. _! k* m( Y* q6 L- D* `0 L4 B" ` \
T==#2
( R$ b5 Q0 T; B$ V @( ? v( ~% Q7 p) ]! D, T9 b+ n
以上内容来自fceux自带的帮助文档说明 |
|