签到天数: 1992 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
f: h& R. f0 d- ~/ p; |2 `* }Conditional Breakpoints1 n/ A% i5 g9 }( P
' _9 G' O5 P. }& |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:
9 i/ C3 t/ c5 i4 G( Z/ `% h. |, X* _6 U& M
Connect -> Compare { ('||' | '&&') Compare }
a1 J/ o( @& {Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } 7 X' W1 g* {: X' J
Sum -> Product { ('+' | '-') Product }
. T$ H1 h1 w2 R/ n K# N0 g$ DProduct -> Primitive { ('*' | '/') Primitive } 1 I5 n4 L. O8 U6 E; Z g
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
6 |+ b6 b8 ~- Q/ p1 N. q4 gNumber -> '#' [0123456789ABCDEF]* * i4 E/ ~# N9 R% E( S. b$ ~. j' f
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' ' R5 \9 b- L5 a3 O9 w8 M
Register -> 'A' | 'X' | 'Y' | 'P' 8 \- w) [' v1 p/ `4 W
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
* i( ` n7 t/ vPC Bank -> 'K'
# L/ }6 w3 X( |7 L& [. MData Bank -> 'T'
- P- ]- S, A: `3 I; r, M* c; f0 V+ [9 Z7 ^3 k4 `, t2 Z
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.
1 m0 _, x0 I6 O+ A2 ]8 H9 i3 S/ }* r' Z" M% \
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
& s; l" x' L3 V; {, `: B. Z+ @" M9 v. ^, S, G0 ?
Flags evaluate to 1 if set, 0 if clear.
[0 N) q; ^9 t* B1 R$ D' m# X. P( ^* m# J' T
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations., [8 `5 C. N4 E' a x7 r
2 N1 ?: d# c2 Q0 y4 p0 JExample conditions:
, H7 p# z( [; K ~ Z9 u1 T8 w( q) |8 K/ D: l4 f" k
Break only if register A is less than value at memory address $0005:
4 ]% R: a& c9 T; K) e+ k7 m" N" E" W6 e8 L* p9 \, T& \
A < $0005
, ?. B$ A& g; o% y/ @! @" n
; [6 s) o# [+ h$ [( tBreak only if the value at the indirect address is not equal to FF:
5 e, f' q/ H6 m, @( L( K& T/ `0 m: L! t+ |
#FF != $[$10+($11*#100)]+ R+ n$ x# J! ]$ G0 L3 c
- D4 s) Q, O8 h2 [# c% i7 J4 @6 MBreak only if flag N is clear or A is not equal to 00:" j+ L, _" t/ q- P4 \3 }4 {
# P9 z6 u& T6 y! T8 Q; \2 c* ^(N==#0 || A!=#0)! e m: {8 n! O
% U# @0 r7 Q: `8 B) a& v% b
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
8 G" V" `- S) l& t3 C4 w) X: ^- _) l0 i& Y5 X3 A
T==#2 $ K& [1 M" X# J0 K
s5 T( W0 _. D- L# J
以上内容来自fceux自带的帮助文档说明 |
|