Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.msdos.programmer > #4130
| From | "R.Wieser" <address@not.available> |
|---|---|
| Newsgroups | comp.os.msdos.programmer |
| Subject | Re: How to access stack-based data (strings) when SS <> DS ? |
| Date | 2021-12-07 10:17 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <son8qu$dgb$2@gioia.aioe.org> (permalink) |
| References | <sof888$9ts$3@gioia.aioe.org> <f6ec8f97-6a91-465f-b754-d1c50095bdf3n@googlegroups.com> <sol3fh$1g7s$2@gioia.aioe.org> <6e458fa2-2a70-46d3-af81-a823617910dbn@googlegroups.com> |
Alexei, > I'm thinking more of declaring a symbol for each string and deducing > the segment from that symbol (or it maybe a pair of symbols, one > for the offset, the other for the segment). To be honest, I didn't think of that. It would possibly be workable for simple situations, like the single-argument int 21h, AH=09h. It wouldn't for anything that used more than one pointer argument (into different segments) though. IOW, it would need constant scrutiny by me, the programmer, to make sure that all (applied by macros ?) "fixes" would actually work. :-( Ehh... no. Although possible not really a solution. > I don't remember the details and they are important. I did not provide any other than "[stack based item]", which I thought would be picked up by anyone here as either "[bp-xxxx]" or "[sp+xxxx]". I was mistaken. :-| > I'm afraid that's unavoidable. That is what I thought, but wanted to make sure I did not overlook anything / something simpler. >> > Lastly, perhaps you should be using segmented memory >> Isn't that what is what started my problem ? Putting DS into a different >> segment than SS ? > > Sorry, it should've been "should NOT be using segmented memory". :-) In that case, I'm not (yet). I've been using the "tiny" memory model where CS = DS = SS , as that one is easiest to work with and I simply have never had the need for more memory (in relation to those three segments). Its just that I saw a possible situation (I was thinking about recursion and how it gobbles stack memory), and wondered how that would work. As it turns out, not even Borland actually wished to burn their fingers on it - all its memory models set SS to the same as DS. > Then embrace it. Write all of the plumbing by hand. :) As programmers we're supposed to be "lazy". If something repeats than we rather spend an hour to solve a 10 minute problem than to write it twice, let alone more than that. :-) The bottom line is that a memory model with SS <> DS is simply no fun to deal with. As I could have guessed if I would have looked at the offered memory models earlier. Hmmm... Probably would not have stopped me from asking though. <whistle> Regards, Rudy Wieser
Back to comp.os.msdos.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-04 08:56 +0100
Re: How to access stack-based data (strings) when SS <> DS ? "Kerr-Mudd, John" <admin@127.0.0.1> - 2021-12-04 12:47 +0000
Re: How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-04 15:57 +0100
Re: How to access stack-based data (strings) when SS <> DS ? "Kerr-Mudd, John" <admin@127.0.0.1> - 2021-12-04 16:13 +0000
Re: How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-04 18:41 +0100
Re: How to access stack-based data (strings) when SS <> DS ? "Kerr-Mudd, John" <admin@127.0.0.1> - 2021-12-04 20:28 +0000
Re: How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-05 08:56 +0100
Re: How to access stack-based data (strings) when SS <> DS ? "Kerr-Mudd, John" <admin@127.0.0.1> - 2021-12-05 10:32 +0000
Re: How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-05 13:11 +0100
Re: How to access stack-based data (strings) when SS <> DS ? "Kerr-Mudd, John" <admin@127.0.0.1> - 2021-12-05 12:21 +0000
Re: How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-05 14:59 +0100
Re: How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-04 19:00 +0100
Re: How to access stack-based data (strings) when SS <> DS ? JJ <jj4public@gmail.com> - 2021-12-05 14:27 +0700
Re: How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-05 12:43 +0100
Re: How to access stack-based data (strings) when SS <> DS ? "Alexei A. Frounze" <alexfrunews@gmail.com> - 2021-12-05 22:25 -0800
Re: How to access stack-based data (strings) when SS <> DS ? Mateusz Viste <mateusz@xyz.invalid> - 2021-12-06 09:30 +0100
Re: How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-06 14:33 +0100
Re: How to access stack-based data (strings) when SS <> DS ? Herbert Kleebauer <klee@unibwm.de> - 2021-12-06 19:01 +0100
Re: How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-06 21:16 +0100
Re: How to access stack-based data (strings) when SS <> DS ? Herbert Kleebauer <klee@unibwm.de> - 2021-12-07 00:19 +0100
Re: How to access stack-based data (strings) when SS <> DS ? Mateusz Viste <mateusz@xyz.invalid> - 2021-12-07 09:31 +0100
Re: How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-07 09:37 +0100
Re: How to access stack-based data (strings) when SS <> DS ? Newbie language. "R.Wieser" <address@not.available> - 2021-12-08 10:16 +0100
Re: How to access stack-based data (strings) when SS <> DS ? Newbie language. Herbert Kleebauer <klee@unibwm.de> - 2021-12-08 17:39 +0100
Re: How to access stack-based data (strings) when SS <> DS ? Newbie language. "Kerr-Mudd, John" <admin@127.0.0.1> - 2021-12-08 17:37 +0000
Re: How to access stack-based data (strings) when SS <> DS ? Newbie language. Herbert Kleebauer <klee@unibwm.de> - 2021-12-08 22:31 +0100
Re: How to access stack-based data (strings) when SS <> DS ? Newbie language. "Kerr-Mudd, John" <admin@127.0.0.1> - 2021-12-09 21:43 +0000
Re: How to access stack-based data (strings) when SS <> DS ? Newbie language. "R.Wieser" <address@not.available> - 2021-12-08 22:19 +0100
Re: How to access stack-based data (strings) when SS <> DS ? "Alexei A. Frounze" <alexfrunews@gmail.com> - 2021-12-06 22:40 -0800
Re: How to access stack-based data (strings) when SS <> DS ? "R.Wieser" <address@not.available> - 2021-12-07 10:17 +0100
csiph-web