Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline u_jakobsen

  • Newbie
  • *
  • Join Date: Dec 2003
  • Posts: 8
    • Show all replies
Answers in order:
1:Your debugger reports an error simply because it cant guess what opcode is next. And yes ofcourse you can insert data whereever you want, except that the program counter must not be able to run into these sections.
Example of legal use:

j:
        moveq.l  #1,d0
        rts
number:        dc.w 42
j2:
       moveq.l  #2,d0
       rts


and illegal use:

j:
        moveq.l  #1,d0
number:        dc.w 42
       rts



Disassemble starting from a point after your data for instance at label which points at CODE and not DATA!!! Or even better: Don't make any mistakes. ;-)

2: With the very, very old tools you could choose to overlay sections, thus saving memory. A further use was the fact that Asm-one was based on K-Seka 68K assembler which also had products used on other platforms where you couldn't mix code and data. They can be mixed, except I think the first one has to be code (it is the entrypoint for the program).
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.

3: Don't use this directive. It serves no sensible purpose, unless you are planning on developing hardware banging trackloaded demos.

Keep the spirit alive.......