Mail Archives: djgpp/2000/03/03/06:28:35
I've cc'd this to all appearently interested parties, including the list. Please keep me in the loop as I already get too much mail to sift through djgpp as well.
On Thu, Mar 02, 2000 at 07:35:06AM -0600, Jeff Williams wrote:
> Bill,
>
> There's been some activity of late on the djgpp list regarding your
> bcserio package. I'm forwarding this particular posting for your
> information, since I think I remember you saying you didn't follow the
> list any longer.
Thanks. I'm glad you let me know, and thanks for including the patch in the forward.
I'm sorry I never updated the package on simtel, especially as my email has changed to bill AT taniwha DOT org (this should be permanent). I left Tait Electronics two and a half years ago. If you wish to get in touch with me real-time, I can usually be found in #quakeforge on openprojects.net as taniwha.
> jtw
>
> ------------- Begin Forwarded Message -------------
>
> X-Unix-From: frank AT g-n-u DOT de Wed Mar 1 19:42:32 2000
[headers snipped]
>
> 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.
This is ok by me. I prefer GPL these days, but when I released bcserio, I was undecided, so it's almost public domain. I also did not understand that releasing something without a license means `all rights reseverd'. This was not the intention. So long as any changes to bcserio continue to be shared, use it as you wish.
> > I also tried to use bcsio20 with:
> > DJGPP v2.03
> > gcc-2.95.2
> > recent binutils snapshots (this year)
Heh, last tested with gcc-2.7.2.1 and binutils-2.8.1 + a patch.
> > 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?
Nope, it was broken to begin with. I forgot to test it, and really, I still haven't. I also haven't done any devel on it since Feb 98. I've been to busy playing with Linux and now Quakeforge (taniwha if anyone is interested).
I beleive it was more broken than that code snippet implies. For one, I forgot to save esi.
> > sio_write() is broken. But this is not only broken procedure.
> >
> > I'm including my diffs in attachment.
Ouch, I'll have to go over the patch.
>
> Yes, I discovered some more problems. I'm attaching my diffs with
> yours integrated.
I've put the latest version (not including your patches) onto my website: http://www.taniwha.org/serio.zip and I think you will want to see if I've fixed anything you haven't. Also, I updated my email in the README file :)
> 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).
ecx is supposed to be guaranteed free to other functions.
> 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?
Yeah, it's messy:). I did it that way originally. better yet is to just merge the script I supplied (note, it may be out of date, it was ok for djgpp 2.02) with the one that comes with djgpp (or is it built into ld?)
> Frank
>
[patch snipped]
Thanks for the patch, I'll go over it and try to merge it with my code, unless you beat me to it and send me a new patch:)
Bill
--
Leave others their otherness. -- Aratak
- Raw text -