签到天数: 1889 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点4 N3 m( q% ~+ q! x
Conditional Breakpoints
$ p2 l7 o. t: l" x9 y+ E" A/ L0 F3 K6 f% i& C' D [$ K7 X
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:
1 Y. f4 x% E. j9 g
: Q( n% q7 k1 u2 sConnect -> Compare { ('||' | '&&') Compare } ! {4 b K* T7 `( | f5 w
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } # N r/ {3 l$ Q* [% M4 ]* o* F/ v
Sum -> Product { ('+' | '-') Product }
9 V! O) D* E5 U( H# P" b+ GProduct -> Primitive { ('*' | '/') Primitive } 3 h+ u) k# q7 {: Q
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 2 c; k$ N3 z) C9 t) o7 ~
Number -> '#' [0123456789ABCDEF]* 5 F7 t- j9 A9 N
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
$ W" H! r' X* R+ g0 b( k2 tRegister -> 'A' | 'X' | 'Y' | 'P' " V2 k7 G) P6 c/ B) x. i" [
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
2 b5 y: | `0 L! x$ n xPC Bank -> 'K'
& c+ S; a' D5 j+ J3 P5 M3 aData Bank -> 'T' $ v+ ~+ k' {- V7 _
3 ]. y4 Z' e# h& u
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.- q0 ~$ S% T& _: Y
! T' C! R( m: i8 XRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
' e$ A1 Z% n! g8 f; S C5 p% H9 v+ t8 v% [# K+ ~& ?% l
Flags evaluate to 1 if set, 0 if clear.
; ~4 `9 z+ Z; A* r! l6 u$ l
; x% D- s! Q8 q& [Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.0 E; Z9 f0 y1 t( V7 R
2 y% g; T4 A) }- r# HExample conditions:
# ~0 r1 F) [2 ], l9 \( u; B+ U- u% p# X# i& ^; W. k( I" h( C: D6 ?! `' h
Break only if register A is less than value at memory address $0005:
% j& K7 P" W9 g! O- h
0 ?+ I% } Y" LA < $0005# [& ~& m' l1 T7 K0 g$ M1 ]% z3 ]
0 G& ^$ _3 X9 r! {! y) b3 HBreak only if the value at the indirect address is not equal to FF:, r% L4 f7 h @% y) o ? m- W" p
2 `+ }3 ^( W, ` v; h
#FF != $[$10+($11*#100)]6 H, M! E+ U3 W
4 J, {8 b7 T% {3 B) W. J- l3 P
Break only if flag N is clear or A is not equal to 00:
- j& Y" k3 ]$ ?. x! y; K0 d4 P- _
3 d6 E" ]+ V9 ]9 W: h(N==#0 || A!=#0)
# ]; p+ V& \( g* X s' k
7 i" A: Q; Q4 A3 k1 ^ M( IBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
0 Z& ~# M$ ` h f, D( F3 V. g) l9 l/ B8 q* @
T==#2
J z/ `8 O: ? v% u- r
. q7 c ?$ W% |/ ]以上内容来自fceux自带的帮助文档说明 |
|