> Will I be able to access the data in the arrays from any unit that includes the MBRegs.h?
Yes, so long as the first thing main() does is call Init_MBRegs()
The only thing you need to watch out for in the rest of the code is anywhere where you might have done sizeof(rtvals) (or any of the other arrays which are now just pointers).
If you do, you need to fix the code.
(PS - this is 20+ year old memory, most of the planet left DOS behind long ago)
Which memory model are you compiling with?
If you have compact or large, then you could just put each array definition in a separate source file, eg.
Code:
// rtvals.c
WORD rtvals[Maxregs];
Then your header file would be
Code:
extern WORD rtvals[];
// ditto for all your other arrays
In the large model for example, you're restricted to a max of 64K code/data within a single source file. But spreading things over multiple source files allows you to access multiple 64K segments in your whole program.