Welcome, Guest. Please login or register.

Author Topic: Few asm things I found by experimentation and would like confirmation  (Read 1925 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Hey. You know when you do things imitating what you saw/read and stuff tends to work right? Well, I allways want to mess things up and experiment with weird ways to understand how they work if that's not documented or something (at least in the assembler docs). The bellow stff is some things I found out using asm-one and asm-pro. I think they're right but If somwone can confirm and share their experience please do so.
Please refer to the numbers for simplicity....

1- using the dc asm directive
can't define constants before the end of the program.. If I made a dc.b (didn't try with .w or .l), even with an align after (of course..) debbuger reported  error in the instructions after. Errors disabppeared after I deleted the dc.b declarationj. I even tried to use the asm directive section code, after the dc,  thinking that the asm had automatically changed the section but no luck...
So is this a given... you can't use dc unless in the end of the programs, and is this the same for all assemblers?

2- section assembler directive
asm- one (and asm-pro I assume, diddn't try) accepts data, code and bss. While I see what it is, I can't see why the different section defenitions  exist. Shouldn't the assembler distinguish bettwee them? Do they have to be in a particular order(and could this be the reason for my previous errors in the debugger I described in 1-?
can they be miixed? Are all assembler the same?
by the way, dss is declare storage section right?
 
3-  offset asm directive
from what I tried, only changes the values of labels(adding the offset) for constant declerations at the and of the program. Does nothing if used before the labels of the program instructions. ..


I tied to find more references to this but tutorial in general assume that the program has a cetain structore or sometihng, so I wanted to know if one can do this or not...
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Few asm things I found by experimentation and would like confirmation
« Reply #1 on: January 29, 2004, 07:07:11 PM »
Ahh!!...sounds so trivial when you get it! ;-)
 So , BSS probably stands for blank storage section or something like that....
Cool, the time I dedicate to this is almost zero,  but  I'm getting there :-o
\\"We made Amiga, they {bleep}ed it up\\"