libraries. - ASM x86 ASM 370
This is a discussion on libraries. - ASM x86 ASM 370 ; Hi all,
It has been (at least) 5 years that I have done anything assembler, and
suddenly I have the feeling to play with bits and bytes again.
I used to program assembly under DOS, now I'm playing with programming
...
-
libraries.
Hi all,
It has been (at least) 5 years that I have done anything assembler, and
suddenly I have the feeling to play with bits and bytes again.
I used to program assembly under DOS, now I'm playing with programming
for linux. (btw. nothing fancy. I just look to see whether I still
understand it :-))
The question: I recall that in dos you can use/make "libraries" for the
most used functions/procedures. I recall that I made libraries with
"tlib"
Now I'm wondering is there something similar for linux?
Any pointer and/or explanation is welcome.
Best regards
Martijn Bos
-
Re: libraries.
Martijn wrote:
*snip*
> The question: I recall that in dos you can use/make "libraries" for
> the most used functions/procedures. I recall that I made libraries
> with "tlib"
>
> Now I'm wondering is there something similar for linux?
Assemble to .o output, then use the unix-standard "ar" program. Presto! 
-
Re: libraries.
Martijn wrote:
> Hi all,
>
> It has been (at least) 5 years that I have done anything assembler, and
> suddenly I have the feeling to play with bits and bytes again.
>
> I used to program assembly under DOS, now I'm playing with programming
> for linux. (btw. nothing fancy. I just look to see whether I still
> understand it :-))
>
> The question: I recall that in dos you can use/make "libraries" for the
> most used functions/procedures. I recall that I made libraries with
> "tlib"
I'm not familiar with it. Sounds like Borland's tool for the job(?).
> Now I'm wondering is there something similar for linux?
Of course! For static libraries, "ar" is what you want. Much like what
you're used to in dos. Linux gives you the option of "shared object"
libraries, too - dynamically linked libraries. "ld -shared -o
libmylib.so mylib.o", then you need to either put a new directory in
/etc/ldconfig or move your new library to a directory that's already
there - /usr/local/lib perhaps. Then, as root, "ldconfig" to activate it.
You can find a "simple" example...
http://groups.yahoo.com/group/linux-nasm-users/
In the "files" section, in the "seadhert" directory - "libsimple.tar/gz".
You'll have to join the group to get access. If you don't want to do
that, let me know and I'll make it available some other way.
> Any pointer and/or explanation is welcome.
http://www.linuxassembly.org - if you haven't found it. Links to most of
what's available for Linux (and other 'nixish) assembly - including some
libraries...
I think you're going to like assembly under Linux! Just a wild guess,
but if you have fond memories of assembly under dos... yeah, I think
you'll like it.
Best,
Frank
-
Re: libraries.
Martijn wrote:
> Hi all,
>
> It has been (at least) 5 years that I have done anything assembler, and
> suddenly I have the feeling to play with bits and bytes again.
>
> I used to program assembly under DOS, now I'm playing with programming
> for linux. (btw. nothing fancy. I just look to see whether I still
> understand it :-))
>
> The question: I recall that in dos you can use/make "libraries" for the
> most used functions/procedures. I recall that I made libraries with
> "tlib"
>
> Now I'm wondering is there something similar for linux?
>
> Any pointer and/or explanation is welcome.
>
> Best regards
>
> Martijn Bos
Take a look at the make files for the HLA (High Level Assembler)
Standard Library code. You can download the sources to these assembly
language library files (and the makefiles) from here:
http://webster.cs.ucr.edu/AsmTools/HLA/dnld.html
That should get you started with using linux's ar (archive) program.
Of course, the HLA Standard Library code can also give you a head start
on that library you're trying to create.
Cheers,
Randy Hyde
P.S., look at the "makefile.linux" makefiles that are present. They're
the ones that work under Linux.
-
Re: libraries.
Frank Kotler wrote:
> Martijn wrote:
> > Hi all,
> >
> > It has been (at least) 5 years that I have done anything assembler, and
> > suddenly I have the feeling to play with bits and bytes again.
> >
> > I used to program assembly under DOS, now I'm playing with programming
> > for linux. (btw. nothing fancy. I just look to see whether I still
> > understand it :-))
> >
> > The question: I recall that in dos you can use/make "libraries" for the
> > most used functions/procedures. I recall that I made libraries with
> > "tlib"
>
> I'm not familiar with it. Sounds like Borland's tool for the job(?).
>
Yep..... Borland tool. I was working with tdebug, tasm and tlib.
> > Now I'm wondering is there something similar for linux?
>
> Of course! For static libraries, "ar" is what you want. Much like what
> you're used to in dos. Linux gives you the option of "shared object"
> libraries, too - dynamically linked libraries. "ld -shared -o
> libmylib.so mylib.o", then you need to either put a new directory in
> /etc/ldconfig or move your new library to a directory that's already
> there - /usr/local/lib perhaps. Then, as root, "ldconfig" to activate it.
>
hahaha. I will start with the static libraries.
> You can find a "simple" example...
>
> http://groups.yahoo.com/group/linux-nasm-users/
>
> In the "files" section, in the "seadhert" directory - "libsimple.tar/gz".
>
> You'll have to join the group to get access. If you don't want to do
> that, let me know and I'll make it available some other way.
>
I just signed up. As soon as my "group-membership" is approved I will
have a go.
> > Any pointer and/or explanation is welcome.
>
> http://www.linuxassembly.org - if you haven't found it. Links to most of
> what's available for Linux (and other 'nixish) assembly - including some
> libraries...
>
Yep I have been there allready. (learned a lot there)
> I think you're going to like assembly under Linux! Just a wild guess,
> but if you have fond memories of assembly under dos... yeah, I think
> you'll like it.
>
I don't know why, but assembly makes me smile.
Thanks for your prompt reply.
> Best,
> Frank
-
Re: libraries.
f0dder wrote:
> Martijn wrote:
>
> *snip*
>
> > The question: I recall that in dos you can use/make "libraries" for
> > the most used functions/procedures. I recall that I made libraries
> > with "tlib"
> >
> > Now I'm wondering is there something similar for linux?
>
> Assemble to .o output, then use the unix-standard "ar" program. Presto! 
Presto.
(I will march on)
-
Re: libraries.
rhyde@cs.ucr.edu wrote:
> Martijn wrote:
> > Hi all,
> >
> > It has been (at least) 5 years that I have done anything assembler, and
> > suddenly I have the feeling to play with bits and bytes again.
> >
> > I used to program assembly under DOS, now I'm playing with programming
> > for linux. (btw. nothing fancy. I just look to see whether I still
> > understand it :-))
> >
> > The question: I recall that in dos you can use/make "libraries" for the
> > most used functions/procedures. I recall that I made libraries with
> > "tlib"
> >
> > Now I'm wondering is there something similar for linux?
> >
> > Any pointer and/or explanation is welcome.
> >
> > Best regards
> >
> > Martijn Bos
>
> Take a look at the make files for the HLA (High Level Assembler)
> Standard Library code. You can download the sources to these assembly
> language library files (and the makefiles) from here:
>
> http://webster.cs.ucr.edu/AsmTools/HLA/dnld.html
>
> That should get you started with using linux's ar (archive) program.
> Of course, the HLA Standard Library code can also give you a head start
> on that library you're trying to create.
> Cheers,
> Randy Hyde
> P.S., look at the "makefile.linux" makefiles that are present. They're
> the ones that work under Linux.
I allready found hla yesterday. I indeed downloaded the source to get
some examples.
Best regards
Martijn
-
Re: libraries.
On 4 Jul 2006 04:27:15 -0700, I waved a wand and this message magically
appeared from Martijn:
> The question: I recall that in dos you can use/make "libraries" for
> the most used functions/procedures. I recall that I made libraries
> with "tlib"
Yes. type in: man ar and the answers you require will be forthcoming.
--
http://www.munted.org.uk
Take a nap, it saves lives.
-
Re: libraries.
Frank Kotler wrote:
> Martijn wrote:
> > Hi all,
> >
> > It has been (at least) 5 years that I have done anything assembler, and
> > suddenly I have the feeling to play with bits and bytes again.
> >
> > I used to program assembly under DOS, now I'm playing with programming
> > for linux. (btw. nothing fancy. I just look to see whether I still
> > understand it :-))
> >
> > The question: I recall that in dos you can use/make "libraries" for the
> > most used functions/procedures. I recall that I made libraries with
> > "tlib"
>
> I'm not familiar with it. Sounds like Borland's tool for the job(?).
>
> > Now I'm wondering is there something similar for linux?
>
> Of course! For static libraries, "ar" is what you want. Much like what
> you're used to in dos. Linux gives you the option of "shared object"
> libraries, too - dynamically linked libraries. "ld -shared -o
> libmylib.so mylib.o", then you need to either put a new directory in
> /etc/ldconfig or move your new library to a directory that's already
> there - /usr/local/lib perhaps. Then, as root, "ldconfig" to activate it.
>
> You can find a "simple" example...
>
> http://groups.yahoo.com/group/linux-nasm-users/
>
> In the "files" section, in the "seadhert" directory - "libsimple.tar/gz".
>
That is very helpfull to me. thanx again.
> You'll have to join the group to get access. If you don't want to do
> that, let me know and I'll make it available some other way.
>
> > Any pointer and/or explanation is welcome.
>
> http://www.linuxassembly.org - if you haven't found it. Links to most of
> what's available for Linux (and other 'nixish) assembly - including some
> libraries...
>
> I think you're going to like assembly under Linux! Just a wild guess,
> but if you have fond memories of assembly under dos... yeah, I think
> you'll like it.
>
> Best,
> Frank
Similar Threads
-
By Application Development in forum C
Replies: 5
Last Post: 12-11-2007, 09:51 AM
-
By Application Development in forum lisp
Replies: 1
Last Post: 08-31-2007, 06:05 PM
-
By Application Development in forum Java
Replies: 12
Last Post: 06-29-2007, 04:25 PM
-
By Application Development in forum Java
Replies: 1
Last Post: 06-29-2007, 08:41 AM