签到天数: 1915 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点, D1 {3 H0 y! \ I/ P& l0 D
Conditional Breakpoints
% w% h; i3 X0 z1 y
w4 L1 H" |9 ], G* v/ ^- Q! NBreakpoints 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:, e4 c4 ^7 p; B8 M2 U4 h
) T( q& w% I5 }# D; s" d3 K
Connect -> Compare { ('||' | '&&') Compare }
) C% V) u: K+ g6 O, t/ K5 ~Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
+ K! J6 j' f% m, `) U& ~& p1 c$ LSum -> Product { ('+' | '-') Product }
% i N9 l$ ?# s) n" cProduct -> Primitive { ('*' | '/') Primitive }
# @* s% i0 {3 I- lPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' % _7 @9 @ G3 A1 r' y! J' u' w
Number -> '#' [0123456789ABCDEF]* 5 u6 y0 P7 |! C" r, k7 J
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
5 _& A: D: k9 C0 LRegister -> 'A' | 'X' | 'Y' | 'P' D4 ]8 V7 g# G+ l
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
$ l( Q! g6 C+ T* Q, z( w# f9 Y1 Z K TPC Bank -> 'K' + _- E; U! |2 r" y0 J; t. V, l
Data Bank -> 'T' ) `3 I- _# E% D* U' ]
: _0 t. W. v. Q3 w6 s4 ]1 O" J, VThe 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.- O6 n* [) C2 O) M
7 L, b8 }* O$ G! e4 Y1 [" l% pRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.: w6 {* E+ Y; b# @8 u
+ J- d% l4 o; J$ L. `
Flags evaluate to 1 if set, 0 if clear.$ ], Z% @2 ^/ k5 a7 b
: t \9 a. ^6 a1 m; A
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
1 N9 P- ^+ C3 X5 X6 H$ G& `' i4 z- C2 A" r7 i; b5 {+ H# i
Example conditions:
2 F1 G6 ^6 A- c' H2 V k! a6 F8 o7 d; \
Break only if register A is less than value at memory address $0005:
! d D* z) G3 q% w# O! z# G* a5 T* m( q3 K' N( O+ M
A < $0005- O( u5 L+ q' ?4 n! X0 h% V8 z$ W
" ]( \: q7 Z1 z G- i2 {6 v
Break only if the value at the indirect address is not equal to FF:* Q6 K; u. p) i3 A8 j; S
+ C# C5 E& H: {4 p% X" v# V
#FF != $[$10+($11*#100)]
& G- I- V1 J7 Q3 U3 X4 C5 H
+ o/ C$ q5 X YBreak only if flag N is clear or A is not equal to 00:
" I- h" T s2 q$ v0 v
* r4 N+ x' M( C; G4 _9 p8 c(N==#0 || A!=#0)
# k6 U d1 B# o: [' W6 G! S a! w& O' i7 M
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):) ]' l& l6 ^: m3 J! Q, P) b, _
# |4 U2 \0 f" p9 J9 j" m/ e& VT==#2 & |/ T/ }( F% @' F# T, W3 o x
( g& Z e3 |3 o C; Q
以上内容来自fceux自带的帮助文档说明 |
|