签到天数: 2190 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点) E. r# `4 d" z. p( J
Conditional Breakpoints
* C4 F4 @/ }- c& W; {) ?2 q- A# E& N2 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:
- \4 S" D% W0 W2 E* Q. I. g/ `5 l4 a0 {7 a4 p
Connect -> Compare { ('||' | '&&') Compare } , W9 e9 Q. N+ B: d; K) c! l9 s
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
+ H( G" a1 Z" y( B4 nSum -> Product { ('+' | '-') Product } $ _+ [ F% @: g' V/ N3 q
Product -> Primitive { ('*' | '/') Primitive } 3 U/ Y( e. u. p
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
) U, a8 S8 r/ u3 |$ x5 ONumber -> '#' [0123456789ABCDEF]*
+ @: N% M% Q5 w$ ~7 {# x/ QAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
. e- k! N2 K: H+ {Register -> 'A' | 'X' | 'Y' | 'P'
7 {6 g2 H' L& g2 V6 p/ UFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 2 a/ d+ s4 h2 ^5 N+ V
PC Bank -> 'K'
. N0 W( P6 @+ k5 r5 E1 }* l& QData Bank -> 'T'
L. r! p& m8 ?8 m
, U( u2 s2 w/ _/ X2 G- 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.2 _2 T9 F* {$ S- N* |4 Y8 @9 W! x& m
( j- k7 m. ]* Q# M/ J2 @/ NRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
, C" u8 f; |$ ]4 l& R, G" I7 r, x. l0 u( \; k
Flags evaluate to 1 if set, 0 if clear. O" o5 }5 P" Q+ L7 e
' Y7 `& b; ]2 j3 C- [6 f
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
' n" I6 H* ?' Q Z3 {
; @7 U* M$ A7 R j, YExample conditions:* S4 ~% k# H$ r) a9 u6 p8 v
/ W. R A n' l' x4 s* I
Break only if register A is less than value at memory address $0005:. G _7 d* C. w4 g3 [
1 y$ h* I' o# ]$ Q0 J, c- _A < $00058 d" c8 D4 _' Z0 z9 f0 @
l0 Q5 x+ }2 D2 a! WBreak only if the value at the indirect address is not equal to FF:" V& N7 L! D# Q4 k( M! y5 f
5 ]% B& f( y' @8 J5 T#FF != $[$10+($11*#100)]
3 d- \3 {) ]! v* ^1 m5 c* Y: h% M$ O8 G- u8 o$ z5 ~ g3 ?
Break only if flag N is clear or A is not equal to 00:
- j5 ^) P* O0 S1 \) t. k" H/ q, {# G$ \1 o! S( w) e9 a
(N==#0 || A!=#0)% e$ m" ?8 Y H/ ]7 @$ Q
6 j" r5 X% B* e! F0 f6 T* G4 KBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):- Y" ~& x' r% V& I' x6 [
n* U6 ]# h8 N# {! Y7 m2 KT==#2 2 I" f' L$ x4 \ O1 h) i3 I
7 X' m3 ^1 i. J3 ~* \" V
以上内容来自fceux自带的帮助文档说明 |
|