Date: Wed, 15 Jul 1998 07:31:41 +1000 (EST) From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: hackers@FreeBSD.ORG Subject: Re: Assembly.. Message-ID: <199807142131.HAA28406@gsms01.alcatel.com.au>
next in thread | raw e-mail | index | archive | help
On: Mon, 13 Jul 1998 17:55:06 -0700 (PDT), Steven Kehlet <kehlet@dt.wdc.com> wrote: > The latest [version of GAS] is 2.8.1. Actually, its 2.9.1 last time I checked. According to the GAS info file (in the section on AT&T Syntax versus Intel Syntax), the correct syntax for lcall is "lcall $SEG,$OFFSET" (ie "lcall $7,$0" for a FreeBSD syscall). This does work in gas 2.9.1, but isn't accepted by the gas 1.92.3 in FreeBSD. The opcode map in gas 1.92.3 suggests "lcall $7,0" might work, but this just generates a core file :-(. >I did however find a way around this... just use .byte and generate >the machine language yourself: > >.byte 0x9a # opcode for lcall >.long 0x0 # this will yield "lcall 0x7,0x0" >.word 0x7 # A check through the system sources will show that this is how it's handled inside the kernel and libraries: #define LCALL(x,y) .byte 0x9a; .long y; .word x #define KERNCALL LCALL(7,0) Peter -- Peter Jeremy (VK2PJ) peter.jeremy@alcatel.com.au Alcatel Australia Limited 41 Mandible St Phone: +61 2 9690 5019 ALEXANDRIA NSW 2015 Fax: +61 2 9690 5247 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807142131.HAA28406>