Re: [Freedos-devel] LPTtest v1.3

2007-07-17 Thread Robert Riebisch
Eric Auer wrote:

[snip]

I didn't have a look at the source code, but maybe you or Ladislav find
something useful in Kris Hidenstrom's `Parallel port mini-FAQ' or `PC
Timing FAQ' available from
http://www.heidenstrom.gen.nz/kris.html#mystuff

In the past I had good results with functions ctc() and usleep() from
.

Robert Riebisch
-- 
BTTR Software
http://www.bttr-software.de/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-16 Thread Aitor Santamaría
I haven't followed the conversation thoroughly, but seems to me that
you mean NASM?

Aitor

2007/7/15, Ladislav Lacina <[EMAIL PROTECTED]>:
> OK, do it yourself, it is open source :-)
> The main version is now Eric's MASM version. I'll not work on TASM version
> more.
> Anyway, next two weeks I'll not work on MASM version eighter because I'll on
> the holiday in Ukraine.
>
> - Original Message -
> From: "Jim Hall" <[EMAIL PROTECTED]>
> To: 
> Sent: Sunday, July 15, 2007 12:25 AM
> Subject: Re: [Freedos-devel] LPTtest v1.3
>
>
> > On 7/14/07, chris evans <[EMAIL PROTECTED]> wrote:
> > > >But it has no sense. LPTtest is supposed to be a part of FreeDOS and
> FreeDOS
> > > >itself has own copy of COPYING. Why should every small binary to have
> own
> > > >copy of this license?
> > >
> > > >Maybe rather to spread it as public domain?
> > >
> > > I thought that all was necessary in a program like this is a small
> comment that is is under the GPL at start.
> > >
> >
> > No, see my other post.  It is important to be explicit in your license
> > terms.  Just saying "this program is covered under the GNU GPL" is not
> > sufficient.
> >
> > -jh
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Freedos-devel mailing list
> > Freedos-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/freedos-devel
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-15 Thread Ladislav Lacina
OK, do it yourself, it is open source :-)
The main version is now Eric's MASM version. I'll not work on TASM version
more.
Anyway, next two weeks I'll not work on MASM version eighter because I'll on
the holiday in Ukraine.

- Original Message -
From: "Jim Hall" <[EMAIL PROTECTED]>
To: 
Sent: Sunday, July 15, 2007 12:25 AM
Subject: Re: [Freedos-devel] LPTtest v1.3


> On 7/14/07, chris evans <[EMAIL PROTECTED]> wrote:
> > >But it has no sense. LPTtest is supposed to be a part of FreeDOS and
FreeDOS
> > >itself has own copy of COPYING. Why should every small binary to have
own
> > >copy of this license?
> >
> > >Maybe rather to spread it as public domain?
> >
> > I thought that all was necessary in a program like this is a small
comment that is is under the GPL at start.
> >
>
> No, see my other post.  It is important to be explicit in your license
> terms.  Just saying "this program is covered under the GNU GPL" is not
> sufficient.
>
> -jh
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-14 Thread Jim Hall
On 7/14/07, chris evans <[EMAIL PROTECTED]> wrote:
> >But it has no sense. LPTtest is supposed to be a part of FreeDOS and FreeDOS
> >itself has own copy of COPYING. Why should every small binary to have own
> >copy of this license?
>
> >Maybe rather to spread it as public domain?
>
> I thought that all was necessary in a program like this is a small comment 
> that is is under the GPL at start.
>

No, see my other post.  It is important to be explicit in your license
terms.  Just saying "this program is covered under the GNU GPL" is not
sufficient.

-jh

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-14 Thread chris evans
>But it has no sense. LPTtest is supposed to be a part of FreeDOS and FreeDOS
>itself has own copy of COPYING. Why should every small binary to have own
>copy of this license?

>Maybe rather to spread it as public domain?

I thought that all was necessary in a program like this is a small comment that 
is is under the GPL at start.


--chris





   

Sick sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when. 
http://tv.yahoo.com/collections/222

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-14 Thread Eric Auer

Hi all,

I did some experiments with ieee1284 plug and play
handshaking, based on the docs on fapo.com ... Yes
I know that Public Domain means "everybody can do
everything with it, including removing any mention
of me as the author". Anyway. Here is what I found:

Default data, control, status in plain DOS is 0, de, cc.
In dosemu 1.3.4, it is 0, d8, 4, and in 1.3.2, the I/O
ports are not even simulated.

I dosemu, whenever you write to the data port, the data
is printed even if you do not send a strobe! But you can
detect dosemu by its simplified fake control and status:

mov dx,378  ; or another baseport of your choice
inc dx
inc dx
in al,dx; read control bits
out dx,al   ; dummy control write, no strobe or anything
dec dx  ; access status bits next
in al,dx; next access clears 40, fake ack from dosemu
mov ah,al
in al,dx; returns at once instead of 5 ysec later
and ax,4040
cmp ax,0040
jz it_is_dosemu ; otherwise it is a real printer port

So this is how we can avoid accidentally printing in dosemu.

After that, we start the ieee1284 pnp id sequence:
baseport is data, baseport+1 is status, baseport+2 is control.
Places with (*) is where lpttest differs, probably lpttest bugs.

data = 4
control = (control and f7) or 2 (for me: control is now c6)
  (selin is now in ieee1284 state, autofeed is also special)
status now changes to be for me, status and 78 is 38 now
control = control or 1 (strobe)
  (status changes to 3e for me, "busy" bit, might be irrelevant)
control = control and fc (clear both strobe and afeed at once!) (*)
  (if you would only clear strobe, you would print a 4 now :-p)
status changes to d6 for me, status and 30 is 10 now (*)
  (printer is okay with sequence and supports mode 4)

do repeat ...
control = control or 2 (autofeed)
status changes to 86 for me, status and 40 is 0 now
  (some status bits now encode a first nibble)
control = control and fd
status changes to c6 for me, status and 40 is 40 now
  (some status bits now encode a second nibble)
... while status and 8 is not 8

I cannot figure out if it is possible to abort the transfer
early. It seems to be good to leave while
  control = control and fd
by changing after that
 control = control or 8 (return selin to classic state)
but it often happened to me that I accidentally printed a
char when returning selin to classic state. Maybe it is
better to leave selin in ieee1284 state and leave it to
whoever next prints something real to return it to classic,
for example by assuming that the BIOS print stuff will do.
Maybe part of the problem was that I ran the protocol very
slowly, by typing I/O commands in debug manually.

This explanation is Public Domain ;-).

Eric



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-14 Thread CK Raju
Jim Hall <[EMAIL PROTECTED]> wrote:Including a copy of the license with the 
work is vital so that
everyone who gets a copy of the program can know what his rights are.
Here's what Eben Moglen has got to say :
"The copyright status accorded to each author of a computer program, the 
exclusive right to control copying, modification, and initial distribution of 
copies. Under US Copyright law, that's all there was, exclusively vested in the 
author. What the author then wanted was to give the power to copy and modify 
away. To remove exclusivity, and to provide to others what the statute gave 
exclusively to him or her. With respect to distribution, the only principle 
necessary in order to protect sharing was to say "if you redistribute, whether 
modified or unmodified, use these permissions and no other." 
 
The result of which was to ensure that downstream, if we may begin to adopt the 
riparian analogy, downstream from each maker, everything would float, freely 
available for further copying and modification, and each party redistributing 
to the stream was compelled to redistribute under those, and no other, rules. 
By honeycombing copyright in other words, by returning to the user some, but 
not absolutely all of the exclusive rights vested in the author under copyright 
law, the social artefacts desired (the freedom to copy, modify, and share) 
could be ensured at the full strength that copyright law ever ensures the 
author's rights. No further contractualisation, no further compulsion, no 
further form of legal coercion is necessary but a determination to enforce 
copyright for the benefit of sharing."

--
Complete link is at 
http://ia301337.us.archive.org/1/items/EbenMoglenLectureEdinburghJune2007text/scl2007_eben_moglen.html

Its worth reading. Forcing a public contribution to remain afloat is something 
worth considering seriously.

CK Raju


-
 Here’s a new way to find what you're looking for - Yahoo! Answers -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-14 Thread Jim Hall
I responded to Ladislav in private on this matter, but since Eric
raises a few points, I'll respond to those here.  License discussion
is getting off-topic from the original subject; if we need to continue
this discussion, let's switch to a new subject line.

On 7/13/07, Eric Auer <[EMAIL PROTECTED]> wrote:
>
> Hi Ladislav,
>
> > > You _need_ to include a copy of the GNU GPL with a copy of your
> > > program. I don't see one here. This file is usually named COPYING.
>
> > But it has no sense. LPTtest is supposed to be a part of FreeDOS and
> > FreeDOS itself has own copy of COPYING. Why should every small binary
> > to have own copy of this license?
>
> I myself solve this by having a copy of the GNU GPL text on my
> homepage. It is indeed strange to force people to download binary
> and source and GPL in one zip, in particular for tools where the
> GPL and/or sources is way larger than the tool itself.
>

This is an inappropriate application of the GNU GPL.  To make it very
clear which programs are under the GNU GPL and which are under a
different open source license (such as the MIT License {see FreeDOS
COMP or DEBUG} or the Artistic License {see FreeDOS EMM386}) it is
important to include your license terms with each program.  It may
seem silly for every program to include its own COPYING file, but it
important we do this to define each program's open source license.

This is also explained at
http://www.gnu.org/licenses/gpl-faq.html#WhyMustIInclude

>>>
Including a copy of the license with the work is vital so that
everyone who gets a copy of the program can know what his rights are.

It might be tempting to include a URL that refers to the license,
instead of the license itself. But you cannot be sure that the URL
will still be valid, five years or ten years from now. Twenty years
from now, URLs as we know them today may no longer exist.

The only way to make sure that people who have copies of the program
will continue to be able to see the license, despite all the changes
that will happen in the network, is to include a copy of the license
in the program.
<<<

and:

>>>
What if the work is not much longer than the license itself?

If a single program is that short, you may as well use a simple
all-permissive license for it, rather than the GNU GPL.
<<<

> > Maybe rather to spread it as public domain?
>
> Unfortunately, you cannot - your code is still only a TRANSLATION
> of Linux kernel code written in C with GPL license FIRST to Pascal
> and THEN to Assembly language,  but it still has some smell of GPL
> sticking to it. As you have written several functions from scratch,
> and as I have written some other functions from scratch, WE as the
> authors of THOSE functions can re-publish those functions under a
> Public Domain license. Then you could rewrite (stupid but true) the
> rest of LPTTEST from scratch based on the ieee1284 specs or another
> similar howto and then the whole of LPTTEST can become Public Domain.
>

I see what you are saying, but you must be careful with it.  It is
true that the author of a program may choose to re-release it under a
different license.  The GNU GPL FAQ mentions this in a few places,
starting at http://www.gnu.org/licenses/gpl-faq.html#HeardOtherLicense

But that statement only applies to releasing your code under a license
other than the GNU GPL.  Releasing as public domain is a little
different.  IANAL, but
http://www.gnu.org/licenses/gpl-faq.html#GPLUSGov mentions the core
issue of copyright: "... public domain, which means it is not
copyrighted. Since the GNU GPL is based on copyright, such a program
cannot be released under the GNU GPL. (It can still be  free software,
however; a public domain program is free.)"

If you re-write everything (including the bits that were originally
derived from sources covered under the GNU GPL) and can demonstrate
that the new code was not influenced by the old source but instead
from a public HOWTO or the actual IEEE 1284 specs, then you can
release that new code under any license you want.   You may even
choose to release it into the public domain.

Why did I say you should be careful?  When you release into the public
domain, you *cannot* claim copyright on it.  Public domain means it is
not copyrighted.  So while you can say "written by Ladislav" or some
such, you cannot say "Copyright (c) 2007 Ladislav".  Also, since it
enters the public domain, note that anyone may choose to re-use your
code in any program - someone may even choose to re-use your work to
create a proprietary program (i.e. without source code) and not give
you any of the credit.


>
> While I do like the GPL, in particular version 2, I also agree that
> it makes life unnecessarily complicated if you only write a quick
> tool of a kilobyte or two and do not really care if others recycle
> your code under whatever (maybe proprietary) license they like. So
> the really TINY tools from my collection are often Public Domain.
>

If you're writing

Re: [Freedos-devel] LPTtest v1.3

2007-07-13 Thread lyricalnanoha


On Sat, 14 Jul 2007, Eric Auer wrote:

> Unfortunately, you cannot - your code is still only a TRANSLATION
> of Linux kernel code written in C with GPL license FIRST to Pascal
> and THEN to Assembly language,  but it still has some smell of GPL
> sticking to it. As you have written several functions from scratch,
> and as I have written some other functions from scratch, WE as the
> authors of THOSE functions can re-publish those functions under a
> Public Domain license. Then you could rewrite (stupid but true) the
> rest of LPTTEST from scratch based on the ieee1284 specs or another
> similar howto and then the whole of LPTTEST can become Public Domain.

One measly line in Diman (a disk image reader I wrote some years ago in 
QuickBasic) is the entire reason I had to gpl it, when I would rather have 
released it BSD.  (it was for parsing a FAT12 table; the code came from 
the FreeDOS kernel.)

I'm not anti-GPL, don't get me wrong, I just don't like tethering others 
down with it, so when I write simple userland tools, I usually BSD or PD 
them.

-uso.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-13 Thread Eric Auer

Hi Ladislav,

> Wow! It is a touch of master!

Thanks, but a real master would have fixed the "out base,4 only if"
problem before uploading ;-).

> Despite I prefer TASM conventions your code is much cleaner...

Yeah I made sure that all commands are indented by 1 tab and all
comments are indented by another tab. Simply nicer to read, even
though it does not matter at all for the machine :-).

> I like your use of AAM instruction :-)

It is maybe evil and not portable to 64bit but it is also cool X-).

> The only thing I think was better in my code was common procedure
> for converting number to string for both numeric systems :-/

Depends. Your code is more flexible but using a loop of divides
just to display hex felt strange, too. So I made other code for
hex and, for fun, rewrote the decimal version with AAM. Your code
was also somewhat hard to read afair, but tastes differ.

> >probe all printers and ignore command line?
> No, I don't like this idea. Better would be to add switch "/A"

... or use a batch file ... okay!

> Are you really, absolutely sure that PC can't have LPT4?

The 40:0e value is used for EBDA on PS/2 and newer, and I do
not remember having any "LPT4" ISA hardware at any time, max
was two multi I/O with 1 LPT and 2 COM each plus a Hercules
graphics with a 3rd LPT during an attempt to have as many I/O
ports as possible. Plus FreeDOS kernel supports no LPT4 either.

> > - tune delay handling further?
> I think it is not necessary to more tune delay routine.

Well what I would suggest is to use only ONE tick for calibrate
and only 32 bit for counting. Might make division by 54 easier?
But then, my current division by 512 by shifting is easiest, only
problem with my method is that LPTTEST now takes half a second
for calibrating the delay loop.

> > - make "show for all printers" the default?

Your choice :-).

> > - out baseport,4 should be re-enabled after somebody figures out
> how to check for ieee1284 printer presence before that
> Or we can add some command line switch "/C" (compatibility)

Hmmm well it would make command line parsing more complicated
to allow 2 options simultaneously. And I would actually make
the default choice "yes - do the out baseport,4" anyway. Only
have to figure out how to detect the non-ieee1284 situation
where should abort before the out baseport,4 to avoid printing.


Eric


PS: Default state in DOSEMU is baseport+0/1/2 = 0, d8, 4
(tested with debug "i 378" etc), you can do the whole pnp
id stuff manually with debug and keep watching the state
to find out what changes when and how it differs from "no
printer" or "dosemu" or other non-ieee1284 situations...

Host sends clock via "autofeed" (hostbusy), device replies
via "ack" (ptrclk), note that "strobe" / "init" is not used.
Host sets "selin" for 1284. Printer "busy", "pe", "sel" and
"error" are (ab-)used for nibble data: www.fapo.com/1284int.htm
Normal printing, for comparison, sends clock via "strobe" and
gets replies via "busy" and then "ack".

There is also negotiation: www.fapo.com/negoti8.htm there,
you send nselin high, nautofeed low after setting data to
the requested mode (4 for LPTTEST), printer replies with
correct "ack" / "error" / "pe" / "sel" states, you "strobe",
at end of strobe flip "autofeed", printer replies with "pe"
state and (depending on capabilities) "error" and "select"
to tell if reverse channel and the requested mode are avail.
Then printer flips ack to tell that negotiation is done.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-13 Thread Eric Auer

Hi Ladislav,

> > You _need_ to include a copy of the GNU GPL with a copy of your
> > program. I don't see one here. This file is usually named COPYING.

> But it has no sense. LPTtest is supposed to be a part of FreeDOS and
> FreeDOS itself has own copy of COPYING. Why should every small binary
> to have own copy of this license?

I myself solve this by having a copy of the GNU GPL text on my
homepage. It is indeed strange to force people to download binary
and source and GPL in one zip, in particular for tools where the
GPL and/or sources is way larger than the tool itself.

> Maybe rather to spread it as public domain?

Unfortunately, you cannot - your code is still only a TRANSLATION
of Linux kernel code written in C with GPL license FIRST to Pascal
and THEN to Assembly language,  but it still has some smell of GPL
sticking to it. As you have written several functions from scratch,
and as I have written some other functions from scratch, WE as the
authors of THOSE functions can re-publish those functions under a
Public Domain license. Then you could rewrite (stupid but true) the
rest of LPTTEST from scratch based on the ieee1284 specs or another
similar howto and then the whole of LPTTEST can become Public Domain.

This should be feasible: If you subtract the text messages and the
complex Assembly language way to do delay, xwait, command line
parsing and string and number output for DOS, only something about
maybe 0.5 kilobytes of the 2 kilobytes of the LPTTEST.com binary are
still made based on GPL source code anyway.

While I do like the GPL, in particular version 2, I also agree that
it makes life unnecessarily complicated if you only write a quick
tool of a kilobyte or two and do not really care if others recycle
your code under whatever (maybe proprietary) license they like. So
the really TINY tools from my collection are often Public Domain.

Eric

PS: You should also have a look at some of the shorter alternative
licenses, including some copyleft ones... Check the list and...:
www.gnu.org/licenses/license-list.html
www.xfree86.org/3.3.6/COPYRIGHT2.html#3 and #5
www.jclark.com/xml/copying.txt
www.gnu.org/licenses/info/Sleepycat.html <-- a copyleft one :-)
www.freebsd.org/copyright/freebsd-license.html


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-13 Thread Ladislav Lacina
> You _need_ to include a copy of the GNU GPL with a copy of your
> program.  I don't see one here.  This file is usually named COPYING.

But it has no sense. LPTtest is supposed to be a part of FreeDOS and FreeDOS
itself has own copy of COPYING. Why should every small binary to have own
copy of this license?
Maybe rather to spread it as public domain?

> Also, I recommend you update the GNU GPL comment in your source code.
GNU GPL statement is exactly the same like in COMMAND.COM. (I used "ver /d >
gnu.txt")



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-13 Thread Ladislav Lacina
Wow! It is a touch of master!
Despite I prefer TASM conventions your code is much cleaner than mine. I
like your use of AAM instruction :-)
The only thing I think was better in my code was common procedure for
converting number to string for both numeric systems :-/

>Note: In dosemu on my 2 GHz PC, 1 msec is only 600 delay loop iterations
And how many for pure DOS system?

>probe all printers and ignore command line?
No, I don't like this idea. Better would be to add switch "/A" for all
ports. However this is not needed because you can call LPTtest from batch
file for all ports.
Are you really, absolutely sure that PC can't have LPT4? My eletronical
manual about PC says (translation from czech): 0:040Eh - port LPT4, PS/2:
Extended BIOS data segment
BTW: My computer shows on 0:040Eh value 208h - it doesn't look as BIOS data
segment, IMO

> - tune delay handling further?
I think it is not necessary to more tune delay routine.
> - make "show for all printers" the default?
No.

> - out baseport,4 should be re-enabled after somebody figures out how to
check for ieee1284 printer presence before that
Or we can add some command line switch "/C" (compatibility)

- Original Message -
From: "Eric Auer" <[EMAIL PROTECTED]>
To: 
Sent: Friday, July 13, 2007 5:22 PM
Subject: Re: [Freedos-devel] LPTtest v1.3


>
> Hi all,
>
> > I added help screen, possibility to scan other LPT ports and a little
> > modyfied delay routine. For help screen write lpttest /? link:
> > http://www.laaca-mirror.ic.cz/lpttest.zip
> (compiles with TASM and TLINK)
>
> I have thrown Michael Devore's NoMySo Perl script at the source
> and made a NASM version for people who prefer free assemblers :-)
>
>
http://www.coli.uni-saarland.de/~eric/stuff/soft/by-others/lpttest-nasm.zip
>
>
>
> In addition, I messed with the code and modified a few things:
>
> - made the code nicely indented for easy reading
> - buffer is in BSS again now (and btw, 1024h is not 1024 ;-)
>   so binary size is 2 kilobytes again now
> - multi line strings are only one string, not multi
>
> - modified the port number / address display, new hex2str
> - modified int2str for fun, now uses 1x div and 2x aam ;-)
> - there is no lpt4, only lpt1 to lpt3. suggestion: probe all
>   printers and ignore command line? depends on whether and
>   how you want to use lpttest in batch files...
> - commented out the "out baseport,4" for testing. GOOD: this
>   means you no longer print a diamond in dosemu and non-pnp
>   printers. BAD: it is quite possible that some printers now
>   no longer show their pnp string, please test
> - modified the delay and delay calibration functions: now
>   waits 0.5 sec for calibration and 1 msec for each delay,
>   using a 48 bit counter. Note: In dosemu on my 2 GHz PC,
>   1 msec is only 600 delay loop iterations (because the loop
>   contains I/O port access which is slow). Suggestion: use a
>   32 bit counter and calibrate during only 0.054 sec?
>
> I hope you like the changes, Laaca :-).
>
>
>
> As said, open issues are:
>
> - tune delay handling further?
> - make "show for all printers" the default?
> - maybe even remove command line handling?
>
> - out baseport,4 should be re-enabled after somebody figures
>   out how to check for ieee1284 printer presence before that
>
> The last point has most priority now if you ask me :-).
>
> Eric
>
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-13 Thread Jim Hall
On 7/12/07, Ladislav Lacina <[EMAIL PROTECTED]> wrote:
>
>
> I added help screen, possibility to scan other LPT ports and a little
> modyfied delay routine.
> For help screen write lpttest /?
> link: http://www.laaca-mirror.ic.cz/lpttest.zip
>

Hi Ladislav,


You _need_ to include a copy of the GNU GPL with a copy of your
program.  I don't see one here.  This file is usually named COPYING.

Also, I recommend you update the GNU GPL comment in your source code.
At the top of your program, you have this GPL statement:

;This program can be spread under conditions of GNU/GPL licence.


That's too brief.  To provide the best protection, you should include
this full text as a comment at the top of your LPTTEST.ASM file {I'm
only using GNU GPL v2 here, since the Linux code you reference
(derived from) is still covered ONLY BY GNU GPL v2.  Therefore, it
would be inappropriate to automatically promote this derivation to GNU
GPL v3.}:

   
   Copyright (C)   

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, only version 2 of the License.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see .

Also add information on how to contact you by electronic and paper mail.


If my assumption about GPL v2 only is correct, you'll need to update
the GPL statement you make in your help screen.  Here's what you have:

warr1 db 'This program is free software; you can redistribute it and/or modify',
13,10,0
warr2 db 'it under the terms of the GNU General Public License as published by',
13,10,0
warr3 db 'the Free Software Foundation; either version 2 of the License, or (at'
,13,10,0
warr4 db 'your option) any later version.',13,10,0


Specifically, you need to update warr3 and warr4 to not give the
option of a later version.  See my text, above.


-jh

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] LPTtest v1.3

2007-07-13 Thread Eric Auer

Hi all,

> I added help screen, possibility to scan other LPT ports and a little
> modyfied delay routine. For help screen write lpttest /? link:
> http://www.laaca-mirror.ic.cz/lpttest.zip
(compiles with TASM and TLINK)

I have thrown Michael Devore's NoMySo Perl script at the source
and made a NASM version for people who prefer free assemblers :-)

http://www.coli.uni-saarland.de/~eric/stuff/soft/by-others/lpttest-nasm.zip



In addition, I messed with the code and modified a few things:

- made the code nicely indented for easy reading
- buffer is in BSS again now (and btw, 1024h is not 1024 ;-)
  so binary size is 2 kilobytes again now
- multi line strings are only one string, not multi

- modified the port number / address display, new hex2str
- modified int2str for fun, now uses 1x div and 2x aam ;-)
- there is no lpt4, only lpt1 to lpt3. suggestion: probe all
  printers and ignore command line? depends on whether and
  how you want to use lpttest in batch files...
- commented out the "out baseport,4" for testing. GOOD: this
  means you no longer print a diamond in dosemu and non-pnp
  printers. BAD: it is quite possible that some printers now
  no longer show their pnp string, please test
- modified the delay and delay calibration functions: now
  waits 0.5 sec for calibration and 1 msec for each delay,
  using a 48 bit counter. Note: In dosemu on my 2 GHz PC,
  1 msec is only 600 delay loop iterations (because the loop
  contains I/O port access which is slow). Suggestion: use a
  32 bit counter and calibrate during only 0.054 sec?

I hope you like the changes, Laaca :-).



As said, open issues are:

- tune delay handling further?
- make "show for all printers" the default?
- maybe even remove command line handling?

- out baseport,4 should be re-enabled after somebody figures
  out how to check for ieee1284 printer presence before that

The last point has most priority now if you ask me :-).

Eric



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel