| ▲ | jmmv 3 days ago |
| Original author here. Thanks for sharing! I see various comments below along the lines of “oh, the article is missing so and so”. OK… then please see the other articles in this series! I think they cover most of what you are mentioning :-) The first was on EMS, XMS, HMA and the like: https://blogsystem5.substack.com/p/from-0-to-1-mb-in-dos The second was on unreal mode: https://blogsystem5.substack.com/p/beyond-the-1-mb-barrier-i... The third was on DJGPP: https://blogsystem5.substack.com/p/running-gnu-on-dos-with-d... And the last, which follows this one, is on 64 bit memory models: https://blogsystem5.substack.com/p/x86-64-programming-models Some of these were previously discussed here too, but composing this in mobile and finding links is rather painful… so excuse me from not providing those links now. |
|
| ▲ | bonzini 2 days ago | parent | next [-] |
| Just one nit: contrary to what the article suggests, as far as I remember the compact model was not so common because using far pointers for all data is slow and wastes memory. Also, the globals and the stack had to fit in 64k anyway so compact only bought you a larger heap. However, there were variants of malloc and free that returned or accepted far pointers, or alternatively you could ask DOS for memory in 16-byte units and slice it yourself (e.g. by loading game assets). Therefore many programs used the small and medium models instead of compact and large respectively, and annotated pointers to large data (which is almost always runtime-loaded and dynamically allocated anyway) by hand with the __far modifier. This was the most efficient setup with the only problem that, due to the 64k limit, you could hardly use the heap or recursion. |
| |
| ▲ | 2 days ago | parent | next [-] | | [deleted] | |
| ▲ | tiahura 2 days ago | parent | prev [-] | | 1. Compact Model Limits: The stack and globals don’t strictly need to fit in 64 KB; far pointers allow larger heaps, but inefficiency made this model unpopular.
2. Malloc Variants: While farmalloc and farfree existed, developers often used direct DOS memory allocation for better control.
3. Stack Constraints: Stack and recursion limits were due to 64 KB segments, not specific to compact or small models.
4. Far Pointers: Using __far for dynamic data was common across models; compact/large automated this but were inefficient.
5. Heap/Recursion Use: The heap and recursion were constrained, not “hardly usable,” due to far pointer overhead and stack size. |
|
|
| ▲ | Timwi 3 days ago | parent | prev | next [-] |
| I read through the whole page from the beginning up to the “Discussion about this post” header. At no point was there any mention of a series, or any other blog posts (the inline links all go to Wikipedia). I don't blame anyone for not realizing that there are more articles on the topic. |
| |
| ▲ | klelatti 2 days ago | parent [-] | | At the very start of the post: > At the beginning of the year, I wrote a bunch of articles on the various tricks DOS played to overcome the tight memory limits of x86’s real mode. With link to an article. | | |
| ▲ | gibibit 2 days ago | parent | next [-] | | Linked in a the style where each word links to _a_ _different_ _page_ that doesn't correspond to the hyperlinked word. What do you call this pattern? It seems to be popular lately. I haven't been able to find a description of it, but it would be much more helpful to the reader if it was identified. Instead of > At the beginning of the year, I wrote a _bunch_ _of_ _articles_ on the various trick It's better to write > At the beginning of the year, I wrote a bunch of articles (_1_, _2_, _3_) on the various trick or something similar. | | |
| ▲ | cesarb 2 days ago | parent | next [-] | | IIRC, this linking pattern was common enough back in the Geocities era, that HTML style guides explicitly recommended avoiding it. To those who lived through these times, it's quite obvious that there are three separate links, because the space between the words is not underlined (the space would be underlined if it were a single link); obviously, that trick is not helpful with the modern style of not underlining hyperlinks at all. | |
| ▲ | jmmv 2 days ago | parent | prev | next [-] | | I intentionally wrote it that way because these articles are only loosely related to the one discussed here, not a "series I thought through upfront". Yeah, not a fan _of_ _the_ _pattern_, but I wanted to give it a try and see how it worked. But honestly... the text of the very first sentence talks about these articles, so the curious reader will hopefully realize that "there is something more". | |
| ▲ | marxisttemp 2 days ago | parent | prev [-] | | It bothers me too, in the same fashion as “click here”. Instead, we should prefer e.g. At the beginning of the year, I wrote a bunch of articles on the various tricks (_below 1MB_, _above 1 MB_, and _with GNU JMP_) Just describe the content you’re linking to. You know best as the author! |
| |
| ▲ | lproven 2 days ago | parent | prev [-] | | Correction to the correction: with three links to the three articles. |
|
|
|
| ▲ | turol 3 days ago | parent | prev [-] |
| If you click on the domain name next to the main link you get a filtered view of submissions for just that domain. This way you can easily find the related posts. It looks like this is the fifth submission of this article but the others didn't get many comments. https://news.ycombinator.com/from?site=blogsystem5.substack.... |
| |
| ▲ | jmmv 2 days ago | parent [-] | | That's good, but you need to know what you are looking for. If I click on that link now, I see a bunch of repeated submissions, and due to the nature of this publication, the articles are of very varied topics. So a random person won't know what articles are related to this one and which ones aren't with ease. |
|