The code generated from the contents of memory locations

All 680x0 related coding posts in this section please.

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Post Reply
Robbizz
Atariator
Atariator
Posts: 27
Joined: Wed Jul 01, 2020 7:08 pm

The code generated from the contents of memory locations

Post by Robbizz »

i was analyzing the memory contents about the "emess" and "sqrs" label. That code they refer to (outlined in yellow) has nothing to do with the program. Can you confirm that this is the code generated based on the contents of those memory locations and therefore it is a "case" that that code came out?
The code it refers to is this:

....

Code: Select all

dzcon	dc.w	12
emess	dc.b	'Error'
sqrs	dc.w	1,4,9,16,25
You do not have the required permissions to view the files attached to this post.
User avatar
Mug UK
Administrator
Administrator
Posts: 11597
Joined: Thu Apr 29, 2004 7:16 pm
Location: Stockport (UK)
Contact:

Re: The code generated from the contents of memory locations

Post by Mug UK »

This will be what the bytes look like as if they were instructions. The disassembler you're using doesn't know what the bytes represent unless you tell it to, e.g. using something like Easyrider 4.
My main site: http://www.mug-uk.co.uk - slowly digging up the bits from my past (and re-working a few): Atari ST, Sega 8-bit (game hacks) and NDS (Music ripping guide).

I develop a free Word (for Windows) add-in that's available for Word 2007 upwards. It's a fix-it toolbox that will allow power Word users to fix document errors. You can find it at: http://www.mikestoolbox.co.uk
Robbizz
Atariator
Atariator
Posts: 27
Joined: Wed Jul 01, 2020 7:08 pm

Re: The code generated from the contents of memory locations

Post by Robbizz »

As I suspected, so I could run that code, of course it wouldn't make sense but it is possible since there is a label where you can set the program counter to that address. Now I understand why assembly labels are used both for defining memory locations (as variables), or as references to program points. It is the content that changes.
User avatar
prog99
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 124
Joined: Thu Jun 19, 2003 8:08 pm
Location: Ross & Cromarty
Contact:

Re: The code generated from the contents of memory locations

Post by prog99 »

Yes, they are variables. The debugger screen is its attempt to decode them but if you set the program counter there it'd crash.
Window 3 shows the values in a more readable format.
All my real skills are undervalued
Post Reply

Return to “680x0”