DJ911, that's the 64K limit of 16-bit programming (I think). I suspect the difference of 1 is a mistake. In either case you can store 64K of characters MINUS ONE, because the string has to be terminated.
I'm not disputing you saw a real difference. I'm disputing that there should be a difference. Even compilers aren't right about everything! The only difference between global and local in a 16bit system is which segment is used (ds, ss), and that makes no difference to the available size of a segment.
Incidentally, have a go at making a local string 65535, or even 65534 bytes long and filling it with characters. See what happens. I'd almost be prepared to bet it fails. After all, the stack segment has to contain the odd function return address too.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.