comp.lang.ada
 help / color / mirror / Atom feed
* Gnat Asm Insertion Question
@ 2001-10-22 11:20 Michael Garrett
  2001-10-22 11:26 ` Lutz Donnerhacke
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Michael Garrett @ 2001-10-22 11:20 UTC (permalink / raw)



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





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-10-23  4:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-22 11:20 Gnat Asm Insertion Question Michael Garrett
2001-10-22 11:26 ` Lutz Donnerhacke
2001-10-22 12:37 ` Florian Weimer
2001-10-22 14:50 ` Michael Garrett
2001-10-22 14:57   ` Lutz Donnerhacke
2001-10-22 15:04   ` Florian Weimer
2001-10-23  4:12   ` Michael Garrett
2001-10-22 18:50 ` FGD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox