Peter's z80.eu site blog
Search 

Strange DOSBOX (with latest version 0.74-3) behaviour with a sample benchmark program 
Monday, February 8, 2021, 11:58 AM
Posted by Administrator
To have some new examples for x86 assembler programming, I've created also one sample with a small benchmark program, which should work with old PCs like the IBM PC/XT.
This program, created with an assembler source for MASM 5.10, will measure basically for a defined period of time (5 seconds, or in 1/18.2 sec ticks exactly 91 ticks) how fast one char is displayed with the help INT 10h function 09h (a BIOS function, not DOS related). I was trying to implement it via INT 10h function 0Eh (tty type output), but this was not working because function 0Eh is working only in graphics mode.
I didn't liked to implement it by writing directly into video RAM (beginning at 0B800:0h for CGA, EGA and VGA), because I wanted to avoid screen snow with a CGA.

I tested it with several virtual, emulated PCs (from IBM PC/XT up to a PC with a Pentiumn 233 MMX), and also with some real, existing PCs I had.

Usually, DOSBOX, especially if the cycle value is increased or unlimited, but also even with the default settings, is really fast and things will work really good.

With my sample bench program, this ends up in a surprise !
DOSBOX wasn't the fastest choice. It started very fast, but after a moment, was slowing down drastically with the video output. I didn't try to analyze the reason (by reviewing the DOSBOX source), but it was interesting.

PCem with the emulated Pentium MMX 233 was way faster (~ 982 loops for DOSBOX, ~ 1700 for the emulated PCem v17 PC). I guess I need an explanation why this happens, but I fear emulated PCs (using PCem) with a real BIOS are much better in terms of (text) video output, because there is no caching or memory limit while executing the emulation.

Added later: It depends of the "cycle" value, if the value is above ~4000 (or even "max"), you will get the mentioned effect, if it's the default value of 3000, the effect is almost invisible. But still a strange effect.

See 'related link' for a download possibility of the benchmarking program (with source code). See also my >youtube video<.

I would really, really appreciate some result values from REAL machines. Many thanks for any value in advance. You can use the comment function (at least for about 60 days after posting this) and/or the contact function here.
add comment ( 1 view )   |  permalink   |  related link   |   ( 3.1 / 86 )

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>