签到天数: 2150 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点5 ^( K" v; M- l; y; o% M8 o2 A
Conditional Breakpoints
5 c" n, e! w& X* r4 ~5 R4 }# J: | 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:
4 i. f" J" {+ G: {# U* P5 @# ^" u2 U! j! k% P3 o, o
Connect -> Compare { ('||' | '&&') Compare }
! r' I2 K8 w+ N" t+ W% uCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } , Q7 o' p3 F4 e" ~$ C. d
Sum -> Product { ('+' | '-') Product } 8 m* b( ^; W4 x
Product -> Primitive { ('*' | '/') Primitive }
# [- V& q+ u& \0 qPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' # r' |" ^3 j c& H8 y' S
Number -> '#' [0123456789ABCDEF]* * F7 a# ?( o* M1 o6 O! g
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' ) b* Q! N' L3 K A9 {/ n' R
Register -> 'A' | 'X' | 'Y' | 'P' / \4 g& ]2 x1 S* p2 I
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
# P1 [8 P+ P: bPC Bank -> 'K'
( E, S& G+ f: K2 cData Bank -> 'T'
. \6 s7 y( a( @ I# `
/ D. L m3 n/ \- e! M* u$ RThe 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 {7 P; j, ]' i/ A* C% {; O2 N# j! w- ]! i4 j. u
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
, f9 ~' d6 Y' P% }" r0 T( O. Y* F2 R/ M% ~6 o) q* G
Flags evaluate to 1 if set, 0 if clear.
- m5 H+ `8 c8 E4 {: v3 z K2 ]1 ?# l) ` ^
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.6 }: s( H9 d2 e6 {3 Z8 C$ x8 B4 P
?) n0 M! x: h) N
Example conditions:
8 r- N& k6 Y( o; B$ i6 Z2 I- a# J5 { q, V! j
Break only if register A is less than value at memory address $0005:% i% j# J: ^ A. p( g2 @
# u% ?0 Z I; v8 N: D; x: z
A < $0005
R1 c; C3 }. f% N: L+ F# h$ y; \5 i' t- B- W5 I
Break only if the value at the indirect address is not equal to FF:
- N t! ?7 _; n$ y, S+ A. V1 E5 g+ z, |2 w& P$ f6 e
#FF != $[$10+($11*#100)]& f4 X5 f, \1 v- `8 `
! V, \8 B; a- {3 U! w0 F. e# x4 h7 FBreak only if flag N is clear or A is not equal to 00:& ^: S2 a& u* O1 D) [+ w# T
) p6 f3 q: |1 w9 k9 u1 Q7 H* r$ N3 [(N==#0 || A!=#0)) d! S% v( i$ @+ `2 ~
* ?5 a* S0 \ m( {, `
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):1 `# B. M) E( Q6 A" l3 w8 v
8 w5 _4 t: O2 _1 i. YT==#2 ; B+ }: L6 o7 X
$ P' G4 x2 Z3 _+ s3 E# x
以上内容来自fceux自带的帮助文档说明 |
|