This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using a library to call a preassembled .obj file

I will try this again!! Surely there must be some one out there who can answer this question directly. I have written two files for a probject give below:

;Main Program (separate file)

extrn code (_test1)

cseg at 0

ljmp _start

main segment code
rseg main

_start:
lcall _test1
stop: sjmp stop
end

;program test1 (separate file)

public _test1

test1 segment code
rseg test1

_test1:
mov a,#99h
mov r0,a
ret
end

These two files are set up in a project and they work by calling test1 and moving 99h into the accumulator.

Now.....I would like to put test1.obj in a library file. For example, Mylibrary.

Now I would like to remove the _test1 file from my project and reference _test1 from my libray. What code do I use in the main program so that I can properly call the subroutine _test1?

Does any one out there understand my question and can directly answer it?

Thank you so much.

Jim Gilliam

Parents Reply Children
No data