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