Author Topic: Demonstrating FLAT memory usage for PB DOS  (Read 6204 times)

Gunther

  • Member
  • *****
  • Posts: 4090
  • Forgive your enemies, but never forget their names
Demonstrating FLAT memory usage for PB DOS
« on: August 16, 2013, 05:38:10 AM »
We had a small but fair discussion about flat real mode/ unreal mode and the advantages or disadvantages here. For members not familiar with that technique, I've found an old example which I've written for PB 3.2 and TASM 4 in the 90s. The assembly language source could be assembled with MASM or JWASM, too.

It will generate an integer array in the usual DOS memory, save the array above 1 MB, delete the original array and restore it's content. Moreover, it'll draw the Barnsley fern in SCREEN 12 (standard VGA: 640x480 in 16 (!) colors) and save and restore it, just like the integer array.

It will only work under plain DOS with HIMEM.SYS 2 and above or a virtual machine (DOSBox, VirtualBox are tested, but VMWare, Bochs, VirtualPC etc. should do the job, too). It won't work with the DOS emulation of Windows, OS/2 or DOSEmu. There's no chance to bring it to work in these environments. That's what I meant in the above discussion and that's the price which is to pay for the flat mode. Therefore is a clean 32 bit Protected Mode client probably the better way.

Anyway, here it is. This weekend I'll try some VESA stuff with that technique. Have fun and take care.

Gunther
Get your facts first, and then you can distort them.

FORTRANS

  • Member
  • *****
  • Posts: 1195
Re: Demonstrating FLAT memory usage for PB DOS
« Reply #1 on: August 16, 2013, 09:56:52 PM »
Hi,

   Worked as stated.  Error message in a VDM.  It did what it
said it would do with MS-DOS 6.22 and HIMEM.SYS.  Numbers
and the ferns as stated.

Regards,

Steve N.

Gunther

  • Member
  • *****
  • Posts: 4090
  • Forgive your enemies, but never forget their names
Re: Demonstrating FLAT memory usage for PB DOS
« Reply #2 on: August 16, 2013, 11:55:08 PM »
Hi Steve,

   Worked as stated.  Error message in a VDM.  It did what it
said it would do with MS-DOS 6.22 and HIMEM.SYS.  Numbers
and the ferns as stated.

that was clear. Thank you for testing it. In Bochs etc. it'll do the job, too.

Gunther
Get your facts first, and then you can distort them.