升级
  100%
签到天数: 1899 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
) w) Y- z1 {! e# K, H$ p" IConditional Breakpoints: X/ {# c& M1 }/ V$ _8 `
5 c1 j! s, w0 d1 k) d. ~+ iBreakpoints 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:
% _* Y+ f7 Y8 H
9 A+ m. Q l M& @Connect -> Compare { ('||' | '&&') Compare }
6 Y' A8 O$ F# u3 k8 O( ICompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
% D/ w2 R) x+ C7 K: ]' g7 t3 {9 }Sum -> Product { ('+' | '-') Product }
: B' n/ m. G5 u1 y' p5 q( lProduct -> Primitive { ('*' | '/') Primitive }
( H# T0 R/ n3 R) RPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' - l% D% f$ W% _% n& m! K
Number -> '#' [0123456789ABCDEF]* $ A* C4 K1 ?8 _+ X" y: _
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' , ] T# L8 D! x0 q C# Z
Register -> 'A' | 'X' | 'Y' | 'P' 4 J7 j. N, Q9 n* J* L4 `' h% X
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
$ |0 p9 s. j8 k7 UPC Bank -> 'K'
' F" T; Q; C" P L* C7 ^: @! ZData Bank -> 'T'
, |, T8 v$ Q! X+ p' j! }/ q- y" \. i' e; T# Y: D: C
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.
' q; w. c7 }* V' {) U4 @, M Q! j3 A R7 i2 g
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.& p1 Y, W4 f' W* a
9 O( e: ^1 z# G: B4 G
Flags evaluate to 1 if set, 0 if clear.
! K2 f+ ~/ h$ o- t! I$ q( d
}1 i5 H) R, x: ^% pConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.& m5 [0 }& E: ]& Q4 i; d3 M
3 u1 h6 w X* j* dExample conditions:
2 l' W/ q/ v3 x5 C; } C. d V8 b* B9 H
Break only if register A is less than value at memory address $0005:
7 I' e" g2 P2 Z0 L+ q: D/ v
* e3 A; x, D Q, m% L1 uA < $0005
9 L# j M9 Y! O* M3 J$ V
! @+ E! g+ V1 e& KBreak only if the value at the indirect address is not equal to FF:/ o4 e/ V8 s9 H! ]8 M
. V) N$ O$ T! b. S1 w#FF != $[$10+($11*#100)]. r2 P" h" Z$ k V; p0 ^
0 R% K' b8 K2 B) [" dBreak only if flag N is clear or A is not equal to 00:
" i& w; K) i6 Q K/ I+ e% P2 o) A) U, y$ T; f
(N==#0 || A!=#0); k4 s( ~. P% Q0 m) P/ r2 n
/ {/ s' t- O/ W" J1 f- _9 Z8 PBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
3 t) K, D# V' T+ B6 q( N& y m( p5 s) S
T==#2 . t( k- }$ X" b, r' g
7 t6 C/ E7 t- `9 X
以上内容来自fceux自带的帮助文档说明 |
|