Date: Thu, 2 Mar 2000 00:30:43 +0100 From: Frank Heckenbach Message-Id: <50ECD832.20000302003043.FOO-1F9A.frank@g-n-u.de> X-Mailer: smtphack 0.3.5 by Jan Andres To: pavenis AT lanet DOT lv, peter AT gerwinski DOT de, djgpp AT delorie DOT com Subject: Re: Bill Currie's `serio' module: License and bugs X-Counter: 1495 peter AT gerwinski DOT de MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=iso-8859-1 Reply-To: djgpp AT delorie DOT com Hi, I'm the one who did the work with bcserio. Peter forwarded your mail to me. I'm not subscribed to the DJGPP list, so please CC any replies. > On 27 Feb 00, at 10:09, Peter Gerwinski wrote: > > > Hello, > > > > we would like to use Bill Currie's `serio' module in GPLed and > > non-GPLed projects. > > I also tried to use bcsio20 with: > DJGPP v2.03 > gcc-2.95.2 > recent binutils snapshots (this year) > > Before I was able to do anything usefull I had to fix some bugs... > > > Second, we think that we have found a bug in _sio_write(): > > > > _sio_write:.globl _sio_write > > call disable > > pushl %eax > > pushl %ebx > > pushl %ebp > > pushl %edi > > movl 24(%esp),%ebp > > > > There is the return address (4 bytes) on the stack, and we > > are `pushl'ing four registers, so the parameters should be > > accessible at 20(%esp). However we try to access them at > > 24(%esp). Did this routine ever work correctly? > > > > sio_write() is broken. But this is not only broken procedure. > > I'm including my diffs in attachment. Yes, I discovered some more problems. I'm attaching my diffs with yours integrated. I'm not sure if it's necessary to save and restore ecx for gcc in higher optimization levels. ISTR it was, but since I don't usually program in assembler, I'm not sure. I did that now, and it won't hurt, anyway (it's not in the interrupt handlers, therefore not time critical). Also, I think that the need for the separate linker script can be quite easily circumvented by declaring dummies before and after the critical code and data and use their addresses for locking, rather than the linker-resolved symbols. I did that, and it seems to work. Are there any problems with that method? Frank -- Frank Heckenbach, frank AT g-n-u DOT de http://fjf.gnu.de/ PGP and GPG keys: http://fjf.gnu.de/plan begin 600 Bcsio.dif.gz M'XL("*6EO3@"`T)CYC=AZ_G9W9 M82262Y9F8O4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