Jump to content
Sign in to follow this  
BeeryMiller

GenASM /GenLink issue

Recommended Posts

I want to point out something that has taken me a very long time to finally identify.

 

I had exit code that was doing a BLWP @0 on the Geneve 9640.  The program has 5 different object files with numerous REF's and DEF's spread out in the files.

 

In the first object file, I had used instructions like CLR @LABEL1 as well as MOV  @LABEL1,@LABEL1.  LABEL1 was REF'd in the first source file and DEF'd  in a later object file.  Use of the REF and DEF labels in some cases were after the use of the label and in some cases before the label.  That was my mistake.  I should have REF/DEF everything in the first source file of each object file.

 

GenLINK did not resolve the location of LABEL1 in all places, so, something like CLR @LABEL1 was resolved to CLR @>0000.  I had also used cases of SETO @LABEL1 as well.

 

So, I had some cases where the correct location of LABEL1 was used, and some locations where it did not get resolved in my coding.  I was going through numerous routines trying to chase down the issues when I finally tracked it down.

 

Anyways, thought I would just point this out.

 

Beery

 

 

 

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Beery, could you clarify when the resolve fails? Does it only happen when the REF/DEF is after the first instance of the label?  I'm a little confused as you mention source and object files almost interchangeably, though I think I know what you mean.  I recall seeing some instances where MDOS source defines labels in strange places; I wonder if this is related to the problem you found or just a bad practice.  Thanks for documenting this.

 

Share this post


Link to post
Share on other sites

I had a number of source files to create one object file using the COPY directive.  In one of the early source files, I had multiple instances of a label that was REFerenced later in the source files.  One of the later object files had that label DEFined.

 

When I went to link everything to create the program, some of those labels were not resolved, thus they used an address of >0000 instead of the real address.

 

Now, I did not go and specifically create a short project to demonstrate that, but as soon as I moved all the requisite REF statements to the beginning of the source files, problems disappeared.

 

It was bad practice, but something I learned the hard way.


Beery

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   1 member

×
×
  • Create New...