IDOS->Printf output not the same as printf
Posted: Mon Jan 07, 2013 1:27 am
This is likely a very basic question --- but I'm not getting the same output when I use the IDOS->Printf versus printf. See below. It looks like the pointers are not getting assigned correctly with the DOS function. Is this due to the 64-bit alignment issue?
----------------------------
CONST_STRPTR teststring = "mystring";
IDOS->Printf("%s -%p- -%c- -%p- -%c- end\n",teststring,teststring,*teststring,teststring+1,*(teststring+1));
printf("%s -%p- -%c- -%p- -%c- end\n",teststring,teststring,*teststring,teststring+1,*(teststring+1));
--------------------------
OUTPUT
mystring -0x3e607080- -- -0x006d3e60- -- end
mystring -0x3e607080- -m- -0x3e607081- -y- end
----------------------------
CONST_STRPTR teststring = "mystring";
IDOS->Printf("%s -%p- -%c- -%p- -%c- end\n",teststring,teststring,*teststring,teststring+1,*(teststring+1));
printf("%s -%p- -%c- -%p- -%c- end\n",teststring,teststring,*teststring,teststring+1,*(teststring+1));
--------------------------
OUTPUT
mystring -0x3e607080- -- -0x006d3e60- -- end
mystring -0x3e607080- -m- -0x3e607081- -y- end