签到天数: 1916 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点0 E2 x% v0 a! A' I8 s2 k# P+ I
Conditional Breakpoints
$ e) _2 @9 U: V' g% B
! N0 M+ L9 E: [3 G7 d% @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:& Z( |3 u" H: L+ l9 g8 r
g9 H$ f) i4 i+ \ BConnect -> Compare { ('||' | '&&') Compare } 5 g- d5 r' b" @/ M; H
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
& a5 I/ @4 c! e; G. |6 TSum -> Product { ('+' | '-') Product } j+ f' _. k. z0 g @# G
Product -> Primitive { ('*' | '/') Primitive } & [' f+ u% |& E3 k8 \) o
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' O0 V9 @8 H1 I( P
Number -> '#' [0123456789ABCDEF]*
. _ ~! F0 r, M: `' \' `* oAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' 0 V& c E$ P0 o* C
Register -> 'A' | 'X' | 'Y' | 'P'
$ u# |& B/ ?" C6 x: k+ ]# o9 V, iFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
% [2 ^2 U6 g% D: M, r! ^/ YPC Bank -> 'K' 2 a9 ^4 p! S' E% w3 `0 Q9 |
Data Bank -> 'T'
4 ^3 @. J% G3 y3 O: F9 B, R% c6 O
: W. M# Y9 a. g! R& S! G1 L8 @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.
8 n/ I% O! a* V' F' d: R+ G" o# g/ A. H+ T$ k' H N
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
/ s" b( X* s* ]$ {
# S6 ~; \# O0 \2 a" ^Flags evaluate to 1 if set, 0 if clear.* b t9 V) Z9 y7 s4 `: b2 h
) d2 k! T5 b. o$ U7 l$ RConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.; s- E& F8 {5 f
) j. G' x2 q6 Z0 Z/ Z8 y7 I9 T. {. f1 vExample conditions:- Z& q, }; q& U" g/ f! b% l4 y* N, U
" N8 X" R; _1 K8 x6 i3 G7 }Break only if register A is less than value at memory address $0005:* y \) m% D/ P' N2 x7 ?
/ y F& A+ c! Y4 |8 x
A < $0005/ w9 \5 O' ]' z7 U5 r. Y
+ |* Q8 P. ^% ~; nBreak only if the value at the indirect address is not equal to FF:' N5 M6 M6 ?# O, i
- @7 A& p; n% V
#FF != $[$10+($11*#100)]
- Z ], y F# n d/ L6 ?7 e( ?, W& M2 o& L
Break only if flag N is clear or A is not equal to 00:4 y4 S }, M ?" a
} f9 s% z9 K& {- w3 v8 d(N==#0 || A!=#0)/ s6 k% @6 D+ G) {/ }/ N+ @5 T
; q3 b% \7 D$ h: e8 e8 QBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
% b* L# E: A7 z, b2 `1 r: @* f4 ]
" i, V0 k% t, wT==#2 9 g8 F# @4 P. ?" l1 r! l; \3 X
5 L p- f/ | Y以上内容来自fceux自带的帮助文档说明 |
|