|
Post by levievre on May 18, 2021 19:37:43 GMT 1
Just want to report that my Turbo Pascal App crash under Vdos 21.05 when compiled in DPMI mode. Message : cannot enable A20
Do I have to specify a codepage command in config.sys since my french keyboard does not work as usual ? For example, backslash key is not recognized anymore
Thank you, Levievre.
|
|
|
Post by Jos on May 18, 2021 20:04:27 GMT 1
Enabling A20 is to trick the CPU: The first 64KB conventional memory is actually mapped to the first 64KB extended memory (HMA). This early bug was used to move parts of MS-DOS and eventually other programs out of conventional memory. So more became available to DOS programs, and the bug was carried on to more modern processors.
No MS-DOS in vDos conventional memory, or other programs to move to HMA. Testing for HMA usage costs time: Is the memory address in the first 64KB and A20 enabled, then adjust the address accordingly. That test is then needed for every memory access. Yes, you could use a mapping table to all those tests, but that also costs time. So basically A20 is always just disabled in vDos.
There’s no option to omit the use of A20?
If the backslash is produced by a AltGr key combination: Load vDosSetup and install vDos one more.
Jos
|
|
|
Post by levievre on May 19, 2021 7:38:42 GMT 1
Hi Jos,
I really don't know how I could disable the use of A20 in Borland Pascal. I can only specify a target at the compilation time between Real, protected or Windows and that's it. In the complier options dialog box, nothing seems to be relative to A20.
However I can testify my app was working flawlessly with all vdos ante 21.05 versions.
Regards, Levievre
|
|
|
Post by Jos on May 19, 2021 8:04:24 GMT 1
Strange, nothing changed in aspect of A20 handling. vDos still reports it’s disabled and can’t be enabled.
You could post such a problematic program. However, your programs are that complex, they can’t be compiled for real mode?
Jos
|
|
|
Post by levievre on May 19, 2021 11:45:39 GMT 1
Yes indeed. My program is too large to be compiled in real mode.
|
|
|
Post by levievre on May 19, 2021 11:48:38 GMT 1
A simple "Hello World" sample program. Hello1.exe in compiled in real mode Hello2.exe in protected mode
|
|
|
Post by levievre on May 19, 2021 12:35:15 GMT 1
"Rtm.exe" and "dpmi16bi.ovl" are required for Borland protected mode programs. I added these files in "hello.zip"
|
|
|
Post by Jos on May 19, 2021 14:24:46 GMT 1
You may have noticed added to 2021.05.01 is: “Faulty EXEPACKed DOS programs will load/start correctly w/o external help or sacrificing the first 64KB DOS memory block”.
Those programs assume FFFF:10 wraps to 0:0 even if A20 is enabled. vDos doesn’t care about A20 and continued with 10000:0. But now that address is masked by FFFF if the CPU is not running in protected mode. Then 10000:0 becomes 0:0 as if A20 is always off in real mode. So those EXEPACKed programs unpack themselves correctly.
dpmi16bi.ovl however compares in real mode the four bytes at 0:20 with those at FFFF:30. If they match it concludes A20 is disabled and quits. Now they do since FFFF:30 translates to 0:20 in real mode.
I’ll add an exception for this specific test and send you a ‘corrected’ vDos.exe. dpmi16bi.ovl will later on of course disable A20 again, it seemingly just wants confirmed it can enable and disable A20!
Jos
|
|
|
Post by levievre on May 19, 2021 20:26:46 GMT 1
'corrected' vdos works with my turbo pascal App.
Thank you for the details even if I'm not an expert in DOS memory management. I'll try to gain more information about this subject so i could improve my knowledge.
Levievre.
|
|
|
Post by Jos on May 19, 2021 20:43:03 GMT 1
Don’t think you will find relevant information: vDos doesn’t emulate a PC to the hardware level. And ‘your’ dpmi16bi.ovl has a particular way to verify the A20 line functioning. Even not actually needing that and seemingly omitted (or changed) in later versions.
Jos
|
|
|
Post by rb on May 20, 2021 19:07:59 GMT 1
Jos,
I have the same problem running Borland Pascal 7.0. Could you send me the ‘corrected’ vDos.exe pelase?
Regards, Ronald
|
|