English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 23 April 2020, 23:39   #1
Fireball
Registered User
 
Join Date: Jan 2019
Location: Werne
Posts: 8
Question ASM: Asm-ONE or AsmPro - how to set a breakpoint?

Hello amiga coders,

I have tried to set a breakpoint in my code (left amiga button + b) but it does not work. When I type "ad" the program stops always at the beginning of my program. When I press (left amiga button + r) in debug mode the debuger does not stop at my breakpoint aswell he jumps directly to my rts command.


Best regards

fb

Last edited by Fireball; 26 April 2020 at 21:29.
Fireball is offline  
Old 24 April 2020, 00:06   #2
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Does your program kill the system (i.e. disables interrupts/DMA)?
StingRay is offline  
Old 24 April 2020, 21:16   #3
Fireball
Registered User
 
Join Date: Jan 2019
Location: Werne
Posts: 8
Hello StringRay,

first of all I have to apologise my headline is broken. I mean "ASM: Asm-ONE or AsmPro - how to set a breakpoint ?"

My program doesn't kill the system. I would like to set a breakpoint and then go through my program step by step to get some informations about variables i.e. test : dc.w 1,2,3 or registers. I don't want to start every time in line 1.

Best regards

Fb :-)
Fireball is offline  
Old 08 May 2024, 13:35   #4
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,642
Late reply, but this is one of the reasons I updated the debugger in AsmTwo.

As Stingray says, if you turn off (too many) interrupts, you will disable the OS that the debugger uses for key presses etc.

After that it's about the handover back to the Assembler window to function properly. On some KS/WB versions you may see a blank screen with the WB colors. In this case, move your mouse (blindly) to the top of the screen and click and drag down. The previous screen appears. This trick may work also with some Asm-One and AsmPro versions.

With AsmTwo, you can always debug your in-game or in-demo code, even with most (but not all) interrupts turned off.
Photon is offline  
Old 30 May 2024, 08:33   #5
admiral
Engineer
 
Join Date: Oct 2018
Location: Shadow realm
Posts: 167
Quote:
Originally Posted by Photon View Post
With AsmTwo, you can always debug your in-game or in-demo code, even with most (but not all) interrupts turned off.
Love AsmTwo, looking forward to seeing a new version (been a while).

How does this work behind the scenes? On breakpoint you set system-friendly vectors and reenable? Is there more to this?
admiral is offline  
Old 30 May 2024, 09:03   #6
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,044
Once you are in debugger (AD command or amiga-shift-d), press amiga-b and then select a line where you want a breakpoint, or press amiga-shift-b to enter a breakpoint address.
These breakpoints use the illegal instruction vector (they replace opcodes with illegal to trigger an exception) and don't rely on interrupts or OS being active.

If you use asm-pro v1.19 or newer, you can also use the ADDBP directive in your source code to set breakpoints that will be auto-activated once you start debugging. From the "release notes":
Code:
2. ADDBP directive to add a breakpoint from the source code
Syntax is:
	ADDBP	<expression>
For example:
	ADDBP	Label1234
	ADDBP	$30000+idx*4
Assemble your code with AD and unconditional breakpoints will be activated and ready to go.
a/b is offline  
Old 30 May 2024, 19:13   #7
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,642
Quote:
Originally Posted by admiral View Post
Love AsmTwo, looking forward to seeing a new version (been a while).

How does this work behind the scenes? On breakpoint you set system-friendly vectors and reenable? Is there more to this?
<3

Lots of painstaking debugging-the-debugger on all my Amigas for handling stack and switch to/from Supervisor, VBR fix, and more recently comments and blank lines in macros causing a vertical offset of the marked line.
Photon is offline  
Old Yesterday, 00:18   #8
admiral
Engineer
 
Join Date: Oct 2018
Location: Shadow realm
Posts: 167
Quote:
Originally Posted by Photon View Post
<3

Lots of painstaking debugging-the-debugger on all my Amigas for handling stack and switch to/from Supervisor, VBR fix, and more recently comments and blank lines in macros causing a vertical offset of the marked line.
Thank you a lot for the toil.

Nothing is ever easy, but it is all worth it at the end.
admiral is offline  
Old Yesterday, 10:22   #9
malko
Ex nihilo nihil
 
malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 4,955
Quote:
Originally Posted by admiral View Post
Love AsmTwo, looking forward to seeing a new version (been a while). [...]
+1.
Hope Photon found it relevant enough also to have a look at the shortcuts that do not follow the key mapping you are using but are instead bound to key position on the keyboard. For non "us" keyboard this is really annoying: https://eab.abime.net/showpost.php?p...09&postcount=3
malko 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
Tool to convert asm to gnu asm (gas) Asman Coders. Asm / Hardware 13 30 December 2020 11:57
Asm-One and Amiga Forever chroma123 Coders. Asm / Hardware 14 12 March 2017 02:02
ASM Amiga includes ? majikeyric Coders. General 2 08 October 2015 17:58
A newbie to the Amiga and ASM, what approach to take? P-J Coders. General 19 18 September 2007 14:36
Attn ASM Coders: NewTek promo video for Amiga Video Toaster Pyromania Coders. General 1 02 June 2007 01:02

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 19:49.

Top

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