X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=zEwdRKPbJ3tU727IzXycuiEVN1jVBPIktF9+CdN43EQ=; b=pN8xjw/NsVeuPB+SCKPI/lmcdMYxcJ4E7lFU5m0lZRHS/naFXUJc4Qu7VptzuXl7R7 IXX+aUpWjYMTZAcqWyccbNy26P36Lu1KKwwTnhAbKeQvQ8XKOCgGaKp94JZ/XnnlXhMq bdaNZ5ciGma3fWT8XC9QXtmY8fMHQKcJhzz2gR1gOC/7o2xffoS6Z+DJVp1R2F7tHnn8 JVnFeVSrv9frogsOOxGn7Blu9F41TC7C7aISs6bfjBFThIg5Is/Vp65opZefqGiSe2cY K0DsuudUbodouaEZPec6OG2bI5/Qgt64H2ijWjUP0wFscqqp97o25IIZluZI/yULI/fu S09Q== MIME-Version: 1.0 X-Received: by 10.220.195.67 with SMTP id eb3mr5818101vcb.30.1405028830384; Thu, 10 Jul 2014 14:47:10 -0700 (PDT) In-Reply-To: References: Date: Thu, 10 Jul 2014 14:47:10 -0700 Message-ID: Subject: Re: Using outportb() with djgpp From: Louis Santillan To: "djgpp AT delorie DOT com" Content-Type: multipart/alternative; boundary=089e0158b0a8559b8004fdddc4bc Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --089e0158b0a8559b8004fdddc4bc Content-Type: text/plain; charset=UTF-8 Often? Real hardware or VM? Which OS? Are you sure it's the djgpp code that's causing the reboot? Do you maybe need to clear interrupts while writing & then reset? On Thu, Jul 10, 2014 at 1:20 PM, Mateusz Viste wrote: > Hi, > > I am trying to write to a hardware port from within djgpp, using > outportb(). It does work from time to time, but often outportb() will make > the whole PC reboot. Specifically I am writing to port 0x330 (to a MPU401 > adapter). If using the same code with turbo C, it works perfectly. Hence I > am wondering: are there any special "rules" I should be aware of when > trying to outportb() from within protected mode? > > regards, > Mateusz > --089e0158b0a8559b8004fdddc4bc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Often? =C2=A0Real hardware or VM? =C2=A0Which OS? =C2=A0Ar= e you sure it's the djgpp code that's causing the reboot? Do you ma= ybe need to clear interrupts while writing & then reset?


On Thu, Jul 10, 2014 at 1:20 PM, Mateusz= Viste <mateusz DOT viste AT delorie DOT com> wrote:
Hi,

I am trying to write to a hardware port from within djgpp, using outportb()= . It does work from time to time, but often outportb() will make the whole = PC reboot. Specifically I am writing to port 0x330 (to a MPU401 adapter). I= f using the same code with turbo C, it works perfectly. Hence I am wonderin= g: are there any special "rules" I should be aware of when trying= to outportb() from within protected mode?

regards,
Mateusz

--089e0158b0a8559b8004fdddc4bc--