[Freedos-user] FreeDOS program/beginner's problems
Hi all, I'm trying to write a small program that will distinguish whether running under dosemu/FreeDOS or not, and accordingly do other things. I ran into problems which I can not solve, so please, if someone here will be able to help. I'm using Open Watcom C 1.9 compiler on FreeDOS 1.1. And it is one of my first C programs, thus please excuse my ignorance. I perform Dosemu detection according to instruction and example in this old FreeDOS maillist thread: http://marc.info/?l=freedos-devm=88425176918117w=2 But when my program look as: #include string.h // strcmp, strrchr, strncat, strlen int main(int argc, char const *argv[]) { struct dosemu_detect { char magic[8]; unsigned char ver[4]; }; static struct dosemu_detect far *p = (void far*) 0xF000FFE0; char magicexp[]=$DOSEMU$; // expected string when on DOSEMU if (strcmp(p-magic, magicexp)) // p-magic == $DOSEMU$ ? {... then result if always false - even when running on Dosemu/FreeDOS, strcmp return '-1', as if $DOSEMU$ magic was not at 0xF000FFE0. But it is, because when i rewrote this to: int ii,dexist=0; for (ii=0; ii sizeof(p-magic); ii++) if (p-magic[ii] != magicexp[ii]) dexist++; then Dosemu detection works OK. Where can be problem? One thing I could think of - maybe strcmp() expect same segment register for both its arguments? (I'm using tiny memory model and link .COM instead of .EXE, for minimalize program size) (and curiously, in referenced thread deprecated method Int 0xE6 AH=0 still /after ~17 years/ is supported and seems be working well) Thanks for any help in advance, Franta Hanzlik -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] How to run Fractint in FreeDOS in VirtualBox?
Most camera chips today exceed 2 gig. DS On Fri, 6 Feb 2015 21:18:55 -0500 dmccunney dennis.mccun...@gmail.com writes: On Fri, Feb 6, 2015 at 7:21 PM, Dale E Sterner sunbeam...@juno.com wrote: Freedos can give me fat 32 capabilities. Reading writing to bigger chips. Why would you *need* to? I still have my original PC clone running DOS in a shelf. I has a replacement motherboard with a NEC V20 chip running at 10mhz, 640K of RAM, an AST 6-Pak addon card with a megabyte of EMS memory, allocated between a 512K ramdisk, a 256K disk cache, and EMS for apps that could use it, a Hercules graphics card that drove an amber monitor, dual 360K full height floppies, and two Seagate ST-225 MFM 20 *MB* hard drives. DOS was small, apps were small, and data wasn't all that large. I had space to burn. I have FreeDOS installed to multiboot on an old notebook with a 40GB drive that also boots Win2K, and Puppy and Ubuntu Linux. Win2K has a 20GB NTFS slice. Ubuntu and Puppy each have 8GB ext4 slices. FreeDOS is on a 2GB FAT32 slice. The rest is a swap area for Puppy and Ubuntu. I allocated the 2GB slice for FreeDOS expecting to use FAT16, and FAT32 support was a happy fringe benefit. Even with a full FreeDOS installation including pretty much everything on the ISO, and an assortment of other old DOS apps, I think I've used about a quarter of the 2GB FreeDOS partition. I'm trying to think of what I might store there using DOS that would *need* more space, and can't think of anything. The advantage to FAT32 was more efficient use of existing space, because a cluster could be a lot smaller. Qpro 3 works great. I hate to mess with sucess. Sometimes the new version isn't as good as the old - it happens. As long as QPro 3 does what you need from a spreadsheet, splendid. Most of us upgrade to get things the current versions of what we run *can't* do, and we get new versions to get those new features. cheers DS __ Dennis - - Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user Protect what matters Floods can happen anywhere. Learn your risk and find an agent today. http://thirdpartyoffers.juno.com/TGL3165/54d792a11ec6d12a153f5mp09duc ** From Dale Sterner - MS organic chemistry http://pubs.acs.org/doi/abs/10.1021/jo00975a052 *** -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] How to run Fractint in FreeDOS in VirtualBox?
I'm glad mine is doing so well. A big help at tax time. DS On Sat, 07 Feb 2015 06:10:56 + Thomas Mueller mueller6...@twc.com writes: from Dale E Sterner and dmccunney: Qpro 3 works great. I hate to mess with sucess. Sometimes the new version isn't as good as the old - it happens. As long as QPro 3 does what you need from a spreadsheet, splendid. Most of us upgrade to get things the current versions of what we run *can't* do, and we get new versions to get those new features. I upgraded to QPro 5 for DOS, that had three-dimensional spreadsheets. I believe that was the last DOS Qpro release. I still use it sporadically, but for the most part, have migrated to Gnumeric. FreeDOS is rather difficult to run on my system, won't run at all with EMM386, and forget other DOSes. Tom - - Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user Protect what matters Floods can happen anywhere. Learn your risk and find an agent today. http://thirdpartyoffers.juno.com/TGL3165/54d792a17b95d12a153f5mp09duc ** From Dale Sterner - MS organic chemistry http://pubs.acs.org/doi/abs/10.1021/jo00975a052 *** -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] How to run Fractint in FreeDOS in VirtualBox?
On Sun, Feb 8, 2015 at 11:49 AM, Dale E Sterner sunbeam...@juno.com wrote: Most camera chips today exceed 2 gig. True. It might be fun to find a 2GB CF card. Prices have been dropping and capacities increasing in flash media for years, and small models are at the point of being prizes in CrackerJax boxes. I got a 64GB USB thumbdrive for about $20. How big a card is in your current machine? DS __ Dennis https://plus.google.com/u/0/105128793974319004519 -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] How to run Fractint in FreeDOS in VirtualBox?
Varies - takes almost anything. AVI movies get long and I use Quickview to watch them. DS On Sun, 8 Feb 2015 12:21:33 -0500 dmccunney dennis.mccun...@gmail.com writes: On Sun, Feb 8, 2015 at 11:49 AM, Dale E Sterner sunbeam...@juno.com wrote: Most camera chips today exceed 2 gig. True. It might be fun to find a 2GB CF card. Prices have been dropping and capacities increasing in flash media for years, and small models are at the point of being prizes in CrackerJax boxes. I got a 64GB USB thumbdrive for about $20. How big a card is in your current machine? DS __ Dennis https://plus.google.com/u/0/105128793974319004519 - - Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user Protect what matters Floods can happen anywhere. Learn your risk and find an agent today. http://thirdpartyoffers.juno.com/TGL3165/54d79c3556f311c356987mp03duc ** From Dale Sterner - MS organic chemistry http://pubs.acs.org/doi/abs/10.1021/jo00975a052 *** -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] FreeDOS program/beginner's problems
Hi Franta, struct dosemu_detect { char magic[8]; unsigned char ver[4]; }; static struct dosemu_detect far *p = (void far*) 0xF000FFE0; Note that the way how you create far pointers can differ between compilers. In particular, with any 32 bit memory model, things would look quite differently. Just saying. char magicexp[]=$DOSEMU$; // expected string when on DOSEMU if (strcmp(p-magic, magicexp)) // p-magic == $DOSEMU$ ? You cannot strcmp this because the string is no C style string with a NUL character at the end. You could use strncmp(string1, string2, 8) to compare only the first eight bytes, which will probably work fine for you :-) Eric (I'm using tiny memory model and link .COM instead of .EXE, for minimalize program size) PS: I do not know if int 0xe6 is really deprecated. Anybody? (and curiously, in referenced thread deprecated method Int 0xE6 AH=0 still /after ~17 years/ is supported and seems be working well) -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] How to run Fractint in FreeDOS in VirtualBox?
On Sun, Feb 8, 2015 at 3:00 PM, Don Flowers donr...@gmail.com wrote: I'm trying to think of what I might store there using DOS that would *need* more space, and can't think of anything. Ha - I had 14gb allocated on my Compaq Armada 1750 and ran out of space after discovering that it plays tunes (via MPXPlay) better than any laptop I've ever owned, so it has become quite the media machine, but even before that I had 4gb consumed by regular DOS and W31 programs. Oh, I can see W31 and programs eating the space. But depending on my setup, I generally don't store big stuff like media files on my boot drive. That's for OS and applications. Data lives somewhere else. I assume MPXPlay, as a DOS program, needs to see media it plays on a FAT file system. As mentioned, on the machine FreeDOS is installed on, I have multiple partitions and file systems. When I set it up to begin with, I assumed FreeDOS would use FAT16 and have the 2GB volume size limit in consequence, so that determined the partition size. The stuff I do under FreeDOS *doesn't* take a lot of space. Media files, like audio and video, are handled by Windows or Linux viewers, and live elsewhere. I *could* redo the setup on the FreeDOS box to allocate a larger FAT32 partition, but have no need to. __ Dennis https://plus.google.com/u/0/105128793974319004519 -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] How to run Fractint in FreeDOS in VirtualBox?
I'm trying to think of what I might store there using DOS that would *need* more space, and can't think of anything. Ha - I had 14gb allocated on my Compaq Armada 1750 and ran out of space after discovering that it plays tunes (via MPXPlay) better than any laptop I've ever owned, so it has become quite the media machine, but even before that I had 4gb consumed by regular DOS and W31 programs. On Sun, Feb 8, 2015 at 12:30 PM, Dale E Sterner sunbeam...@juno.com wrote: Varies - takes almost anything. AVI movies get long and I use Quickview to watch them. DS On Sun, 8 Feb 2015 12:21:33 -0500 dmccunney dennis.mccun...@gmail.com writes: On Sun, Feb 8, 2015 at 11:49 AM, Dale E Sterner sunbeam...@juno.com wrote: Most camera chips today exceed 2 gig. True. It might be fun to find a 2GB CF card. Prices have been dropping and capacities increasing in flash media for years, and small models are at the point of being prizes in CrackerJax boxes. I got a 64GB USB thumbdrive for about $20. How big a card is in your current machine? DS __ Dennis https://plus.google.com/u/0/105128793974319004519 - - Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user Protect what matters Floods can happen anywhere. Learn your risk and find an agent today. http://thirdpartyoffers.juno.com/TGL3165/54d79c3556f311c356987mp03duc ** From Dale Sterner - MS organic chemistry http://pubs.acs.org/doi/abs/10.1021/jo00975a052 *** -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
[Freedos-user] (no subject)
Hi, From: dmccunney on 8 Feb 2015 15:14:17 -0500: As mentioned, on the machine FreeDOS is installed on, I have multiple partitions and file systems. When I set it up to begin with, I assumed FreeDOS would use FAT16 and have the 2GB volume size limit in consequence, so that determined the partition size. Since I haven't seen people mention 4 GB FAT16 partitions, I'd like to say that I started using them last month, and they've been working perfectly so far. I went for the 4 GB partitions after running out of space because of digital camera JPG files. And I stayed with FAT16 to be able to run Defrag and ChkDsk, which don't work with FAT32. The 4 GB partitions can be created either with FreeDOS Fdisk or with Linux GParted. However, with very old computers, if the BIOS does not properly recognize the size of the hard disk, Fdisk will only create partitions up to 2 GB. Cheers, Marcos -- Marcos Fávero Florence de Barros Campinas, Brazil -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user