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=yahoo.no; s=s1024; t=1405154293; bh=MAPAKE5/+a66xPkZblUI62Pq9RquggO8Z2gnbM9O/5A=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Message-ID:From:To:References:Subject:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Priority:X-MSMail-Priority:X-Mailer:X-MimeOLE; b=QZ8TjuSH0S4J8d9pPXRPCLhfURTZS7U34/hHlsw9bDGucyb4CMxSI4EPfi5MJjmhZdX1LOxeJtj34dHaiJmslItBgrjIAtPllv/dhDhuKchMgAb4lRwPBZtPLfQTVq86DItFQ0HWzJqZyb4RqfBn5ZzRt+vMMRRLOkNWzAYXsKY= X-Yahoo-Newman-Id: 998810 DOT 9196 DOT bm AT smtp116 DOT mail DOT ir2 DOT yahoo DOT com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: cpoRvwoVM1lbqdmOhqBXX5JPAxRHDqlFQQbe4LPPApyoerj ADBlBa.8eXixBI3_o24kPT7oVbMC7Fwz0ZMlEoEMwrPIqUZ9Y7UzbXCewgTw 6XsJ50OBNLIcCHMzltyZ.Puf6bmjD.WCXOBE4HCBs.k9h.XD4HtfXhT_4zFC ujYDC8W_yXovYA8zkaO7DWE4EIUoM_w9aFcYf18niU29vtAYcDVQIK2W3E3S ej7X0F85.Ope_7cMQVSTQZaeORSwQMnRnBCQ02y8Gw9JVUCeOrgBBo_e0Jbo 8EfVVVKMcB4jwES1AhAcHzFnwSuI8KFYufZalT_6xK0pTv437q1OJwq0LljJ k.pvbaP1C740ee62gbbEqIysjR3zepHiwvSMDHAWRGXKZrLPKjhZkM1zFnha eCkN_Wa.bGmR5MQtJDt5oo5phifSrPI6g9umRTbAf5ZZpTwsPeS.Lfvy06ik OE7ufO8q5RaxXs0U9vsFd_KNbHFOUsFbYRYiMXnXCoe2Xh25Kph468l6SYrj T4BdTRt1t75keBHvfJt9FAy9ECNJBhdi_ X-Yahoo-SMTP: 8zhYLGyswBB3AGU8c4pvFIFOfA-- Message-ID: <2702EBB8009A46E8B1BEA98C2762F347@dev.null> From: "Gisle Vanem" To: References: <53bfa273$0$1981$426a74cc AT news DOT free DOT fr> <53bfdd29$0$3638$426a74cc AT news DOT free DOT fr> <53c02f10$0$2048$426a74cc AT news DOT free DOT fr> Subject: Re: Using outportb() with djgpp Date: Sat, 12 Jul 2014 10:38:00 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Reply-To: djgpp AT delorie DOT com "Mateusz Viste" wrote: > And NOW my seemingly random reboots suddenly make a lot of sense! :) But > I am unable to explain why running under real mode would mask reboots, > as the ACPI vs MPU401 conflict shall be present both in real and > protected modes... So many roads. Maybe it has something to do with how you issue the EOI command to the master and/or master PIC? When I did such things for a Digiboard PC/x (an 8-channel RS-485 board) under DOS/turbo-C, there had to be a "specific EOI" to the master PIC. Like: outportb (0x20, 0x60 | asyncCnf[port].irq); which AFAICR gave different results than a "non-specific EOI": outportb (0x20, 0x20); (I seems to remember I lost input data when I did that). Not only that, but if your IRQ was hooked to the slave PIC, the "specific EOI" must be issued to the slave PIC first: if (com->int_vect >= 0x70) outportb (0xA0, 0x60 | asyncCnf[port].irq); outportb (0x20, 0x60 | asyncCnf[port].irq); Hope you get the idea; it's been 10 years since I coded such things. --gv