Help me with C++ (Developers)
> I am trying to re-writing my program Explorer PC (graphical file manager
> for DOS).Before it was written in Turbo Assembler but now I am using Turbo
> C++.
> My problem is that need making to ensure to me that several variables
> remain together in the executable file (.exe) or when running are located
> together in the same segment.
> For example:
> int a; SEG=0 OFFSET=0
> int b; SEG=0 OFFSET=2
> int c; SEG=0 OFFSET=4
> In assembler I can control this but in C++ is possible?
Something that I have seen in FreeBSD headers was something like this:
struct {
int ___prefix_a;
int ___prefix_b;
int ___prefix_c;
#define a __prefix_a
#define b __prefix_b
#define c __prefix_c
} a;
IOW make a record with dummy names, and then use #defines to access them.
Costs a bit of error message clarity though (and C/C++ doesn't have that much of that already)
Complete thread:
- Help me with C++ - Pablo, 31.05.2010, 08:22 (Developers)
- Help me with C++ - RayeR, 31.05.2010, 10:13
- Help me with C++ - Pablo, 07.06.2010, 01:28
- Help me with C++ - RayeR, 08.06.2010, 13:12
- Help me with C++ - Pablo, 21.06.2010, 01:41
- Help me with C++ - Laaca, 21.06.2010, 10:18
- Help me with C++ - rr, 21.06.2010, 20:57
- Help me with C++ - Pablo, 22.06.2010, 05:56
- Help me with C++ - Rugxulo, 22.06.2010, 08:46
- Help me with C++ - Laaca, 22.06.2010, 11:22
- MasmEd Code Editor - Pablo, 22.06.2010, 12:33
- MasmEd Code Editor - rr, 22.06.2010, 16:04
- Help me with C++ - Rugxulo, 22.06.2010, 08:46
- Help me with C++ - Pablo, 22.06.2010, 05:56
- Help me with C++ - rr, 21.06.2010, 20:57
- Help me with C++ - Khusraw, 21.06.2010, 10:45
- Help me with C++ - Laaca, 21.06.2010, 10:18
- Help me with C++ / Segment of pointer in Turbo C - Arjay, 22.06.2010, 13:18
- Help me with C++ - Pablo, 21.06.2010, 01:41
- Help me with C++ - RayeR, 08.06.2010, 13:12
- Help me with C++ - Pablo, 07.06.2010, 01:28
- Help me with C++ - marcov, 06.06.2010, 19:49
- Help me with C++ 2 alternatives with Turbo C (malloc/bgiobj) - Arjay, 22.06.2010, 14:19
- Help me with C++ - RayeR, 31.05.2010, 10:13