Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 4,491 of 4,675    |
|    Paul Edwards to R.Wieser    |
|    Re: error for small data model    |
|    15 Nov 22 18:01:29    |
      From: mutazilah@nospicedham.gmail.com              On Tuesday, November 15, 2022 at 5:17:47 PM UTC+8, R.Wieser wrote:              > > On the subject of small and medium memory model -       > > how is it possible for them to work?       > ...       > > Those are different address spaces.              > I had the same thoughts/problem. Its almost impossible to use stack-based       > structures/strings when DS and SS are not the same. As such they are most       > always (made) the same.       >       > If you want to store data in / retrieve from the code segment of your       > program (you should not, but its your choice) than you have no other option       > than to make sure that all three segment registers are the same (locking you       > into the smaller memory models).              What do you mean by "smaller memory models"?              The only ones that conceivably work are tiny, compact,       large and huge.              The ones that don't are small and medium.              > That, or special functions that override the pointers default segment with       > one of your own choice (for example, mov al,[cs:si] ).              But from memory small was the default memory model for       DOS C compilers.              How did they manage to make it work?              Thanks. Paul.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca