签到天数: 2028 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
) n/ Q4 J0 w% {# aConditional Breakpoints
6 c7 ^. ^! ]+ t6 r& k% g' q6 C0 w; T* y' ^; _6 w3 e7 f( k3 q
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:
* |8 v$ }7 X7 C \ G3 k' O$ x0 x A' T9 C2 A$ a' O) j; ]
Connect -> Compare { ('||' | '&&') Compare } 9 q O2 u" H6 G3 m( `: B( U
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
( P: X" c# M5 _Sum -> Product { ('+' | '-') Product }
5 Q( m. A5 Y1 ]Product -> Primitive { ('*' | '/') Primitive }
0 \+ A/ p, F! F$ ~& m- H% C5 jPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 5 j) h& b! m- Q" \1 [9 J
Number -> '#' [0123456789ABCDEF]* & F$ i6 N) j2 |
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' % ~; I9 H( e. f/ k; p
Register -> 'A' | 'X' | 'Y' | 'P'
9 \! N! E6 l3 ]& P$ iFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' ) |: L- o2 X- j K
PC Bank -> 'K'
: L0 N$ A4 ]4 g8 X# aData Bank -> 'T' & r1 P* s) @3 O) j; N) i
% l/ o3 U- n- _. d! a* t
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.* c, A7 d/ I. D" y) B
; L! k; y* w* B, tRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
0 t: F4 [3 |0 q0 b$ T# P/ ~9 v3 o+ U
Flags evaluate to 1 if set, 0 if clear.
; x# l. }0 w4 J6 b, f* K: o( G$ m' J
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
' @7 J' G6 `8 q7 g q r B2 }" L/ v
Example conditions:: g; x& l v( m4 }2 X7 T2 ?6 D
: r9 B- `; X; N; _Break only if register A is less than value at memory address $0005: b7 Z% X. L3 S6 J/ I! o* [, O
4 i' \- i0 P2 T# |8 oA < $0005
" h2 N! {0 Q6 k* P5 O6 Y6 q9 m1 i# p7 n. p9 c
Break only if the value at the indirect address is not equal to FF:* i) G- ^7 y2 L% Y7 ~
0 t5 [. A& p- l
#FF != $[$10+($11*#100)]
' B/ T7 F2 v( A* A; T0 s8 G4 M' W+ i0 {0 X# E
Break only if flag N is clear or A is not equal to 00:; x' j) M+ }1 s& e' k# g
9 |1 H# |9 ?- c$ p$ @(N==#0 || A!=#0)+ h; ]* l7 L+ l5 _! @
8 B$ d9 Y- n( f5 `: N+ P& CBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):: E0 Z- k4 R- T3 l" v; Z/ K4 i' ]) }- m
6 y; G9 _; d4 l
T==#2 , {; M2 n! A7 |5 G: Z& K
+ _& c4 v( M! N/ W. a6 x以上内容来自fceux自带的帮助文档说明 |
|