签到天数: 1910 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点3 E7 F1 f4 i, A& }& l
Conditional Breakpoints
; o. Q* X" A( m1 r$ i' n7 d4 [$ N, `7 [& R
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:5 u8 @& E* B/ |- N8 n
, \* j6 x2 [* y" o# J. c& {
Connect -> Compare { ('||' | '&&') Compare } : f$ I8 S* {+ Z& [, u1 ^! c3 L
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } 8 p7 q9 Y0 u# ~9 D) R2 {9 b! ~) h
Sum -> Product { ('+' | '-') Product } - a8 E; Z" F' u1 t8 ^
Product -> Primitive { ('*' | '/') Primitive }
0 G, d, k% u; ePrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
6 b( X' [2 H, L5 A3 M8 eNumber -> '#' [0123456789ABCDEF]* 5 m8 A# M; Q; D4 y L5 S! J
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' / G2 q, u) }( M. e
Register -> 'A' | 'X' | 'Y' | 'P' % l5 g- t4 u3 N( K6 x
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
T5 f0 m$ g7 I, K/ _PC Bank -> 'K'
( q+ p4 n4 F7 q3 wData Bank -> 'T' 3 b' I6 [ @0 r3 D/ I
{. M7 {8 W9 A/ h% VThe 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.7 m0 s. o1 m9 o& v G9 b6 @2 i. Q7 W
" w5 P p& Q( b+ tRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
8 s! D" R1 w8 Q- b. i. P* o. E7 t3 z4 i6 i9 H
Flags evaluate to 1 if set, 0 if clear.
9 m' ~; S# M! m. A
; p2 _3 t/ [4 m( s! pConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.- B* _: L$ `$ x7 b. ~
% H6 ^0 K& ~+ P7 v3 y- v7 e2 xExample conditions:
S7 o) G& I- ]# Q$ B
0 U7 B$ h5 B# DBreak only if register A is less than value at memory address $0005:
. e% n8 u1 E9 E9 H1 w' i$ m' B- ~9 H2 B
A < $0005$ ~) _0 y" X6 G" q; r* g t
' G9 v! w; J* k2 l: w: s+ H
Break only if the value at the indirect address is not equal to FF:
" T: ^' O. A* H7 G, P# f. z* W0 y% F/ B* a8 K& R8 ~
#FF != $[$10+($11*#100)]
4 ^5 T7 a1 `2 D' u* K y
+ _0 h/ O( ?( j3 ?9 `Break only if flag N is clear or A is not equal to 00:! P" p1 C4 d. c
$ b3 P) T# B `' X3 _% f" u
(N==#0 || A!=#0)! Z, w9 y- T; ~
3 J+ B% c. O. k- c+ rBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):- H0 i' x+ ^! n* y3 }" k4 V
4 W2 [& w) E! M3 g1 I4 }! }
T==#2
2 ]5 d- Z8 s4 z; M0 |9 \! m- {* m, b! g: l1 y2 m" q7 z
以上内容来自fceux自带的帮助文档说明 |
|