签到天数: 2002 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点6 Y* X1 G5 q! E, ]2 u- ^2 r
Conditional Breakpoints
+ I$ O' T* r z: X/ q, z
' H1 h8 c# k$ lBreakpoints 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:* B4 n) X$ U# _6 F9 ?1 Y! ^( h' b
- ]6 r3 ?9 s) Y) c- x& M1 f. a( r
Connect -> Compare { ('||' | '&&') Compare }
; g/ r" V. W0 e; ]4 T9 GCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
) h4 G' B! {/ r! USum -> Product { ('+' | '-') Product }
% k# r5 n- p2 \6 y+ [Product -> Primitive { ('*' | '/') Primitive } ! x( }- h! q7 W- C1 Q8 g
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
7 V6 \, u5 {3 r% l4 F/ ?0 U9 RNumber -> '#' [0123456789ABCDEF]*
5 H# i$ ~; d$ y# [* G& u# LAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
6 r1 J+ j q5 g1 m% JRegister -> 'A' | 'X' | 'Y' | 'P'
, T# T5 E4 i0 g1 Q* v. q2 n6 eFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' , `7 G9 A& f$ ?' v7 j$ i7 F* Q. c
PC Bank -> 'K' 4 y( j, _0 L6 z! H- H8 y5 E: B1 p0 q1 }
Data Bank -> 'T' 3 L( K+ R7 E; V$ n: f8 ?
' M9 x+ d5 d% V" HThe 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$ l$ P, |; y& |' `9 O0 A' f* v5 h
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.6 c* A8 P5 X: I7 C8 D" U, h% s3 @6 z
8 R6 B+ K' r1 VFlags evaluate to 1 if set, 0 if clear.
R. c& V% \- o. ]" }, V( X2 N
3 m& I8 F. f2 j, r+ K9 dConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
4 \% Y% s; u2 j
6 {" {2 H/ i* oExample conditions:$ ], f. R8 H5 m- z! {
2 ]! x6 W/ B8 t5 ] G: s k% ]Break only if register A is less than value at memory address $0005:& p! P% \4 z! S/ W7 @5 T) B, F
3 C+ U: u6 L9 }0 kA < $0005
" x$ o7 y8 r4 E% C/ z3 g3 g7 a1 x# Q9 s
% J' o! U" x+ p. J* K% {3 LBreak only if the value at the indirect address is not equal to FF:! O* f6 Y. ~* c4 K/ g4 i
" }( w9 ^% f s6 E#FF != $[$10+($11*#100)]
! e8 l8 A( |! V- C; T# a. @1 f" s% D' U$ a
Break only if flag N is clear or A is not equal to 00:
& x# D" x. X' m5 s2 m- b7 d
; f$ e- C2 G6 \3 O' j0 b(N==#0 || A!=#0)
+ w# d! J" m0 q3 _% e* c
; E: C. i" K. u; T- D* OBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):$ P. l y8 W! F- l1 q1 }/ O
) w( U) e1 d& P6 {( T. f& T* wT==#2
. ~( X! C+ h8 I* N& C K2 ? d$ d, B& }9 r; c5 B1 i9 T: @: Z
以上内容来自fceux自带的帮助文档说明 |
|