English Amiga Board


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

 
 
Thread Tools
Old 04 March 2021, 11:34   #1
Steril707
Tigerskunk!

Steril707's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 1,994
UAE Debugging with VASM lists

I generate a list with VASM's -L option, and get some output of my code looking like this:

Code:
F14:0002       	add.l 	#44,a0
               S01:0000253E:  41 E8 00 2C
In my understanding, $0000253E is the address of the code in RAM.

If I stop the execution of the program, and do a mem dump with

Code:
m 0000253E 2
I get

Code:
0000253E 0000 0000 0000 0000 0000 0000 D5C0 0000  ................
0000254E D5D0 0000 D5E0 0000 D5F8 0000 0000 4000  ..............@.
..as an output here. Which looks nothing like the mem area shown above in the code list.

I am not sure why this is happening, I think I have used these VASM lists addresses successfully in the MAME debugger when I created some NeoGeo stuff, but here the addresses don't seem to be correct. Or am i doing something completely wrong here? It's been a while since I used these things.

Thanks for any explanation.
Steril707 is offline  
Old 04 March 2021, 12:02   #2
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 2,757
I'd say the problem has to do with the fact that the Amiga doesn't really do fixed addresses.

Presuming you link to the standard Amiga Hunk format, you have no guarantees where the OS will load your data - addresses in Amiga OS are never fixed, your code/data could technically end up anywhere in RAM. If you're the one doing the loading yourself through for instance a track loader, code will naturally end up wherever you tell it to. But that still won't necessarily be the addresses reported by VASM unless you make it load to those addresses yourself.
roondar is offline  
Old 04 March 2021, 12:32   #3
Steril707
Tigerskunk!

Steril707's Avatar
 
Join Date: Sep 2016
Location: Amiga Island
Posts: 1,994
Quote:
Originally Posted by roondar View Post
I'd say the problem has to do with the fact that the Amiga doesn't really do fixed addresses.

Presuming you link to the standard Amiga Hunk format, you have no guarantees where the OS will load your data - addresses in Amiga OS are never fixed, your code/data could technically end up anywhere in RAM. If you're the one doing the loading yourself through for instance a track loader, code will naturally end up wherever you tell it to. But that still won't necessarily be the addresses reported by VASM unless you make it load to those addresses yourself.
Hmm, okay. That's it also probably why it's working on NeoGeo and not on the Amiga...
Steril707 is offline  
Old 04 March 2021, 12:37   #4
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,868
Quote:
Originally Posted by Steril707 View Post
Code:
F14:0002           add.l     #44,a0
               S01:0000253E:  41 E8 00 2C
In my understanding, $0000253E is the address of the code in RAM.
Depends whether S01 is a relocatible section or absolute code. Did you use an ORG directive somewhere in front of it? Otherwise it is just the section offset, which always start with zero.

See roondar for more information.
phx 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
UAE debugger updates (executable debugging, segment tracking, symbols and more) Toni Wilen support.WinUAE 133 07 March 2021 00:43
Remote debugging of code running in UAE copse Coders. General 9 05 March 2021 22:44
Macros for debugging in VASM mcgeezer Coders. Asm / Hardware 11 14 May 2019 15:27
Issues with ORG directive (vasm + FS-UAE) Maggot Coders. Asm / Hardware 6 21 November 2018 19:48
MUI and Lists tygre Coders. System 1 05 September 2015 21:17

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 11:21.


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