Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
@Jose
Quote

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.

Code and Data sections function the same, it makes no difference to loader.

However, BSS section can only contain empty space (all 0), thus cannot contain initial code or data.

Quote
Shouldn't the assembler distinguish bettwee them?

Some assemblers know how to put code to code section and data to data section, and even empty variables to bss. Usually this is done manually, though.

Quote
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-?

No. The only obvious limitation is that BSS can't be the first hunk (since empty space assembles to ori.b #0,d0, and the execution of bss hunk would just fall off the end of the world).

Quote

can they be miixed?

Sure.

Quote
Are all assembler the same?

No. Some assemblers set artificial limitations.

@u_jakobsen
Quote
But if you examine most assembly-programs they usually only contain a code section, since it can be used for all purposes but one: a data section can be forced to load into chip-mem.

CODE sections can be forced to load into chip-mem aswell.