Yes, we have discussed some of yout tips before. Version 1.2 is not the
final version and I will upgrade it. I only wanted to introduce it to
FreeDOS community.

> - lpttest only checks LPT1 and does not check if the baseport
>   of LPT1 is nonzero (in other words, if LPT1 exists...).
>   It should check all of LPT1 / LPT2 / LPT3 if they exist.
Yes, I'll do it.

> - lpttest writes the value 4 to the data port without first
>   doing some ieee1284 control / status handshake test. This
>   means it will print a diamond sign on non plug and play
>   printers and in dosemu. That should be avoided. See for
>   example www.theiling.de/parport/introduction.html etc?
Well, I looked at it but I don't understand it very much. There is only
described the status of the pins in cable but not the contain of registers.
> - lpttest uses an array of 8 bytes as 64 bit delay counter. This
>   is overly complicated. Please use 3 or four 16 bit registers
>   instead, code will be more compact and easier to maintain.
Yes, it is quite compicated but works OK and I understand it. Other people
can take it as a blackbox :-)
Adding some I/O reads is quite good idea but isn't really needed because it
is no problem to increase the counter to MANY-bit delay counter. Inner loops
are quite similar, IMO.
> - lpttest uses some "shl/shr reg,imm" (neither 1 nor CL). This
>   seems to be the only thing which makes it 8086 incompatible?
>   As 8086 compatibility is easy to repair, please support 8086.
Uff, it is a stupid bug. Already corrected.
> - lpttest assumes that a timer tick is 64 msec, not 55, and I am
>   not sure if the calculation works out okay on the byte string.
Yes! I am proud to this ugly hack. Proper routine for dividing array of
bytes by 55 would be so complicated...
So, my timer is a little bit faster but why not. LPTtest is not for
scientific measuring :-)
For one byte strings it works too.
> - your stack seems to be very small. In a .com program, it is
>   better to leave the stack setup to the operating system unless
>   you need to shrink the stack eg to allocate more heap or go TSR.
Really? OK, I'll increase it. LPTtest is my first program written in
assembler so it is not perfect.
(I already wrote quite a lot of assembler code but it allways was an
included assembler in pascal source)
> - the Linux printer port plug and play probe combines per inter-
>   action timeouts with two global limits: Plug and play is aborted
>   if the printer sends more than 2 kB of data or if the whole
>   communication takes more than 5 seconds. Nice idea :-).
Well, why not, I could try it to write it too.
> - you could try to make lpttest fit into 1 kilobyte ;-) For example
>   present / second / ok_id / err_id / our_size + ret_size / failed_1
>   and failed_2 could be shorter and delay stuff could be simpler.
:-D
Why? It is not TSR so it would be only a programmers masturbation :-)
> - on PS/2 or newer, int 15 with ah=86 cx:dx=ysec might be useful for
>   delays (usually 1024 Hz granularity, your 1000 ysec should be fine)
>   but you will have to check first if the delay works, for example
>   by checking the BIOS ID or by checking 40:[6c] before/after a call.
I tried it and on my computer it doesn't work and I even think it works only
on machines by IBM. I know it is described in RBIL but I have never seen any
real source using this service.


-------------------------------------------------------------------------
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

Reply via email to