签到天数: 2034 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
: z3 f7 C3 _ _5 y. WConditional Breakpoints3 r: H2 G+ i( K% K5 t6 O3 q$ S
! x; D, J6 J4 j4 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:9 |. _: ?& K1 b' M5 h" |* C6 s( \
$ q- t: k& w" l% DConnect -> Compare { ('||' | '&&') Compare }
. }: u- h; p( G+ ?+ zCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
9 m! X4 j; ]/ d, V$ m; d3 v+ a+ l9 eSum -> Product { ('+' | '-') Product }
' Z5 f( r9 G% N5 U$ XProduct -> Primitive { ('*' | '/') Primitive } , a) L) P' ^' P% R9 \
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' ( N Q J8 g1 T8 O% j
Number -> '#' [0123456789ABCDEF]*
* w+ c& I7 |/ p6 p4 C& x9 L; IAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
. y+ u0 T# c5 ~+ C/ jRegister -> 'A' | 'X' | 'Y' | 'P' , `5 @% R3 {( { y! O1 B
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
8 N3 V4 t% n* t% H" `9 dPC Bank -> 'K' ; [' X- K! A: h+ c
Data Bank -> 'T'
# \! t+ V+ u! O/ {* T' K% R) O& u8 r2 o4 Y
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.* B, j& ^2 j. V4 x
8 V- E! k, l. X+ N; v9 ARegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
- v6 E: j) ?$ J+ A5 G# z0 x* i/ A$ ^: Y. u6 ^5 ~' l
Flags evaluate to 1 if set, 0 if clear.
* N. `8 P) Q% j* y; A L
O4 U0 i) W# H4 `/ YConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.8 f- A" L9 b# d# R
* J1 ?/ X b" `$ `4 T$ F; {Example conditions:+ I/ B$ l+ M/ m
" `% C T/ a, o8 L- lBreak only if register A is less than value at memory address $0005:' E( R3 p1 b' w& i/ E
" c( G, O) X4 l9 A5 X% pA < $00059 s W+ O; r: V A4 Y& |
, D2 ^8 j$ o0 L) \' W+ B0 L/ T ?
Break only if the value at the indirect address is not equal to FF: E7 C" R1 {5 Z$ d, O, c9 c( x
3 I9 ?: _. }* s& F1 g6 ]/ `- \#FF != $[$10+($11*#100)]
. T2 l! m2 b( {
. X8 u4 ^% P/ P/ r' U, BBreak only if flag N is clear or A is not equal to 00:, W& |( N* |" g; X3 p" v' @! W- [; l6 \
3 p) j5 s5 Q% T2 O& A2 T
(N==#0 || A!=#0)
; i2 C. e1 W& ~* b/ }& N/ A+ A" c* V5 \" I, R
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
! F4 v+ y7 U! g; p; ]# g- k5 c V6 q. B& S+ y: ^" r1 e* P8 I
T==#2
5 b! C4 u3 W0 Z: ?% j- v; Y8 k) D9 t- u2 r7 B* w
以上内容来自fceux自带的帮助文档说明 |
|