English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 17 March 2023, 23:25   #1
Rock'n Roll
German Translator

Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 48
Posts: 92
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, 17:21   #2
Rock'n Roll
German Translator

Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 48
Posts: 92
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, 18:55   #3
Rock'n Roll
German Translator

Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 48
Posts: 92
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  
 


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 03:56
nOOb needing help to understand Conditional Branching KONEY Coders. Asm / Hardware 2 26 October 2019 00:42
conditional breakpoints jotd request.UAE Wishlist 2 12 June 2016 20:36
Noobie Help (conditional branching) bodhi Coders. Asm / Hardware 7 03 January 2013 01: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 17:57.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Page generated in 0.06643 seconds with 15 queries