Re: [Freedos-devel] Difference between command.com and frecom.com when parsing command line arguments of a batch file.

2014-07-18 Thread Steve Nickolas
On Sat, 19 Jul 2014, Mateusz Viste wrote:

> Hi all,
>
> I think this problem goes beyond "path separators". As I understand it, 
> any argument including a slash character will get exploded. So yes, this 
> might be used as path separator, but not only. For eg. sed expects slash 
> delimited values inside a single argument.
>
> @Juan - you also write about other "different issues and limitations" - 
> could you please post us a list? Even if FreeCom is semi-maintained 
> nowadays, it would still be interesting to know what kind of quirks you 
> found there..

command.com should not be splitting the strings at all, but should send 
the parameters "in the raw", terminated (iirc) by a newline.  It is for 
the libc to parse them; if otherwise, that is a serious flaw.

There *is* the option of 4DOS.

-uso.

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Difference between command.com and frecom.com when parsing command line arguments of a batch file.

2014-07-18 Thread Mateusz Viste
Hi all,

I think this problem goes beyond "path separators". As I understand it, any 
argument including a slash character will get exploded. So yes, this might be 
used as path separator, but not only. For eg. sed expects slash delimited 
values inside a single argument.

@Juan - you also write about other "different issues and limitations" - could 
you please post us a list? Even if FreeCom is semi-maintained nowadays, it 
would still be interesting to know what kind of quirks you found there..

regards,
Mateusz




On July 19, 2014 12:09:51 AM GMT+02:00, Juan Manuel Guerrero 
 wrote:
>Am 18.07.2014 22:30, schrieb Rugxulo:
>> Hi,
>>
>> On Fri, Jul 18, 2014 at 2:00 PM, Juan Manuel Guerrero
>>  wrote:
>>> I do not know if this is the right place to report this FreCom issue
>> Dunno, not sure it's actively maintained by anyone anymore.
>I feared this.
>
>>> I do not know if this issue is already well known but I would like
>to
>>> report it anyway.
>>>
>>> If I use FreeCom 0.84-pre2 XMS_Swap [August 28 2006  00:32:15]
>shipped
>>> with FreeDOS 1.1 and start the batch file in exactly the same way I
>get
>>> the following output:
>>>
>>> As can be seen, FreCom seems to interpret any slash as an option
>marker
>>> like in "/?" to get help.  All microsoft command.com versions and
>also cmd.exe
>>> do interpret the slash as an option marker only if it is preceded by
>some
>>> kind of blank character.  This makes it necessary to quote paths
>written in
>>> unix-style like:
>>> "../foo/bar/."
>>> if they shall be passed as arguments to a batch file to be processed
>by FreCom.
>>> Is this behavior a bug or a feature?
>> I definitely reported this same quirk to somebody a few years ago.
>> Obviously it was never fixed. It was probably just an unintentional
>> flaw or too obscure to worry about. I mean, most DOS programs don't
>> use *nix slashes as path separators.
>>
>> I wish I had better news for you like, "I made a fix", but it's not
>> really that easy. (Not impossible, just very annoying.)
>>
>
>This is not really disappointing.  I was only testing for the
>possibility
>to recommend the FreeDOS 1.1 distribution as an alternative to
>WinXP and/or Win98SE to build DJGPP ports but this seems not
>really be possible due to different issues and limitations.



--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Difference between command.com and frecom.com when parsing command line arguments of a batch file.

2014-07-18 Thread Ralf Quint
On 7/18/2014 3:09 PM, Juan Manuel Guerrero wrote:
> This is not really disappointing. I was only testing for the 
> possibility to recommend the FreeDOS 1.1 distribution as an 
> alternative to WinXP and/or Win98SE to build DJGPP ports but this 
> seems not really be possible due to different issues and limitations. 
> Regards, Juan M. Guerrero
DOS internally should work with both back and forward slashes.
"Any" DOS command shell, including MS-DOS 6.22 should not except the 
forward slashes even in a batch file as you claim, "unless" the "switch 
char" has been deliberately been changed to something else via INT21H, 
function 37h...

Ralf

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Difference between command.com and frecom.com when parsing command line arguments of a batch file.

2014-07-18 Thread Juan Manuel Guerrero
Am 18.07.2014 22:30, schrieb Rugxulo:
> Hi,
>
> On Fri, Jul 18, 2014 at 2:00 PM, Juan Manuel Guerrero
>  wrote:
>> I do not know if this is the right place to report this FreCom issue
> Dunno, not sure it's actively maintained by anyone anymore.
I feared this.

>> I do not know if this issue is already well known but I would like to
>> report it anyway.
>>
>> If I use FreeCom 0.84-pre2 XMS_Swap [August 28 2006  00:32:15] shipped
>> with FreeDOS 1.1 and start the batch file in exactly the same way I get
>> the following output:
>>
>> As can be seen, FreCom seems to interpret any slash as an option marker
>> like in "/?" to get help.  All microsoft command.com versions and also 
>> cmd.exe
>> do interpret the slash as an option marker only if it is preceded by some
>> kind of blank character.  This makes it necessary to quote paths written in
>> unix-style like:
>> "../foo/bar/."
>> if they shall be passed as arguments to a batch file to be processed by 
>> FreCom.
>> Is this behavior a bug or a feature?
> I definitely reported this same quirk to somebody a few years ago.
> Obviously it was never fixed. It was probably just an unintentional
> flaw or too obscure to worry about. I mean, most DOS programs don't
> use *nix slashes as path separators.
>
> I wish I had better news for you like, "I made a fix", but it's not
> really that easy. (Not impossible, just very annoying.)
>

This is not really disappointing.  I was only testing for the possibility
to recommend the FreeDOS 1.1 distribution as an alternative to
WinXP and/or Win98SE to build DJGPP ports but this seems not
really be possible due to different issues and limitations.

Regards,
Juan M. Guerrero

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] Difference between command.com and frecom.com when parsing command line arguments of a batch file.

2014-07-18 Thread Rugxulo
Hi,

On Fri, Jul 18, 2014 at 2:00 PM, Juan Manuel Guerrero
 wrote:
>
> I do not know if this is the right place to report this FreCom issue

Dunno, not sure it's actively maintained by anyone anymore.

http://www.freedos.org/software/?prog=command
http://sourceforge.net/p/freedos/svn/HEAD/tree/freecom/

> I do not know if this issue is already well known but I would like to
> report it anyway.
>
> If I use FreeCom 0.84-pre2 XMS_Swap [August 28 2006  00:32:15] shipped
> with FreeDOS 1.1 and start the batch file in exactly the same way I get
> the following output:
>
> As can be seen, FreCom seems to interpret any slash as an option marker
> like in "/?" to get help.  All microsoft command.com versions and also cmd.exe
> do interpret the slash as an option marker only if it is preceded by some
> kind of blank character.  This makes it necessary to quote paths written in
> unix-style like:
>"../foo/bar/."
> if they shall be passed as arguments to a batch file to be processed by 
> FreCom.
> Is this behavior a bug or a feature?

I definitely reported this same quirk to somebody a few years ago.
Obviously it was never fixed. It was probably just an unintentional
flaw or too obscure to worry about. I mean, most DOS programs don't
use *nix slashes as path separators.

I wish I had better news for you like, "I made a fix", but it's not
really that easy. (Not impossible, just very annoying.)

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] FreeDOS JetDirect driver (was: Getting started)

2014-07-18 Thread Louis Santillan
Or thinking of Andrew Wu's/DM&P's cross compiler script [1]?  It would let
you build on Windows for DOS/djgpp.

[1] https://github.com/andrewwutw/build-djgpp


On Fri, Jul 18, 2014 at 11:21 AM, Steve Nickolas  wrote:

> On Fri, 18 Jul 2014, Rugxulo wrote:
>
> > Hi, Jim,
> >
> > On Fri, Jul 18, 2014 at 10:26 AM, Jim Michaels 
> wrote:
> >>
> >> a windows version of DJGPP is in the wings, based on cygwin I think.
> there's an alpha you can compile with cygwin.
> >
> > This is so wrong that I don't even know where to begin.
> >
> > DJGPP only runs on DOS (or similar like NTVDM or DOSEMU). It does not
> > use PE/COFF at all, nor DLLs, nor Win32 APIs.
> >
> > Sure, you can have some kind of bound / family (or whatever) .EXE that
> > can run on two OSes (RSXNT). Sure, with other compilers (like
> > OpenWatcom), you can use external API emulation (e.g. HX). Sure, you
> > can use GCC to cross-compile from one OS to another. And yes, both
> > Cygwin and DJGPP use GCC + BinUtils, but everything else is different
> > (especially the libc).
> >
> > I don't know who told you that DJGPP was ever interested in Windows.
> > If you have proof of that, I'd like to see it, but I'm not holding my
> > breath.   :-)
>
> Prolly thinking MinGW?
>
> -uso.
>
>
> --
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>
--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


[Freedos-devel] Difference between command.com and frecom.com when parsing command line arguments of a batch file.

2014-07-18 Thread Juan Manuel Guerrero
I do not know if this is the right place to report this FreCom issue and
I do not know if this issue is already well known but I would like to
report it anyway.
Please inspect the following batch file:

@echo off
@echo %0
:loop
@echo %1
shift
if not "%1" == "" goto loop
@echo finished with arguments


command.com on MSDOS 6.22, Win98SE and WinXP and also cmd.exe of WinXP
will produce the following output:
   test.bat
   ./..
   ../.
if the batch file is started like this:
   test.bat ./.. ../.

If I use FreeCom 0.84-pre2 XMS_Swap [August 28 2006  00:32:15] shipped
with FreeDOS 1.1 and start the batch file in exactly the same way I get
the following output:
   test.bat
   .
   /..
   ..
   /.
As can be seen, FreCom seems to interpret any slash as an option marker
like in "/?" to get help.  All microsoft command.com versions and also cmd.exe
do interpret the slash as an option marker only if it is preceded by some
kind of blank character.  This makes it necessary to quote paths written in
unix-style like:
   "../foo/bar/."
if they shall be passed as arguments to a batch file to be processed by FreCom.
Is this behavior a bug or a feature?

Regards,
Juan M. Guerrero


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] FreeDOS JetDirect driver (was: Getting started)

2014-07-18 Thread Steve Nickolas
On Fri, 18 Jul 2014, Rugxulo wrote:

> Hi, Jim,
>
> On Fri, Jul 18, 2014 at 10:26 AM, Jim Michaels  wrote:
>>
>> a windows version of DJGPP is in the wings, based on cygwin I think. there's 
>> an alpha you can compile with cygwin.
>
> This is so wrong that I don't even know where to begin.
>
> DJGPP only runs on DOS (or similar like NTVDM or DOSEMU). It does not
> use PE/COFF at all, nor DLLs, nor Win32 APIs.
>
> Sure, you can have some kind of bound / family (or whatever) .EXE that
> can run on two OSes (RSXNT). Sure, with other compilers (like
> OpenWatcom), you can use external API emulation (e.g. HX). Sure, you
> can use GCC to cross-compile from one OS to another. And yes, both
> Cygwin and DJGPP use GCC + BinUtils, but everything else is different
> (especially the libc).
>
> I don't know who told you that DJGPP was ever interested in Windows.
> If you have proof of that, I'd like to see it, but I'm not holding my
> breath.   :-)

Prolly thinking MinGW?

-uso.

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] FreeDOS JetDirect driver (was: Getting started)

2014-07-18 Thread Rugxulo
Hi, Jim,

On Fri, Jul 18, 2014 at 10:26 AM, Jim Michaels  wrote:
>
> a windows version of DJGPP is in the wings, based on cygwin I think. there's 
> an alpha you can compile with cygwin.

This is so wrong that I don't even know where to begin.

DJGPP only runs on DOS (or similar like NTVDM or DOSEMU). It does not
use PE/COFF at all, nor DLLs, nor Win32 APIs.

Sure, you can have some kind of bound / family (or whatever) .EXE that
can run on two OSes (RSXNT). Sure, with other compilers (like
OpenWatcom), you can use external API emulation (e.g. HX). Sure, you
can use GCC to cross-compile from one OS to another. And yes, both
Cygwin and DJGPP use GCC + BinUtils, but everything else is different
(especially the libc).

I don't know who told you that DJGPP was ever interested in Windows.
If you have proof of that, I'd like to see it, but I'm not holding my
breath.   :-)

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] FreeDOS JetDirect driver (was: Getting started)

2014-07-18 Thread Jim Michaels
a windows version of DJGPP is in the wings, based on cygwin I think. there's an 
alpha you can compile with cygwin.

- Original Message -
> From: Rugxulo 
> To: Technical discussion and questions for FreeDOS developers. 
> 
> Cc: 
> Sent: Monday, July 14, 2014 9:18 PM
> Subject: Re: [Freedos-devel] FreeDOS JetDirect driver (was: Getting started)
> 
> Hi,
> 
> On Thu, Jul 10, 2014 at 5:30 PM, Jim Michaels  wrote:
>> 
>>  seg:ofs=(seg*16)+ofs=(seg<<4)+ofs (note that it is not bit or, it is 
> addition). translation of such an address is
>>  I think requires some macros or functions in DJGPP C/C++ compiler which 
> uses protected mode (or other
>>  dos extenders) because of the 32bit flat addressing. C/C++ could be fast 
> enough,
> 
> Just to clarify:
> 
> DJGPP does not use an "extender" but instead is pure DPMI (0.9 or
> higher) "only", ever since v2 debuted (circa 1996). DJGPP requires a
> 386 or higher and a 32-bit DPMI host, but DPMI itself can also
> (optionally) support 286 machines (like old Borland compilers) as
> well. So DPMI is not always "32-bit".
> 
>>  you may have to write your proc using GAS in ASM {} I think it is in 
> the C compiler using AT&T assembler syntax.
> 
> GAS has (also) supported (optional) "intel" syntax since 2.11 or such,
> many many years ago. Latest BinUtils (at least for DJGPP) is 2.24r2,
> so that should be no problem.
> 
> Even beyond that, both NASM and YASM support DJGPP's COFF format. Both
> of them support "intel" natively (although YASM has an optional 
> AT&T
> parser as well).
> 
>>  while this would be a fun project for me to do, DJGPP is unavailable to me 
> as of yet because the
>>  windows version is still under development.
> 
> I hope this doesn't come across as too glib or too obvious, so please
> don't take offense, but 
> 
> DJGPP has no "Windows version". It's a pure DOS compiler only. 
> There
> is no Windows support. None is in the works. None was ever made. (I'm
> aware of very very small and obscure and incomplete hacks like RSXNT,
> but those don't count. Or at least haven't counted, even unofficially,
> since 15 years ago.) The only thing "Windows" about DJGPP is its
> occasional use on NTVDM (with its buggy DPMI server) on such OSes as
> WinXP or (much less functionally) later versions.
> 
> "Still under development" ... hardly. There is no work towards Windows
> support at all. Volunteers are few. There is no PE/COFF support. It
> does not access any Windows APIs directly. There is no support for
> (PE/COFF) .DLLs. It was not supposed to. The whole idea of DPMI was to
> extend DOS and play well in both native DOS and Windows and other
> compatibles (e.g. OS/2). Obviously Windows doesn't care about that
> anymore.
> 
> DJGPP cannot currently even pretend to care about Windows. It's still
> "DOS only". I'm not saying it isn't possible, of course, and 
> who knows
> what people have in mind. But as of right now it's just not there, not
> even a little.
> 
>>  and I would not know how to submit this project to the FreeDOS FTP area. I 
> have tried before and failed.
> 
> You mean iBiblio? They long ago disabled anonymous FTP submissions. I
> don't know why, probably for security reasons.
> 
> If you have any (free/libre, "four freedoms") software that you want
> someone to mirror to iBiblio, feel free to contact Jim Hall, Mateusz
> Viste, or me. (Or maybe others too, Aitor? Dunno.)
> 
>>  well, that's enough food for thought for whoever is getting started. 
> that's enough info to get the project rolling.
>>  I wish I had my DOS dev environment working!
> 
> What environment? Can't you use RUFUS or VirtualBox or similar?
> 
> There is a public DJGPP cross-compiler (thanks to Andrew Wu), but I've
> still got it sitting here unused. I haven't found the energy to test
> it out much. It's still not "Windows", but it will cross-compile 
> (to
> DOS) at least from modern Windows (even 64-bit).
> 
> https://github.com/andrewwutw/build-djgpp/releases
> http://www.bttr-software.de/forum/board_entry.php?id=13451#p13451
> 
> EDIT: It seems to work okay, although silly avast! antivirus decided
> to make it 10x slower by checking every .EXE that was run, sigh.
> 
> --
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> 
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
> 

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same sof

Re: [Freedos-devel] FreeDOS Roadmap: (Was Getting started

2014-07-18 Thread Jim Michaels

I would like to add a book to that list: PC Intern system programming by 
tisher, ,abacus books, it's an encyclopedia pf dos programming know-how and it 
looks wonderful.


- Original Message -
> From: Michael B. Brutman 
> To: Technical discussion and questions for FreeDOS developers. 
> 
> Cc: 
> Sent: Sunday, July 13, 2014 12:24 PM
> Subject: Re: [Freedos-devel] FreeDOS Roadmap: (Was  Getting started
> 
> 
> Re: FreeDOS vs. DOS-like operating systems
> 
> There are plenty of DOS-like hobby projects out there.  But without 
> applications, they are pretty limited.  I think a lot of the value in 
> DOS and FreeDOS is the ability to run existing applications.  So we need 
> to decide on what we are trying to do; are we going to morph FreeDOS 
> into yet another hobby operating system that is only slightly compatible 
> with existing software, or are we going to keep it an open DOS clone?
> 
> 
> Re: Protected mode networking
> 
> Networking provides the most value when it is an integral part of the 
> operating system.  Otherwise, we just have disparate applications that 
> bring their own library code that the OS is unaware of.
> 
> Even just the limited "fix the libraries" solution does not work 
> because 
> many of the networking applications are stuck in the 90s. The 
> application code needs to be fixed too.  In general, networking needs 
> much more focus; the libraries really are not the problem.
> 
> mTCP is a poor example to use; it is a personal project with a very 
> specific set of goals.  I was not happy with the TCP/IP code that I 
> found and I took the radical step of writing everything from scratch.  
> That approach is not scalable and I do not advocate.  mTCP and FreeDOS 
> are two different projects with different roadmaps.
> 
> 
> Re: Emulation environments
> 
> We're going to have to face reality one day; hardware will move away 
> from FreeDOS faster than FreeDOS can keep up with it.  Unless we can 
> attract a lot more interest in hard-core, low level programming skills 
> then emulation will be the only way to deal with this problem.
> 
> 
> Re: Documentation
> 
> Documentation for DOS is out there but it is so scattered and so 
> disorganized.  You have to know what you are looking for and where to 
> look for it.  The forums at BTTR software provide a good place for 
> people to talk about programming.  There are still Usenet forums out 
> there that are active.  There are other web forums.  It is terribly 
> fragmented.
> 
> We need a DOS programming Wiki that can get people started.  Things like 
> what development environments are available, primers on real mode vs. 
> protected mode programming, where the good libraries are, reading lists 
> on where to look for more, suggested books, etc.
> 
> The network redirector interface is a poor example to use; it has never 
> been properly documented.  If you have the 2nd edition of "Undocumented 
> DOS" then you can get pretty close to it.  There was a new project 
> announced here recently that used it to provide file system access under 
> VMWare.  I have looked at it a few times to implement my own version of 
> a network file system and I've just decided it's not worth the effort.
> 
> 
> Mike
> 
> 
> --
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
> 

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] FreeDOS JetDirect driver

2014-07-18 Thread Jim Michaels
I don't know if you knew this, but you can telnet to the printer ip and port, 
HP is 9100. then send it data, and disconnect.

I now have code that can be integrated with mtcp I think. I have not compiled 
it yet. https://www.dropbox.com/s/mjh2qxdsw23ld55/netprint.cpp



- Original Message -
> From: Michael B. Brutman 
> To: Technical discussion and questions for FreeDOS developers. 
> 
> Cc: 
> Sent: Saturday, July 12, 2014 9:17 AM
> Subject: Re: [Freedos-devel] FreeDOS JetDirect driver
> 
> 
> My understanding of the printer problem leads to believe this is not 
> terribly easy.
> 
> If every program out there uses the BIOS interrupts to send data to the 
> printer, then it is pretty easy - you install a handler to intercept the 
> BIOS calls and buffer the outgoing data elsewhere. The outgoing data 
> then gets sent via a network to the printer.  A TSR is not really even 
> needed; you can have a standard program do this, shell to DOS, and then 
> run the program to be intercepted from there.  Not as convenient as a 
> TSR, but much easier for debugging.
> 
> However, if a program "bit bangs" the parallel port directly you 
> can't 
> capture that output.  I don't know of any technique that allows one to 
> intercept raw port I/O commands, unless you are running in a virtual 
> machine (virtual 8086 mode included).  Then the host operating system 
> technically can intercept raw port I/O.
> 
> The mTCP netcat program can be used to send the contents of a file 
> straight to a printer.  I think the HP JetDirect stuff (often found on 
> other printers) is pretty crude; it is just an open port and there is no 
> protocol or handshaking required.
> 
> 
> Mike
> 
> 
> --
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
> 

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] FreeDOS JetDirect driver

2014-07-18 Thread Michael B. Brutman
On 7/18/2014 4:10 AM, Mateusz Viste wrote:
> Actually, that's exactly what jd.exe does from the wattcp/pprd package,
> too. "Send job to printer or spooler using direct protocol."
>
> http://archives.scovetta.com/pub/simtelnet/msdos/lan/pprd200.zip
>
> Source code is included.
>
> The nice thing is that it uses printer configuration from wattcp.cfg, so
> it'a bit more 'integrated' than a general-purpose netcat.
>
> Mateusz
>

This:

nc -target 192.168.2.20 9100 -bin < \xmas.ps

is not simple enough?

I much prefer to use general purpose tools when they are available. 
Netcat is a pretty standard Unix tool, and this is just one of the many 
tricks you can do with it.  No configuration in a file needed either.


Mike

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] FreeDOS JetDirect driver

2014-07-18 Thread Mateusz Viste
Actually, that's exactly what jd.exe does from the wattcp/pprd package, 
too. "Send job to printer or spooler using direct protocol."

   http://archives.scovetta.com/pub/simtelnet/msdos/lan/pprd200.zip

Source code is included.

The nice thing is that it uses printer configuration from wattcp.cfg, so 
it'a bit more 'integrated' than a general-purpose netcat.

Mateusz




On 07/18/2014 06:06 AM, Michael B. Brutman wrote:
> On 7/17/2014 1:49 PM, Jim Michaels wrote:
>> for the network stufff, I was thinking of opening a socket and just dumping 
>> the printer data from stdin or from a file depnding on commandline options. 
>> it'
>> s the easiest way to go. sockets is probably about 10-20 lines of code I 
>> think.
>> google sockets example (or look in the source code of the telnet program in 
>> wattcp).
>> then it's not
>>
>>
>> DHCP printers are another thing altogether.  they do exist, they seem to be 
>> the consumer printers like officejets and like printers that have wifi or 
>> ethernet. they default to DHCP, but can be manually config'd for static 
>> (works better I think with static, just make sure ip is outside of DHCP 
>> range).
>>
>> not sure how to handle usb printers at this point. I know they are packet 
>> driven. usb.org has the specs. usb 2.0 uses 8b/10b but usb 3.0 uses 
>> 128b/132b encoding.
>>
>
> You are aware that netcat already exists and has the capabilities that
> you wrote about - the ability to open a socket to the printer and send
> data from stdin or a file.
>
> (See my email to this list dated July 12th.)
>
>
> Mike
>
> --
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel