Date: Thu, 16 Mar 1995 00:57:21 -0800 (PST) From: John Utz <spaz@u.washington.edu> To: freebsd-questions@FreeBSD.org Subject: gas fundamentals? Message-ID: <Pine.OSF.3.91a.950316003421.23562C-100000@saul4.u.washington.edu>
next in thread | raw e-mail | index | archive | help
HI folks; The quarter has ended ( finally ) and i want to get a handle on asm using gas. I took a look at /usr/src/sys/i386/biosboot/*.S and /usr/local/info/gas-info and mananaged to create a asm file that successfully compiles. Yippee. However, I cant seem to figure out how to link the thing to get a running executable! Can anybody send me or demonstrate a simple. successful working *.S file that does something simple and obvious? I dug out my trusty QUE dos and bios functions ( vintage dos 3.3 ) book and tried to write a bios call that would simply output a char: .text mov $0x09, %ah /* the call id value */ mov $0x35, %al /* the ascii char */ mov $0x00, %bh /* display page? */ mov $0x00, %bl /* attribute? */ mov $0x01, %cx /* number of chars to write */ int $0x10 /* I beleive this is legal we still have the same bios, yes? */ mov $0x4C00, %al /* Umm, this may be absurd, given the fact */ int $0x21 /* that this is the return to DOS command! */ umm, are these assumptions valid? Or does the above code actually toss a '5' up on an rxvt or an xterm and then cheerfully exit? what is the command string to compile and link this successfully? as ./test.s ld a.out ????? eventually, I would like to be able to manipulate the serial port in full bit twiddle mode, if anybody has anything that can do that i would like to see it ! thanks muchly! ******************************************************************************* John Utz spaz@stein.u.washington.edu idiocy is the impulse function in the convolution of life
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.91a.950316003421.23562C-100000>