From owner-freebsd-questions Thu Mar 16 00:57:26 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id AAA03459 for questions-outgoing; Thu, 16 Mar 1995 00:57:26 -0800 Received: from saul4.u.washington.edu (saul4.u.washington.edu [140.142.83.2]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id AAA03453 for ; Thu, 16 Mar 1995 00:57:25 -0800 Received: by saul4.u.washington.edu (5.65+UW95.02/UW-NDC Revision: 2.32 ) id AA23600; Thu, 16 Mar 95 00:57:21 -0800 X-Sender: spaz@saul4.u.washington.edu Date: Thu, 16 Mar 1995 00:57:21 -0800 (PST) From: John Utz To: freebsd-questions@FreeBSD.org Subject: gas fundamentals? Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: questions-owner@FreeBSD.org Precedence: bulk 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