News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

True DOS program help, please?

Started by KrisB, April 25, 2005, 02:30:05 PM

Previous topic - Next topic

pbrennick

MichaelW,
I have a testbox with dos 6.22 on it and I tried to run zipcode.exe on it and I get a DPMI error, this means that zipcode.exe is 32bit.

Paul

hutch--

Kris,

The problem will be the age of the tools you need to write the app which looks reasonably simple. Depending on your language background, if you can hook an old copy of MS C or perhaps the compiler version of Quick Basic it should be simple enough to write. 16 bit MASM would be a "nice" way to write the code if you have time but it may not be worth the effort.

Data of this type,


"ZIP_CODE","CITY","STATE","AREA_CODE","CITY_ALIAS_NAME","CITY_ALIAS_ABBR","CITY_TYPE","COUNTY_NAME","COUNTY_FIPS","TIME_ZONE","DAY_LIGHT_SAVING","LATITUDE","LONGITUDE","ELEVATION"
"00501","HOLTSVILLE","NY","516","HOLTSVILLE","","P","SUFFOLK","103","5","Y","40.8153","73.0456","25


is very easy to scan at a byte level in assembler and if the only delimiter is a comma as in CSV format, its even simpler.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

MichaelW

Quote from: pbrennick on May 04, 2005, 01:29:09 AM
MichaelW,
I have a testbox with dos 6.22 on it and I tried to run zipcode.exe on it and I get a DPMI error, this means that zipcode.exe is 32bit.

Hi Paul,

Yes, the DOS-32 version of FreeBasic produces 32-bit protected-mode executables, and that is why zipcode.exe is able to load a 1MB+ file (zipcode.asc) into memory. The DPMI error probably means that there was no DPMI provider present. You can download the recommended DPMI provider (cwsdpmi.exe) from the link I provided. I had previously tested under Windows 98 SE MS-DOS mode (which unlike Windows does not include a DPMI provider) and had no problems, either loading cwsdpmi.exe as a TSR before running zipcode.exe, or just placing it in the same directory with zipcode.exe. To test 'real' 16-bit DOS, I created a bare MS-DOS 6.22 boot diskette, copied zipcode.exe, zipcode.asc, and cwsdpmi.exe to it, booted from the diskette, and ran zipcode.exe. First I got "Warning: cannot open swap file c:\cwsdpmi.swp", then a 1-2 minute delay while everything was being loaded from the diskette (the code must read zipcode.asc twice, with no caching), then zipcode.exe opened and ran normally.
eschew obfuscation

pbrennick

MichaelW,
Yeah, I got the DPMI program just to test it and it ran fine.  The problem is, though, she evidently can't do that for some unfathomable reason.  I think she should download a copy of FreeDOS and the problem will be solved as your program will then run fine.  She could also, install DOS 6.22 as we did.  Since it is a broken DOS, it cannot be sold for more than the value of the diskette and can be downloaded for free so she needn't worry about cost.  I think she is too quick to just say this or that will not work without really trying.  If she has an old spreadsheet program that will run on 'true DOS' she can imprt the CSV file and use a macro to do the searching, they all support such behaviors.  There really are a lot of 'easy' solutions to this easy problem that 'I' feel you have already solved for her.  :wink

Paul

KrisB

Quote from: pbrennick on May 04, 2005, 02:32:28 PM
MichaelW,
Yeah, I got the DPMI program just to test it and it ran fine.  The problem is, though, she evidently can't do that for some unfathomable reason.  I think she should download a copy of FreeDOS and the problem will be solved as your program will then run fine.  She could also, install DOS 6.22 as we did.  Since it is a broken DOS, it cannot be sold for more than the value of the diskette and can be downloaded for free so she needn't worry about cost.  I think she is too quick to just say this or that will not work without really trying.  If she has an old spreadsheet program that will run on 'true DOS' she can imprt the CSV file and use a macro to do the searching, they all support such behaviors.  There really are a lot of 'easy' solutions to this easy problem that 'I' feel you have already solved for her.  :wink

Paul


Actually, I got the DPMI program and it all does run fine, thank you! :)

I was just too embarrassed to tell you that it has now been determined that using a CSV file does not offer us enough "security" and we need to change everything and try running it with SQLite. *sigh*

FORTUNATELY, the DPMI program also allows for SQLite to run correctly on the old DOS 16 bit. Now I just need to create a SQL readable DB and recode with a SQL query.

My final bit of difficulty resides with linking the SQLite to the actual program which holds the query.

Everyone has been so wonderful and helpful, that I didn't want to share this newest glitch.

Thanks all,
Kris

pbrennick

KrisB,
We like an interesting problem.  However, if the network is so insecure that csv is a problem, then network is an issue at your company.  I am a certified Novell CNA and that just does not sound correct to me.  I suspect your boss' are just reaching uninformed conclusions and forcing you to live by them.  I am so sorry to realize this.

Paul

KrisB

You have a definite and good point...

Things are changing yet again, so I am uncertain where things will go now...

::)
Kris

Quote from: pbrennick on May 11, 2005, 02:22:19 PM
KrisB,
We like an interesting problem.  However, if the network is so insecure that csv is a problem, then network is an issue at your company.  I am a certified Novell CNA and that just does not sound correct to me.  I suspect your boss' are just reaching uninformed conclusions and forcing you to live by them.  I am so sorry to realize this.

Paul


pbrennick

Kris,
Yeah, well I think I am certain where you should go.  Let me think for a hot minute... maybe elsewhere?  They do not deserve you.

Paul

KrisB

*blush*
Why thank you...

*hug*
Kris

Quote from: pbrennick on May 12, 2005, 07:35:26 PM
Kris,
Yeah, well I think I am certain where you should go.  Let me think for a hot minute... maybe elsewhere?  They do not deserve you.

Paul