I have a small problem. Following a pointer to a particular segment: offset point to (for example, 0041Ch) How can I now put this address to a pointer?
Segment and offset the smell of DOS programming, so all that follows is not a standard C + +, but Borland / Turbo C + + specific (DJGPP perhaps?) Code: #include <dos.h> char far * my_far_pointer = MK_FP(0, 0x41C); /* make far pointer 0000:041c */
As soon as I can I create a variable with no prob on the address space access. Can someone tell me why it does not go without a variable? I get the following error: expression must be a pointer or a zero constant. So far, no solution works ... who has other solutions ... just tell me
Well, my current program does not have anything with the code you need to do now. I would just say exactly, I always read the values of exactly this location. With pure assembler can I do that ... But everything must go without asm. Can I ever passed from one hand to the pointer location?
I have such a result that works under Linux, you have other systems under test. mem_addr int = 0x0041; ptr_of_int int *, long * ptr_of_long; char * ptr_of_char; ptr_of_int = (int *) mem_addr; ptr_of_long = (long *) mem_addr; ptr_of_char = (char *) mem_addr;