News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

using 32bit reg and memory move faster even in 16bit mode?

Started by daydreamer, January 11, 2020, 10:20:20 PM

Previous topic - Next topic

daydreamer

I read that 32bit cpu are optimised, to run 32bit instructions
In 32bit mode,so you should avoid run old 16bit code
Is it the same if you run 16bit mode with or without emulator
Code mov eax,mem. Mul ebx, div ebx, memory move with use 32bit chunks faster even if larger opcodes+ prefix?
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

FORTRANS

Hi,

   The original Pentium Pro processor was optimized
to run 32-bit code at some expense to running 16-bit
code.  This is when you compare it to the original
Pentium family of processors.  As the Pentium Pro
usually had a faster clock, it rarely ran 16-bit code
slower than a Pentium.  But its 32-bit performance
was so much better that it was a topic of discussion
at the time.

   Running 32-bit code in a 16-bit execution mode
seems to work okay, though I have only done so in
a few cases.  To know relative speeds of 16-bit and
32-bit code in a 16-bit mode, you would have to run
your own benchmarks to test your particular CPU or
emulator.  There are too many CPU generations since
the Pentium and Pentium Pro to make a blanket
statement about absolute performance.  It seems
logical that loading or storing 32-bit values using 32-bit
code would be faster than the equivalent 16-bit code.
But how much faster?  you would have to run a test.

Regards,

Steve N.

daydreamer

I think I try time big loops with different functions and change from old int's(16bit) to old long's(32bit) to see if there is any difference
but need to set a fixed freqency energy mode,to not get timings disturbed by turbo varying clock freqency
my old game programming book from PII's and PIII's time tell use 32bit for modern
could as well test modern built in fpu speed too

but it makes sense that AMD and Intel dont waste money/time to improve obsolete 16bit,that is even way too fast,for old retrogames anyway,dont know if they stopped improvement on 32bit in favour of 64bit mode only?

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

jj2007

Back in the old days when I had a 32-bit OS I made several broad tests, and while I cannot find the results any more, it was pretty clear that 32-bit code runs a factor 6-7 faster than equivalent 16-bit executables. Which is btw one reason why I don't care about 64-bit code - it's sometimes 6-7% faster, but often even a bit slower than the 32-bit equivalent.

daydreamer

Quote from: jj2007 on January 12, 2020, 02:47:31 AM
Back in the old days when I had a 32-bit OS I made several broad tests, and while I cannot find the results any more, it was pretty clear that 32-bit code runs a factor 6-7 faster than equivalent 16-bit executables. Which is btw one reason why I don't care about 64-bit code - it's sometimes 6-7% faster, but often even a bit slower than the 32-bit equivalent.
thanks
anyway real4's,real8's ,even real10's is worth testing too against 64bit integer,interesting to see if there is much or little speed advantage to switch from more versatile floating point on modern cpu vs 64bit integer,when huge numbers are needed

 
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

tempuyax

Hi

As I know, a 16-bit system can only run on an ISA connection system. instead, 32 bits run on a modern system, PCI.
if all manufacturers or industrial ISA systems are no longer used in desktop or mobile computer machines, then reluctantly say goodbye with 16 BIT.

regards,

tempuyax

jj2007

Hi tempuyax,

Welcome to the Forum :thup:

In fact, 16-bit code is obsolete. You need a VM on a 64-bit OS to run it, or the MS-DOS player, mostly sufficient to test 16-bit code on 64-bit Windows.

For details, see this post.

felipe

Quote from: tempuyax on April 20, 2020, 04:59:53 PM
As I know, a 16-bit system can only run on an ISA connection system. instead, 32 bits run on a modern system, PCI.
if all manufacturers or industrial ISA systems are no longer used in desktop or mobile computer machines, then reluctantly say goodbye with 16 BIT.

Although it's true that in general 16 bit dos programs are obsolete, you still can run dos in a new machine (maybe you will get some incompatibilities while running some programs of course) because most pc hardware are still compatible with the old ibm pc. I still can run ms-dos in my intel-i5 and run all the programs written in assembly by me in the system or play some old games written by others in it (some are really fun  :toothy:), even if they use the old bios functionalities. All this stuff using ms-dos, not a virtual machine over windows. There is the freedos project, but i prefer a portable version (in usb) of ms-dos.  :icon_idea:

brianvs

I boot in Native 16-bit mode on my Intel I5 based computer on the SATA 512GByte drive, no problem running 16-bit code and PharLap DOS extenders. The latter can use up to 4GBytes of memory, and can use the VMMDRV that was offered under PharLap.

I use the FDISK that comes with FreeDOS to partition the drive as a single FAT-32 partition, and use FORMAT/s that comes with Win98 to make the C: drive bootable. I make the drive dual-boot DOS7.1 (win98) and XP. I'm using Panasonic CF-53 and CF-52 laptops, which offer native USB support for devices under the BIOS, which includes DOS. I use these to develop embedded code running on an ICOP VortexDX and now an ICOP VortexDX3. I also picked up an ICOP VortexMX that was a "thin stack" network node, but makes a great embedded processor. The ICOP Vortex line runs the PharLap extenders without problems. PharLap runs in 32-bit mode under DOS, gives access to PCI functions.

The CF-53 is "very compatible" with older software- the RS232 is capable of running the JDM device burners, I ended up writing my own driver for the JDM programmer for an Ampro PC104 computer, works with the CF-53.

The Panasonic Toughbooks use drive caddies, I just pop the caddy and put in a WIN10 disk/caddy when wanting to use it in 64-bit mode.

brianvs

Quote from: tempuyax on April 20, 2020, 04:59:53 PM
Hi

As I know, a 16-bit system can only run on an ISA connection system. instead, 32 bits run on a modern system, PCI.
if all manufacturers or industrial ISA systems are no longer used in desktop or mobile computer machines, then reluctantly say goodbye with 16 BIT.

regards,

tempuyax

ISA is still used for embedded systems, the ICOP Vortex line offers ISA support.

https://www.icop.com.tw/categories/31

You can pick up some of the older "Thin Client" computers that can be repurposed as DOS machines,

Random Ebay Example:

https://www.ebay.com/itm/EBOX-3350MX-Thin-Client-DMP-Electronics-Vortex86MX-chip-1GHz/174080562171

I picked up a 3310MX-C85 used as a Thin Client for under $50, runs real-mode DOS and extended 32-bit PharLap code.
These boxes are cheap, and can be fun- especially if you want to learn interrupts and realtime control. I used HPUSBW to create a bootable SD card for the 3310MX, boots into WIN98 realmode DOS7.1.