Sonic and Sega Retro Message Board: Jmp to label in a seperate asm file . - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 2 Pages +
  • 1
  • 2
    Locked Forum

Jmp to label in a seperate asm file .

#16 User is offline cokyen 

Posted 15 July 2016 - 02:05 PM

  • Posts: 24
  • Joined: 19-June 16
  • Gender:Male
Thanks Selbi Getbalsoft Main Memory Redhotsonic Neo!! :)/> On the subject of include directives, can you include an assemby file that just tells you what the first label in the codes implementation IS (declaration / definition) but not have it go to this first label when in includes this asm file? In other words, can you just have it be their waiting for when u jmp to on Lea a label it will know what to do and at the end of the label it will return to subroutine rts ?

#17 User is offline Natsumi 

Posted 22 July 2016 - 12:47 AM

  • Miss Fox
  • Posts: 168
  • Joined: 08-February 12
  • Gender:Female
  • Location:Otter's lap
  • Project:Being with my boyfriend
As far as I am aware, BigEvilCorp is a total assembly noob, and I wouldn't take what he tells without a grain of salt.
Now I am not sure what you mean with this last post, but if you mean something vaguely to do with defining a routine without actually having one, you can do it, but you need to be really careful with it, unless you want your code to jump to bad offsets that is. You can do something along the lines of this in asm68k:
Lable equ $FF00

This will create a symbolic link to lable at address 0xFF00, and will allow your code to target this as if it was just any lable you would define normally.

#18 User is offline BigEvilCorporation 

Posted 27 July 2016 - 04:29 AM

  • Posts: 29
  • Joined: 17-July 16
  • Gender:Male
  • Location:UK
  • Project:Tanglewood
That blog was written back when I was learning the language, and it's not a "tutorial", more a log of my learning experiences to help me remember, so yes indeed take everything you read there with a huge grain of salt.

As for your test.asm issue - assembling that file isn't enough, since it doesn't include the rest of the code. You need to assemble main.asm, which includes both header.asm and init.asm in appropriate locations. I'm not sure where that test.asm came from either, it's not something I wrote. A few people have sent me various ZIP files with their own code that I've fixed up and sent back, was this one of yours?

It's probably about time I revisited that site and cleaned everything up into proper, fact checked tutorials, now that I know what I'm doing ;) Too many people seem to relying on those posts as gospel, they were written by a noob and they're riddled with mistakes.
This post has been edited by BigEvilCorporation: 27 July 2016 - 04:31 AM

  • 2 Pages +
  • 1
  • 2
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users