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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dd37bad7a006f7af X-Google-Attributes: gid103376,public From: jerry@jvdsys.stuyts.nl (Jerry van Dijk) Subject: Re: serial programming Date: 1998/12/10 Message-ID: #1/1 X-Deja-AN: 421004871 References: <74ofr7$6gt$1@nnrp1.dejanews.com> Organization: * JerryWare *, Leiden, Holland Newsgroups: comp.lang.ada Date: 1998-12-10T00:00:00+00:00 List-Id: jrstiebe@hotnet.net wrote: : we're trying to control a frequency inverter with rs-232 serial port,but : to disable the uart interrupts we usualy clear the second register from : the uart to zero.with an outportb(3f8+1,0) but when we've ported this : code to gnat the register is replaced to zero but the action of disable : don't occur.May gnt interfering with this?We accept any suggestions Well, assuming you are using DOS, I do not think that GNAT is interfering in any way, especially if you are using my io_ports package. Maybe you have the FIFO enabled and it first empties its buffer ? Hard to tell without knowing the OS, UART and the code you are using. : another question,how can we make interrupt handling with gnat when we : trying to make an access to a protected procedure gnat crashes and show: : "GNAT BUG DETECTED" Hmmm, I cannot reproduce this with 3.10p on Linux: procedure Oops is Buffer_Size : constant := 100; type Integer_Buffer is array (1 .. Buffer_Size) of Integer; protected Buffer is procedure Store (Index, Value : in Integer); private Data : Integer_Buffer; end Buffer; protected body Buffer is procedure Store (Index, Value : in Integer) is begin Data (Index) := Value; end Store; end Buffer; type Store_Access is access protected procedure (Index, Value : in Integer); Ptr : Store_Access; begin Ptr := Buffer.Store'Access; Ptr (2, 5); end Oops; More info would be helpful... Jerry. -- -- Jerry van Dijk | email: jdijk@acm.org -- Leiden, Holland | member Team-Ada -- Ada & Win32: http://stad.dsl.nl/~jvandyk