From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5e14790626dc0cf1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-22 11:45:21 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!brick.direct.ca!brie.direct.ca.POSTED!not-for-mail Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed From: FGD MIME-Version: 1.0 Message-ID: <3BD46A8B.8030402@look.ca> NNTP-Posting-Date: Mon, 22 Oct 2001 11:42:51 PDT NNTP-Posting-Host: 209.148.70.45 Newsgroups: comp.lang.ada Organization: Look Communications - http://www.look.ca References: <9r0vhg$evr$1@suaar1aa.prod.compuserve.com> Subject: Re: Gnat Asm Insertion Question User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1 X-Accept-Language: en-us X-Complaints-To: abuse@look.ca X-Trace: brie.direct.ca 1003776171 209.148.70.45 (Mon, 22 Oct 2001 11:42:51 PDT) Date: Mon, 22 Oct 2001 14:50:51 -0400 Xref: archiver1.google.com comp.lang.ada:15045 Date: 2001-10-22T14:50:51-04:00 List-Id: Try putting LF between each asm instruction, this way you can compile with the -s option and get exactly which instruction causes the problem. The long jmp may be the problem. But I have had problems with moves to segment regs on some versions of GNAT, which may in fact depend on the version of GAS used. You have to use operands with matching size, so you have to write "movl %ax,%ds" and not "movl %eax,%ds" even with a -l instruction suffix. Don't write "movw %ax,%ds", that will add a 66h prefix. "mov %ax,%ds" will assemble but there seems to be no certain way to know whether or not it will add a 66h prefix. -- Frank Michael Garrett wrote: > I have the following snippet of code to put the processot into protected > mode: > > Asm ("movl %%cr0,%%eax; " & > "or $0x0001,%%eax; " & > "movl %%eax,%%cr0; " & > "ljmp $0x10,$1f; " & > "1: " & > "movl $0x18,%%eax; " & > "movl %%eax,%%ds; " & > "movl %%eax,%%es; " & > "movl %%eax,%%fs; " & > "movl %%eax,%%gs; " & > "movl %%eax,%%ss; ", > No_Output_Operands, > No_Input_Operands); > > When I try to compile this code, I get the following error: > > C:\TEMP\cca00281.s: Assembler messages: > C:\TEMP\cca00281.s:89: Error: operands given don't match any known 386 > instructi > on > gnatmake: "hardware\adaos-hardware-processor.adb" compilation error > make: *** [make_ada_main] Error 4 > > For some reason, the label for the ljmp instruction is not declared > properly. > > How do I properly write this code so that the compiler creates a label? > > Thank you in advance!! > > -- > Michael C. Garrett > Garrett Technologies Inc. > michaelgarrett@csi.com > > >