签到天数: 1944 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
9 b" Z- w7 h. x& q/ k" p5 iConditional Breakpoints
, {, a: e: e8 \: _7 {) B
8 ]( z$ c l) 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:, Z* n- h6 ?) g( w: l# j
% @# w$ }# G- L( i8 ~Connect -> Compare { ('||' | '&&') Compare }
$ V; d$ M2 Z) q2 Q% x% f0 `5 GCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } 8 }- c* l0 M* q
Sum -> Product { ('+' | '-') Product } 6 |. ^( R( q3 B% N
Product -> Primitive { ('*' | '/') Primitive }
0 t3 C0 \ ~7 D! sPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
* E0 S. F1 `" `8 q/ Y9 XNumber -> '#' [0123456789ABCDEF]* / Y" e% f; T- S/ l: d8 o
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
$ B7 a' W, p4 m" q0 X' i0 U( i: H* _$ ^Register -> 'A' | 'X' | 'Y' | 'P'
5 `* g3 t% F/ H' L5 FFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
/ B0 Y8 [( Z. R# u( bPC Bank -> 'K'
6 ]* o0 x( I5 z4 {. {Data Bank -> 'T'
1 y; m' a2 j V B( _5 d8 t
) @2 \! @5 Q- b1 l# mThe 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.! E: J0 o- Y5 g2 E4 b* u
* Z! S- Q0 a# `* C; y* x Y6 @! E. F3 `
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter. Z! p2 H% m3 `
0 h5 K1 y+ ^) \7 @6 hFlags evaluate to 1 if set, 0 if clear.
. N' i- S0 ^0 t1 Y% `1 N8 c
3 _& M4 X" \ \5 _4 ]) h+ z. G8 q9 QConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.# M9 r8 k2 W$ s7 G. `
0 y: w8 p: b6 o! T8 P
Example conditions:8 x# D& N+ F: A1 j) @1 w
6 f/ d! t' ~# }4 e8 F5 @1 sBreak only if register A is less than value at memory address $0005:
. K: f5 Q0 \: x9 s' Y! M4 o9 B4 T3 \/ ^
A < $00055 E0 u4 R u* C1 q3 n. E
# d0 |+ }% b) v$ ^" FBreak only if the value at the indirect address is not equal to FF:& y. f# B/ m1 m8 O; P- U
" X: G8 m. B1 m0 V, v
#FF != $[$10+($11*#100)]
4 l) U% C8 f# o; a( i
) b0 r& T! M( B( o! k8 O$ ?" ?Break only if flag N is clear or A is not equal to 00:
, C- R4 J% B; k* j- }6 \
3 M+ m ?7 r( L) L7 s' h(N==#0 || A!=#0)- S4 g' ]0 _/ V1 r e
! h+ r- c/ i* z+ v/ r4 K: Z$ qBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):: F! @& c. r% I# v2 j
+ U( G: Q6 |" @% T+ J6 }
T==#2 7 q& p3 k* K2 Q4 T) k- [
0 O3 s; G* [+ X
以上内容来自fceux自带的帮助文档说明 |
|