Discussion:
[Freedos-devel] announcing DOSUTIL - LS
Mark Olesen
2017-07-13 01:02:44 UTC
Permalink
Just for fun, I created an LS binary for FreeDOS.

It is hosted on github and can be found here:

https://github.com/markjolesen/dosutil

It is released into the Public Domain.

I was reading the FreeDOS e-mail list where Jim Hall was wanting Gnuish
utilities for FreeDOS. So, I was curios as to how hard it would be to
create some of the GNU coreutils. I realize there are DJGPP and other
binaries available. So, another replicate would most likely not be much use
to the public at large. However, for personal amusement I figured I would
give it a shot. Hopefully, someone else can enjoy it as well or glean
something from the madness of my coding. Let me know.
Louis Santillan
2017-07-13 21:43:11 UTC
Permalink
Not to pooh-pooh what you've done, but maybe you'd want to explore
something like suckless sbase [0][1], ubase [2][3], or toybox [4] or
beastiebox [5]? With OpenWatcom and/or DJGPP, it shouldn't be as hard
to port them.

[0] http://core.suckless.org/sbase
[1] http://git.suckless.org/sbase/tree/
[2] http://core.suckless.org/ubase
[3] http://git.suckless.org/ubase/tree/
[4] http://landley.net/toybox/about.html
[5] http://beastiebox.sourceforge.net/
Post by Mark Olesen
Just for fun, I created an LS binary for FreeDOS.
https://github.com/markjolesen/dosutil
It is released into the Public Domain.
I was reading the FreeDOS e-mail list where Jim Hall was wanting Gnuish
utilities for FreeDOS. So, I was curios as to how hard it would be to create
some of the GNU coreutils. I realize there are DJGPP and other binaries
available. So, another replicate would most likely not be much use to the
public at large. However, for personal amusement I figured I would give it a
shot. Hopefully, someone else can enjoy it as well or glean something from
the madness of my coding. Let me know.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
https://lists.sourceforge.net/lists/listinfo/freedos-devel
Mark Olesen
2017-07-13 23:49:36 UTC
Permalink
It is not a port. It is a 16-bit clone with a FreeDOS attitude weighing in
less then 6K and pretty darn fast. I did it because it was fun. Whether or
not it is useful is another matter.

Porting Unix programs to a DOS based system is not that straight forward.
DJGPP provides a bunch of wrappers to get the functionality to do it.
However, they are 32-bit PM apps. Great stuff for sure.

Anyway, it came to my attention that Ercan is working on DOS Coreutils
Project.
Post by Louis Santillan
Not to pooh-pooh what you've done, but maybe you'd want to explore
something like suckless sbase [0][1], ubase [2][3], or toybox [4] or
beastiebox [5]? With OpenWatcom and/or DJGPP, it shouldn't be as hard
to port them.
[0] http://core.suckless.org/sbase
[1] http://git.suckless.org/sbase/tree/
[2] http://core.suckless.org/ubase
[3] http://git.suckless.org/ubase/tree/
[4] http://landley.net/toybox/about.html
[5] http://beastiebox.sourceforge.net/
Post by Mark Olesen
Just for fun, I created an LS binary for FreeDOS.
https://github.com/markjolesen/dosutil
It is released into the Public Domain.
I was reading the FreeDOS e-mail list where Jim Hall was wanting Gnuish
utilities for FreeDOS. So, I was curios as to how hard it would be to
create
Post by Mark Olesen
some of the GNU coreutils. I realize there are DJGPP and other binaries
available. So, another replicate would most likely not be much use to the
public at large. However, for personal amusement I figured I would give
it a
Post by Mark Olesen
shot. Hopefully, someone else can enjoy it as well or glean something
from
Post by Mark Olesen
the madness of my coding. Let me know.
------------------------------------------------------------
------------------
Post by Mark Olesen
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
https://lists.sourceforge.net/lists/listinfo/freedos-devel
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
https://lists.sourceforge.net/lists/listinfo/freedos-devel
Rugxulo
2017-07-14 01:22:35 UTC
Permalink
Hi,
Post by Mark Olesen
Just for fun, I created an LS binary for FreeDOS.
https://github.com/markjolesen/dosutil
Cool stuff. Though I haven't actually run it yet (nor built atop DOS proper).

Just a few tips:

1). You don't need a separate ls.lnk file at all, even under DOS.

For DOS, you can use "CC = *wcc" (notice the asterisk, aka star) for
working with "long" cmdlines. In this case, you would use "*wlink". (I
haven't personally tested this particular fix in native DOS yet, but
I've successfully done it for other projects.) See section 10.39 in
tools.pdf.

So the relevant makefile lines would now be:

ls.exe : $(OBJS)
*wlink name ls.exe format dos debug all op map file $(OBJS: =,)

(You linked objects in different order in ls.lnk, but when I adjusted
the makefile to use the same order, the resultant binary was the exact
same as yours, built here on Win7 64-bit. And yes, you need "format
dos" else it seems to think it's a Win16 .EXE, ugh.).

2). The other obvious improvement is this:

clean: .SYMBOLIC
@rm -f *.obj ls.exe *.map

I take it that you didn't know that Wmake has its own "rm" built-in?
So no need to use multiple "del"s here. (tools.pdf also mentions that
Wmake intercepts "set" and "for".)
Mark Olesen
2017-07-14 07:22:39 UTC
Permalink
Great tips. I modified the makefile using your suggestions. Thank you.
Post by Rugxulo
Hi,
Post by Mark Olesen
Just for fun, I created an LS binary for FreeDOS.
https://github.com/markjolesen/dosutil
Cool stuff. Though I haven't actually run it yet (nor built atop DOS proper).
1). You don't need a separate ls.lnk file at all, even under DOS.
For DOS, you can use "CC = *wcc" (notice the asterisk, aka star) for
working with "long" cmdlines. In this case, you would use "*wlink". (I
haven't personally tested this particular fix in native DOS yet, but
I've successfully done it for other projects.) See section 10.39 in
tools.pdf.
ls.exe : $(OBJS)
*wlink name ls.exe format dos debug all op map file $(OBJS: =,)
(You linked objects in different order in ls.lnk, but when I adjusted
the makefile to use the same order, the resultant binary was the exact
same as yours, built here on Win7 64-bit. And yes, you need "format
dos" else it seems to think it's a Win16 .EXE, ugh.).
clean: .SYMBOLIC
@rm -f *.obj ls.exe *.map
I take it that you didn't know that Wmake has its own "rm" built-in?
So no need to use multiple "del"s here. (tools.pdf also mentions that
Wmake intercepts "set" and "for".)
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
https://lists.sourceforge.net/lists/listinfo/freedos-devel
Loading...