Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - DM 8.23
trying DM 8.23 compiler in DOSX model. i only replaced bin\SCPPN.EXE and bin\SCPPND.EXE i had typedef enum boolean {false,true}; in a header. it does not compile any more: "identifier expected" not a big problem, just for information Roland Nov 15 2001
Roland a écrit :trying DM 8.23 compiler in DOSX model. i only replaced bin\SCPPN.EXE and bin\SCPPND.EXE Nov 15 2001
"Roland" <rv ronetech.com> wrote in message news:3BF39B52.6D08BC5F ronetech.com...- sorry outpw, inpw are still 32 bit contrary to what compiler.htm says Nov 15 2001
Walter a écrit :"Roland" <rv ronetech.com> wrote in message news:3BF39B52.6D08BC5F ronetech.com...- sorry outpw, inpw are still 32 bit contrary to what compiler.htm says Nov 16 2001
Roland a écrit :int _testbug() { int i; i1 = inpw(0x03ce); //16 bit outpw(0x03ce,i); //16 bit return i; } unassembles ?_testbug YAHXZ: mov EDX,03CEh in EAX,DX ;32 bit ! mov ECX,EAX mov EAX,ECX out DX,EAX ;32 bit ! mov EAX,ECX ret Regard Roland Nov 16 2001
ok, I'll check it out. -Walter "Roland" <rv ronetech.com> wrote in message news:3BF4DC3B.3661472C ronetech.com...Roland a écrit :int _testbug() { int i; i1 = inpw(0x03ce); file://16 bit outpw(0x03ce,i); file://16 bit return i; } unassembles ?_testbug YAHXZ: mov EDX,03CEh in EAX,DX ;32 bit ! mov ECX,EAX mov EAX,ECX out DX,EAX ;32 bit ! mov EAX,ECX ret Regard Roland Nov 16 2001
Hi, I can generate this too, but only by using a conio.h to provide the prototypes for inp*/outp*: ====== CODE GENERATES inpw/outpw as 16 bit #include <stdint.h> // #include <dos.h> #include <conio.h> const baseAddress = 0x300; int main (int argc, char * argv[]) { uint8_t i8; uint16_t i16; uint32_t i32; // Generate 3 inputs i8 = inp (baseAddress); i16 = inpw(baseAddress); i32 = inpl(baseAddress); // generate 3 outputs outp (baseAddress, i8); outpw(baseAddress, i16); outpl(baseAddress, i32); return 0; } ====== END of CODE GENERATES inpw/outpw as 16 bit This variant below (the one I've used) works 100%, fully inline and _inpw/_outpw are 16 bit with -mx. The changes are the _ before the inp* and outp* and the use of dos.h rather than conio.h : ====== CODE that works #include <stdint.h> #include <dos.h> // #include <conio.h> const baseAddress = 0x300; int main (int argc, char * argv[]) { uint8_t i8; uint16_t i16; uint32_t i32; // Generate 3 inputs i8 = _inp (baseAddress); i16 = _inpw(baseAddress); i32 = _inpl(baseAddress); // generate 3 outputs _outp (baseAddress, i8); _outpw(baseAddress, i16); _outpl(baseAddress, i32); return 0; } ====== END of CODE that works ======== build lines ... sc -mx -c -C ioTest.Cpp Obj2Asm ioTest.Obj >Fixed.Dmp ======== The problem appears to be the conio.h on my system, The 'offending' conio.h on my system is : CONIO H 8,091 03-17-01 12:15a CONIO.H I've not checked the exact nature of the inp/outp prototypes in there, but I assume that they are substantially different to the updated ones in the dos.h that appeared with the 8.23 Beta. John Culver "Roland" <rv ronetech.com> wrote in message news:3BF4DB59.9B791A69 ronetech.com...Walter a écrit :"Roland" <rv ronetech.com> wrote in message news:3BF39B52.6D08BC5F ronetech.com...- sorry outpw, inpw are still 32 bit contrary to what compiler.htm says Nov 16 2001
Hi. I've just patched my DM up to the current code set cd81d, then cd823, and the incorrect code generation with conio.h remains. John Culver Nov 16 2001
"Roland" <rv ronetech.com> wrote in message news:3BF396E2.CB83AF95 ronetech.com...trying DM 8.23 compiler in DOSX model. i only replaced bin\SCPPN.EXE and bin\SCPPND.EXE i had typedef enum boolean {false,true}; in a header. it does not compile any more: "identifier expected" Nov 15 2001
This compiles correctly with C, and fails correctly with C++ (since false and true are now C++ keywords). -Walter "Roland" <rv ronetech.com> wrote in message news:3BF396E2.CB83AF95 ronetech.com...trying DM 8.23 compiler in DOSX model. i only replaced bin\SCPPN.EXE and bin\SCPPND.EXE i had typedef enum boolean {false,true}; in a header. it does not compile any more: "identifier expected" not a big problem, just for information Roland Nov 15 2001
okay, thanks Roland Walter a écrit :This compiles correctly with C, and fails correctly with C++ (since false and true are now C++ keywords). -Walter "Roland" <rv ronetech.com> wrote in message news:3BF396E2.CB83AF95 ronetech.com...trying DM 8.23 compiler in DOSX model. i only replaced bin\SCPPN.EXE and bin\SCPPND.EXE i had typedef enum boolean {false,true}; in a header. it does not compile any more: "identifier expected" not a big problem, just for information Roland Nov 16 2001
|