签到天数: 1888 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
. r6 V, {. }; |Conditional Breakpoints
; ^' o% K( \; B7 B' N0 D, |9 r* ]$ B6 W5 [
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:
; Z4 p) o, z# ~% Q. n; T+ q) |8 m" y P
Connect -> Compare { ('||' | '&&') Compare } / r, a6 n* v1 T+ a+ A1 }+ e( u
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } $ v4 C) Y, F2 S$ W' V* P+ Q% C2 Z
Sum -> Product { ('+' | '-') Product }
( l9 h0 _* X% ?2 ZProduct -> Primitive { ('*' | '/') Primitive }
! |) [9 W" `3 Q( WPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 4 e% P- s" ^: U! l0 I/ k# R6 j
Number -> '#' [0123456789ABCDEF]*
6 L. P) y% u; m& I8 d3 pAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' % p: N$ A3 Y2 p8 [
Register -> 'A' | 'X' | 'Y' | 'P'
) C- s g# n$ y; y- f# i+ hFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
, Y& \6 B/ c; E# }, KPC Bank -> 'K'
$ {, j, k# o. L+ CData Bank -> 'T'
5 ?& J/ `) ?+ W: n# a
0 S3 b5 t8 O- r* {5 F' A; ^( PThe 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.0 M Q4 A! i, B3 c2 R, W
$ j7 m4 n; `) @! B! L* C$ |+ S# p
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
( ^2 x$ a( w$ m. F! B
* ^4 G4 y. E$ ?! ^- F8 _: l3 nFlags evaluate to 1 if set, 0 if clear.6 `: d2 P! s% b
& v! R# I; P' J0 { r
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.+ J- r9 |0 D, G3 b i9 X' {
B4 _$ k9 `( s2 ~: M
Example conditions:
, k& d( v9 Q6 S3 A1 x" E4 H6 \3 s- {( C% G% c2 ~5 W, ~
Break only if register A is less than value at memory address $0005:7 P7 t8 F! ^- ~+ a' ]& {, Y
/ K" o: E; x% A) y1 SA < $0005
3 i [. B1 t; Z% G1 ?1 Q6 {$ b* T8 {. I
Break only if the value at the indirect address is not equal to FF:
7 |6 @8 N$ C3 U* C3 m) u; ~5 k/ e8 F% C1 k
#FF != $[$10+($11*#100)]( W) v8 [7 W: z/ l7 s% j$ M3 [
; [# v1 G O3 SBreak only if flag N is clear or A is not equal to 00:
9 R D. X" T" V1 n+ D$ w4 f% B* d7 S
(N==#0 || A!=#0)
9 R- C1 K2 k# ]: u7 @% k6 K
* t: v# g* @4 v( f# N. w% l* i) EBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):6 ~/ Z0 a$ Q+ e- I, K4 S
3 t, @0 |( P" y5 k' v P# b l+ ?
T==#2 " x! `- Q3 v, O% `8 N" Q( c
+ B% D7 w4 C6 z( k, ?# S1 a6 }
以上内容来自fceux自带的帮助文档说明 |
|