Help me with C++ (Developers)
AFAIK C should place all global variables into one segment one by one so you only need to get pointer to the first variable and data segment. But there may be some problem with aligning where some dummy bytes are placed between Byte variables - e.g.
int a; - 0x1100
Byte b; - 0x1102
int c; - 0x1104 (instead of 0x1103)
Aligning may be turned off by some compiler option but you are not sure if another compiler can disable it. May be better use some kind of attribute packed and put all vars into a packed structue. Then you will be safe that any extra bytes was added.
---
DOS gives me freedom to unlimited HW access.
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