First post, by Peter Swinkels
Hi all,
I'm currently developing my own emulator and while testing Turbo BASIC's Readme.com, I ran into an issue: the program gets stuck in a loop, repeatedly trying (and failing) to allocate memory.
By reviewing the log of simulated interrupt calls, I found that Readme.com tries to allocate 0xFFFF paragraphs via DOS function 0x48. I’ve designed my emulator to prevent such large allocations since I assume a portion of that memory would already be reserved for BIOS and video memory.
Here's the relevant snippet extracted using the Netwide Disassembler (skipping the initial 732 bytes):
00000995 BBFFFF mov bx,0xffff
00000998 B448 mov ah,0x48
0000099A CD21 int 0x21
I'm curious—how does DOSBox (or even genuine MS-DOS) respond when a program tries to allocate such a large block of memory? Does it reject the request outright, return a specific error code, or perhaps fake a successful allocation?
Any insights would be appreciated!
My GitHub:
https://github.com/peterswinkels