Lance, Tom,
I believe this question is not off-topic, as it directly pertains
to OBJ files that I create for inclusion in my PB/DOS programs.
If you disagree, then by all means, close this topic or delete it.
The question: is it permissible to use LOCAL variables within procedures
in OBJ files? Or is this a no-no because PB/DOS uses the LARGE
memory model (i.e., all far-pointers)? I admit that my understanding
of DOS memory models, and what they allow/forbid, is quite limited.
if it IS permissible to use them, would I save the registers before
or after declaring them? Would I have to put in the code to release
the local vars from the local stack (according to MASM help, that
is here its compiler creates them) using retf at the end of the procedure?
I am afraid that I could not find in the MASM Hlp files where it said
how to release local vars. All I know is, I tried using local vars
in one of my production procedures that I was converting from UNIT to
OBJ, and every time I ran the test EXE, Windows told me the program
had "performed an illegal operation...restart your computer...". So,
I am hoping for some ready made answers to the technique of using
local vars in OBJ procedures BEFORE I venture into that avenue again.
Thank you VERY much for any replies.
------------------
I believe this question is not off-topic, as it directly pertains
to OBJ files that I create for inclusion in my PB/DOS programs.
If you disagree, then by all means, close this topic or delete it.

The question: is it permissible to use LOCAL variables within procedures
in OBJ files? Or is this a no-no because PB/DOS uses the LARGE
memory model (i.e., all far-pointers)? I admit that my understanding
of DOS memory models, and what they allow/forbid, is quite limited.
if it IS permissible to use them, would I save the registers before
or after declaring them? Would I have to put in the code to release
the local vars from the local stack (according to MASM help, that
is here its compiler creates them) using retf at the end of the procedure?
I am afraid that I could not find in the MASM Hlp files where it said
how to release local vars. All I know is, I tried using local vars
in one of my production procedures that I was converting from UNIT to
OBJ, and every time I ran the test EXE, Windows told me the program
had "performed an illegal operation...restart your computer...". So,
I am hoping for some ready made answers to the technique of using
local vars in OBJ procedures BEFORE I venture into that avenue again.
Thank you VERY much for any replies.

------------------