签到天数: 2092 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
8 } m( ]" M% m! EConditional Breakpoints
1 O' o! b6 \7 S$ f1 c
9 Q7 W. d2 B4 j+ TBreakpoints 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:
# B. b/ j. g8 `* Q: F5 T; W( o5 o1 `1 |* O9 e9 V# o
Connect -> Compare { ('||' | '&&') Compare } " \# }' a* P/ L& Y' _7 e3 {
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
3 f( @, c* m4 H, Y3 J# ISum -> Product { ('+' | '-') Product }
: l6 v1 N7 \9 @' R" u$ m. {Product -> Primitive { ('*' | '/') Primitive } # V# w7 l9 H# Q1 {4 N
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
# K* D% P K- b1 a6 F% S& tNumber -> '#' [0123456789ABCDEF]*
* t3 [7 o7 F9 M1 \" G4 ~ W! }Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
5 e8 `- Y2 P: u3 N, e- vRegister -> 'A' | 'X' | 'Y' | 'P'
* z$ c2 s0 Z/ A% Z* n1 GFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
- ~9 C& e2 q7 S1 qPC Bank -> 'K' ; K$ R: i, q! o# b8 E
Data Bank -> 'T'
3 ^' F0 q; i1 |& S
- M! Z3 j- Y% b4 r3 N0 N, U2 X8 rThe 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.8 K) U- v) J% k( B9 C6 T4 p' y7 I
$ F2 D! J5 ?, p' h- F& l/ F3 O' U: s
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.! ]) ^7 G8 J9 z8 Q+ ]
& A: p$ j; w+ L% g" B
Flags evaluate to 1 if set, 0 if clear.) d8 ^- j6 U' `4 N8 D
& B Q8 H+ w' Y6 P {Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.( F1 _" @& T7 H5 e
) t# N0 r) y7 B' UExample conditions:" o% d4 ^ g, V* E) J4 |7 J
* d+ q1 i2 S: ~) MBreak only if register A is less than value at memory address $0005:+ d. J% {1 M" m* A. H5 M/ K
% y5 s: j$ W9 R7 P' |! JA < $0005, @+ W7 D% [! x" ?( b% B; d+ k
' r' h3 n, F% w. V; ZBreak only if the value at the indirect address is not equal to FF:% c* d9 d& T. V/ L
% `1 c+ J8 C7 R# w! C/ u#FF != $[$10+($11*#100)]
9 P' g! F$ u' i- L( G9 }. ~4 s' q" [: x5 J* W
Break only if flag N is clear or A is not equal to 00:3 m. z4 [) J: c/ o2 @% n
3 S$ S9 T* ^& O0 z7 u
(N==#0 || A!=#0) a7 p! Y% j0 r( C8 f- f" y/ c9 j
, s1 u6 @( k, I, F% E. H$ m% r
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
. T3 _: Y4 i2 W9 N) Y
/ D1 D% G4 {6 R: @* W# @/ ?T==#2
& R0 E' F+ G+ A" w7 y' D. S
2 m$ C9 B8 A8 \1 J8 G6 Z以上内容来自fceux自带的帮助文档说明 |
|