assembly bootstrap

Jerry Feldman gaf at blu.org
Mon Aug 27 13:36:30 EDT 2001


I think you need to take that with a grain of salt. The tutorial was written 
in 1994, and libc has changed since then.  Also, assembly language is 
highly platform specific. Intel is different from Sparc wich is different from 
Alpha, etc. RISC chips are generally register rich (for instance the Alpha 
has 32 64 bit integer registers and 32 64 bit floating point registers, HP is 
similar, but depends on whether you are on a PA RISC 1.x or 2.0). You 
also need to understand the calling standards (the standard that 
describes how functions are called on a platform), as well as what 
languages your assembly language function will work with. 
Intel is a CISC chip with a relatively rich instruction set but a poor set of 
registers. So, your techniques on these different platforms will be much 
different. For example, on an Intel platform, when calling a function, you 
push your parameters on the stack, where on Alpha, MIPS, or HP, you 
put parameters into some registers. 
Also, on Linux today, you are producing ELF binaries, not COFF or 
A.OUT.
While the tutorial does describe differences between the Intel and AT&T 
format, you should get yourself a copy of the instruction set (normally an 
architecture menaual) for the processor installed on your machine. These 
are many times available on the web.
On 27 Aug 2001, at 12:11, Ron Peterson wrote:

> 
> For no good reason, I decided to learn a bit about assembly language
> programming.
> 
> I searched the web and found some tutorial links.  However, simply
> cutting
> and pasting the tutorial files is not working.
> 
> http://www.cs.pdx.edu/~bjorn/CS200/linux_tutorial/
> 
> When I link, I get:
> 
> 1032$ make
> ld -s -Bstatic -o avtemp /usr/lib/crt1.o /usr/lib/crti.o avtemp.o -lc
> /usr/lib/libc.a(strtoll.o): In function `__strtoll_internal':
> /usr/src/bs/BUILD/glibc-2.2.2/stdlib/../sysdeps/generic/strtol.c:386:
> undefined\ reference to `__udivdi3'
> ...
> 
> Apparently I'm missing something, but I'm not sure what.
> 
> (?)
> 
> -- 
> 
> -Ron-
> https://www.yellowbank.com/
> 
> -
> Subcription/unsubscription/info requests: send e-mail with
> "subscribe", "unsubscribe", or "info" on the first line of the
> message body to discuss-request at blu.org (Subject line is ignored).


Jerry Feldman <gaf at blu.org>
Associate Director
Boston Linux and Unix user group
http://www.blu.org
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list