English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 17 March 2023, 22:25   #1
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 186
conditional register breakpoint

How is this conditional register breakpoint really works?
fo <num> <reg> <oper> <val> [<mask> <val2>] Conditional register breakpoint.
reg=Dx,Ax,PC,USP,ISP,VBR,SR. oper:!=,==,<,>,>=,<=,-,!- (-=val to val2 range).

Code:
>fo 0 A0==$21000
Breakpoint added.
>fl
0: A0 == 00021000 [ffffffff 00000000]
>
LEA.L $00021000,A0
ok, that works.

but how is the function of the two 32Bit values in the square brackets?

Is it in a range? Or can I also break the program with a masked bit like:

Code:
>fo 0 d0==$00000004 $00000004
Breakpoint added.
>fl
0: D0 == 00000004 [00000004 00000000]

or
>fo 0 d0==$00000004 $00000004 $00000004
Breakpoint added.
>fl
0: D0 == 00000004 [00000004 00000004]

for move.w #$0004,d0
00c25956 303c 0004                move.w #$0004,d0
Next PC: 00c2595a
>t	
Cycles: 4 Chip, 8 CPU. (V=210 H=66 -> V=210 H=70)
  D0 00000004   D1 00000000   D2 00000000   D3 00000000
But in no case a Breakpoint 0 triggered.

Code:
>fd
All breakpoints removed.
>fo 0 d0==$00000004
Breakpoint added.
>fl
0: D0 == 00000004 [ffffffff 00000004]
The value in the brackets are not reset with >fd
Rock'n Roll is offline  
Old 18 March 2023, 16:21   #2
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 186
I made a mistake. A breakpoint 0 triggered isn't shown with singlesteps.

I believe the formula for "fo <num> <reg> <oper> <val> [<mask> <val2>]" is:

Code:
f0 0 (reg.l & mask.l) == val2.l
eg.

fo 0 d0==$8000 $ff00 $8000
>fl
0: D0 == 00008000 [0000ff00 00008000]

or
>fo 0 d0==$11008000 $ff00 $8000
>fl
0: D0 == 11008000 [0000ff00 00008000]
it's the same and results in: fo 0 d0.l==$xxxx80xx

move.l #$11008000,d0 ; Breakpoint 0 triggered.
move.l #$00008000,d0 ; Breakpoint 0 triggered.
move.l #$00004010,d0 ; no breakpoint
move.l #$0000F011,d0 ; Breakpoint 0 triggered.

(I made only short tests.)
Rock'n Roll is offline  
Old 20 March 2023, 17:55   #3
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 186
I checked again the fo-command and the result is, that the parameter 'val2' has no function.
I only checked with '=='.

Code:
1. if (reg & mask) == val1		; ok
>fo 0 d0==$8
Breakpoint added.
>fl				
0: D0 == 00000008 [ffffffff 00000000]	; Breakpoint only for certain value

2. if (reg & mask) == val1		; ok
>fo 0 d0==$13700 $000fff00 $00000000
Breakpoint added.
>fl
0: D0 == 00013700 [000fff00 00000000]	; Breakpoint for value on specific bits

>fo 0 d0==$13700 $0 $0			; ok
Breakpoint added.
>fl
0: D0 == 00013700 [00000000 00000000]	; Breakpoint every time

3.
>fo 0 d0==$13700 $ffffffff $10	
Breakpoint added.
>fl
0: D0 == 00013700 [ffffffff 00000010]	; I can not see any influence of the second parameter 'val2'

I suggest to look into this and maybe change to:
if (((reg & mask) >= (val1-val2)) && ((reg & mask) <= (val1+val2)))
or
if (((reg & mask) >= (val1)) && ((reg & mask) <= (val1+val2)))

Then the parameter 'val2' would specify a range.
The possible operations seems to be to much: oper: !=,==,<,>,>=,<=,-,!-
Maybe better would be only '==' or the oposite '!=' for inside or outside a range or value.
Rock'n Roll is offline  
Old 25 March 2023, 13:00   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,523
val2 is used in "range" tests (in-range "-": val1 <= x <= val2 and not-in-range "!-": x <= val1 OR x >= val2)
Toni Wilen is online now  
Old 02 April 2023, 20:29   #5
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 186
ok, but for me it doesn't work. I need a short example, how to use it.
(but if I not unterstand this, it's also ok.)

I have a series with different move's and one with move.l #$808,d0

I want a break if "in-range":
800 <= x <= 810 with val1 = 800 and val2 = 810
>fo 0 d0<=$800 $ffffffff $810

Code:
>fd
All breakpoints removed.
>fo 0 d0<=$800 $ffffffff $810
Breakpoint added.
>fl
0: D0 <= 00000800 [ffffffff 00000810]

>g
Breakpoint 0 triggered.
Cycles: 6 Chip, 12 CPU. (V=105 H=50 -> V=105 H=56)
VPOS: 105 ($069) HPOS: 056 ($038) COP: $0002388c
  D0 00000000   D1 00000000   D2 00000000   D3 00000000
or

Code:
>fd
All breakpoints removed.
>fo 0 d0<=$800 $ffffff00 $810
Breakpoint added.
>g
Breakpoint 0 triggered.
Cycles: 6 Chip, 12 CPU. (V=105 H=56 -> V=105 H=62)
VPOS: 105 ($069) HPOS: 062 ($03e) COP: $0002388c
  D0 00000000   D1 00000000   D2 00000000   D3 00000000
Rock'n Roll is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional JSR and RTS DanScott Coders. Asm / Hardware 9 15 January 2021 02:56
nOOb needing help to understand Conditional Branching KONEY Coders. Asm / Hardware 2 25 October 2019 23:42
conditional breakpoints jotd request.UAE Wishlist 2 12 June 2016 19:36
Noobie Help (conditional branching) bodhi Coders. Asm / Hardware 7 03 January 2013 00:55

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:47.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07048 seconds with 13 queries