gram@uctcs.uucp (Graham Wheeler) (05/22/91)
Hi all I am trying to write an application to run on a board which plugs into a PC. This board contains a 80286 and 512k of memory. I access its memory by setting up a 64kb shared memory window. At present my application consists of four files that are linked together: i) startup code for the PC which downloads the slave part of the program to the board ii) application code for the PC iii) startup code for the slave, which sets up the segment registers iv) application code for the slave This program is executed, and the PC startup code copies everything from the end of its code to the shared memory window. Note that the two startup code files are written in assembly, while the others are written in Turbo C. I have had some success with this. However, my means of setting up the DS register on the slave works due to a fluke, I think. The problem I have is this: How can I set up DS in the slave correctly without the solution being a hack? Alternatively, is there a way I can get Turbo C to make the data segment equal to the code segment, so that I can just set DS to CS, and all my variables will work? I apologise for the vagueness of this, but the only alternative is posting all the source which is a bit excessive. Also, I'm not sure if this is the right group to post this in. Any help will be appreciated. There must be some embedded application writers out there... Preferably e-mail responses - quickest address is gram%uctcs@m2xenix.psg.com Thanks in advance. Graham Wheeler <gram@cs.uct.ac.za> | "That which is weak conquers the strong, Data Network Architectures Lab | that which is soft conquers the hard. Dept. of Computer Science | All men know this; none practise it" University of Cape Town | Lao Tzu - Tao Te Ching Ch.78