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 07:51:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed1.cidera.com!Cidera!portc03.blue.aol.com!news.compuserve.com!news-master.compuserve.com!not-for-mail From: "Michael Garrett" Newsgroups: comp.lang.ada Subject: Re: Gnat Asm Insertion Question Date: Mon, 22 Oct 2001 09:50:12 -0500 Organization: CompuServe Interactive Services Message-ID: <9r1bqc$nsp$1@suaar1aa.prod.compuserve.com> References: <9r0vhg$evr$1@suaar1aa.prod.compuserve.com> NNTP-Posting-Host: chi-tgn-gjr-vty38.as.wcom.net X-Trace: suaar1aa.prod.compuserve.com 1003762316 24473 216.192.160.38 (22 Oct 2001 14:51:56 GMT) X-Complaints-To: newsmaster@compuserve.com NNTP-Posting-Date: 22 Oct 2001 14:51:56 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Xref: archiver1.google.com comp.lang.ada:15025 Date: 2001-10-22T14:51:56+00:00 List-Id: I chaged the code to read: Asm (Latin_1.LF & Latin_1.HT & "movl %%cr0,%%eax; " & Latin_1.LF & Latin_1.HT & "or $0x0001,%%eax; " & Latin_1.LF & Latin_1.HT & "movl %%eax,%%cr0; " & Latin_1.LF & Latin_1.HT & "ljmp $0x10,$1f; " & Latin_1.LF & "1: " & Latin_1.LF & Latin_1.HT & "movl $0x18,%%eax; " & Latin_1.LF & Latin_1.HT & "movl %%eax,%%ds; " & Latin_1.LF & Latin_1.HT & "movl %%eax,%%es; " & Latin_1.LF & Latin_1.HT & "movl %%eax,%%fs; " & Latin_1.LF & Latin_1.HT & "movl %%eax,%%gs; " & Latin_1.LF & Latin_1.HT & "movl %%eax,%%ss; ", No_Output_Operands, No_Input_Operands); In a Put statement, this gives me formated asm code with the label in the first location on the line. But the compiler is still choking after the label. I took this code from a web reference which was supposed to have compiled at one time..... Michael Garrett wrote in message news:9r0vhg$evr$1@suaar1aa.prod.compuserve.com... > > 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 > >