Page 1 of 1
VBDOS executable size?
Posted: Fri May 04, 2012 10:11 am
by Harry Potter
Other than by using the opimization switches at compile time and resorting to an executable compressor, how can I significantly reduce the size of a VBDOS Pro 1.0 program? The sorce code is small and has one start-up BASIC module and a form. Unfortunately, the executable is ~170k long and I want to cut the code size by at least 20%.
Posted: Thu May 10, 2012 12:08 pm
by angros47
You complain about a file of 150
kilobytes? Nowadays there are hard drives with a storage of 1-2
Terabytes, and files of 1-2
Gigabytes can be downloaded in half an hour, and you care to spare 20 kb?
Well, the compiled file is so huge because it include also some runtime libraries (i.e. all the stuff required to draw the GUI used in VB programs: windows, menus and so on)
You could try to compress the file: as far as I recall, some compression software (like UC2 Pro) allowed to compress a dos executable: when you launch it, it automatically extract the original file in memory: it could shrink your programs a bit.
You should be able to find UC2 here:
http://archives.thebbs.org/ra31a.htm
Re: VBDOS executable size?
Posted: Tue May 15, 2012 12:02 am
by JohnWatson
Harry Potter wrote:Other than by using the opimization switches at compile time and resorting to an executable compressor, how can I significantly reduce the size of a VBDOS Pro 1.0 program? The sorce code is small and has one start-up BASIC module and a form. Unfortunately, the executable is ~170k long and I want to cut the code size by at least 20%.
I'm impressed that someone is still actively programing in VBDOS. I have two applictions which I still use and that I wrote in VBDOS in the early nineties. I have trouble maintaining them these days since I can't remember a lot of the nuances of the language, particularly the forms.
I don't have a solution to your precise problem but I assume that you are running it on a newer computer than something like a 386 or 486. I've found that on newer computers - even early Pentiums - that were not around when VBDOS was written there is little point in compiling your programs; just run them interpreted and they will run very fast because of enhanced processor power. I always had trouble getting VBDOS code to reliably compile and gave up trying when I got my first Pentium. Soon after I quit VBDOS and went to VB for Windows mainly because I found the 80 column format of VBDOS forms too restrictive.
BTW if you want to run interpreted VBDOS on a Windows computer, the last version it will work reliably with is Windows Me. Cheers.
Posted: Tue May 15, 2012 11:39 am
by Harry Potter
JohnWatson: you're right. I noticed the bugs and other flaws with VBDOS. I honestly don't know why I'm using it.
![Sad :(](./images/smilies/icon_sad.gif)
I guess because it's fun. I've been using UPX for the compression, but I wanted a pre-compression method.
angros47: you're right, too. I'm still working on floppy. To not totally be backward, I use flash drives, too. I have at my mother's house a laptop without a hard drive--it boots from a floppy and networks from a Win98 computer for a hard drive. As for internet access, I have it at a day program, but my access rights are restricted. I could probably sneak it in but don't want to break the rules. My mother has dial-up internet access. I currently have no other internet access.