VOGONS

Common searches


First post, by noshutdown

User metadata
Rank Oldbie
Rank
Oldbie

i wrote a little stupid program in basic and i wanted to test the speed difference between gwbasic and ibm rom basic, as well as that of dosbox. and the measured running time is:
gwbasic: ~1.3 seconds in dos, and 53 seconds in dosbox.
ibm rom basic: 4 seconds in dos, and 60 seconds in dosbox.
this seems to indicate that ibm rom basic is ~15 times slower in dosbox than in dos, while gwbasic is ~40 times slower. what makes them behave so differently?

Reply 2 of 7, by cyclone3d

User metadata
Rank l33t++
Rank
l33t++

Software emulation of hardware for one.

Large compiler un-optimizable switch statements are what hurts the speed of DOSBox quite a bit.

Guessing that one of those uses code in DOSBox that is more optimized than the other.

Yamaha modified setupds and drivers
Yamaha XG repository
YMF7x4 Guide
Aopen AW744L II SB-LINK

Reply 5 of 7, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

In DOSBox SVN it is possible load an IBM BASIC ROM image into emulated ROM with the LOADROM internal program on the Z: drive; after that you can run the original IBM BASIC interpreter program in DOSBox. There are also hacked versions of the IBM BASIC interpreter where the ROM code is integrated.

The OP did not state how their program is being run in "dos", but I suspect booting DOS from a flash drive or so and then running their program natively on a modern host processor. They also did not state how they run the program in DOSBox, so for all we know it's using normal core and the default 3000 cycles, and of course that will be slow. One should use settings of core=dynamic cycles=max to run programs at a fast speed in DOSBox, but even then it can't possibly match native execution speed because DOSBox emulates the CPU.

Reply 6 of 7, by noshutdown

User metadata
Rank Oldbie
Rank
Oldbie
darry wrote:

Forgive my ignorance, but how did you manage to run IBM ROM BASIC in DOSBox ?

someone dumped the rom and connected it to the ibm basic.com header, modified the program entrance i think. i can't remember where i downloaded it though.

Reply 7 of 7, by noshutdown

User metadata
Rank Oldbie
Rank
Oldbie
ripsaw8080 wrote:

There are also hacked versions of the IBM BASIC interpreter where the ROM code is integrated.

i think thats what i am running.

One should use settings of core=dynamic cycles=max to run programs at a fast speed in DOSBox, but even then it can't possibly match native execution speed because DOSBox emulates the CPU.

i did.