签到天数: 2049 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点9 ]; @ ?+ O8 `" G$ v" L
Conditional Breakpoints! P. W8 S+ o" e H) u1 Z$ `
. d( q& b7 i ^. p' {- i! wBreakpoints 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:
, f; G z( T/ @3 \
" Y4 G: e3 g. H( f g& D8 YConnect -> Compare { ('||' | '&&') Compare } ( X7 g: s% S& A6 ]4 z$ d/ T r
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
; v1 s* v5 j; a6 [. n6 i& fSum -> Product { ('+' | '-') Product } 2 p; b- X! p" i2 O4 K3 k: D
Product -> Primitive { ('*' | '/') Primitive } 2 ]! V1 m' e$ w2 r
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' , S* i, U6 k) f1 d
Number -> '#' [0123456789ABCDEF]* 5 Q0 X& i$ T1 @2 h! x2 o2 X
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 8 [4 k( v$ R7 y) S
Register -> 'A' | 'X' | 'Y' | 'P' 6 @/ G0 n% @4 x' @3 d3 S7 g
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 6 Z' `7 _4 p% W+ v
PC Bank -> 'K' 6 _6 [0 V. @' |* _8 G h
Data Bank -> 'T' . ?2 O O! a6 `% _
, G1 G* u, q$ _* \' G; I
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.9 x+ V3 P/ d' {
( I" R0 T( n/ a! l3 cRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
! I* k `3 r* {/ x/ Y8 g ]; B0 J
4 x4 B( F' J" O! ]Flags evaluate to 1 if set, 0 if clear.
) N L/ q3 D" s# l1 B$ y# _
- S) ^" U( ?3 wConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
) s3 U5 E' H8 C( \6 }6 i& W; }. c8 c( f* U7 j1 w, {
Example conditions:
( Q2 p9 p" r& t% h$ W! Q& I* W9 Y7 K9 m f" T) ?' Y* {
Break only if register A is less than value at memory address $0005:
* Q* E5 m+ |$ A j1 z) W7 N7 f8 V) w: v( u. ?. p) k
A < $0005$ z& L' e4 a) r X
/ q' F0 V; q. k/ e9 d+ V
Break only if the value at the indirect address is not equal to FF:" }" ]6 V' A" K4 Q, ?1 \
) G. |; @0 J H
#FF != $[$10+($11*#100)]
& |1 L5 w$ N4 l' k' u4 h4 h
# i: `$ V! c3 {2 Y" U. O4 x' PBreak only if flag N is clear or A is not equal to 00:$ u6 @ {9 X) a) [; ]
" d: }2 A" F5 P% f3 |(N==#0 || A!=#0)3 w2 J2 h0 l5 Z' G/ u9 l E! a3 d
1 `$ a* G7 P; i/ x
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
f( |2 G& U9 X$ Y1 U# R( d8 m, W( i2 L: k7 K# N' d
T==#2 3 s v$ b5 M8 m v- @
" U5 V2 h: m3 s
以上内容来自fceux自带的帮助文档说明 |
|