Re: re-compile error
From: jacob navia (jacob_at_jacob.remcomp.fr)
Date: 12/13/04
- Next message: Richard Bos: "Re: Using hobby source code in your job ?"
- Previous message: Jens.Toerring_at_physik.fu-berlin.de: "Re: literal binary?"
- In reply to: developer: "re-compile error"
- Next in thread: developer: "Re: re-compile error"
- Reply: developer: "Re: re-compile error"
- Reply: Jack Klein: "Re: re-compile error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 13 Dec 2004 13:26:57 +0100
developer wrote:
> re-compile under dev -c++ bloodshed.
>
> can u help ?
>
>
> #include<dos.h>
> #include<process.h>
> #include<io.h>
> #include<stdio.h>
> #define STROBE 0x01
> #define NOT_STB 0x00
>
> void main()
> {
> char i,j;
> unsigned int CTRL_PORT,STAR_PORT;
> unsigned int far *DATA_PORT;
> DATA_PORT=MK_FP(0x0000,0x0408);
> STAR_PORT=*DATA_PORT+1;
> CTRL_PORT=STAR_PORT+1;
> outport(CTRL_PORT,0x00);
> while(1)
> {
> outport(*DATA_PORT,0x00);
> delay(2000);
> outport(*DATA_PORT,0xff);
> delay(2000);
> outport(*DATA_PORT,0x00);
> delay(2000);
> j=0x80;
> for(i=0;i<8;i++)
> {
> outport(*DATA_PORT,j);
> j=j>>1;
> delay(2000);
> }
> }
> }
>
>
> Compiler: Default compiler
> Executing gcc.exe...
> gcc.exe "C:\Documents and Settings\farm\TEST.C" -o "C:\Documents and
> Settings\farm\TEST.exe" -g3 -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
> C:/Documents and Settings/farm/TEST.C:9: `main' must return `int'
> C:/Documents and Settings/farm/TEST.C: In function `int main(...)':
> C:/Documents and Settings/farm/TEST.C:12: parse error before `*'
> token
> C:/Documents and Settings/farm/TEST.C:13: `DATA_PORT' undeclared
> (first use this function)
> C:/Documents and Settings/farm/TEST.C:13: (Each undeclared
> identifier is reported only once for each function it appears in.)
> C:/Documents and Settings/farm/TEST.C:13: `MK_FP' undeclared (first
> use this function)
> C:/Documents and Settings/farm/TEST.C:16: `outport' undeclared
> (first use this function)
> C:/Documents and Settings/farm/TEST.C:20: `delay' undeclared (first
> use this function)
>
> C:/Documents and Settings/farm/TEST.C: At global scope:
> C:/Documents and Settings/farm/TEST.C:33: stray '\32' in program
>
> C:/Documents and Settings/farm/TEST.C:33:3: warning: no newline at end of
> file
>
> Execution terminated
>
>
You are running under the windows OS. This OS is NOT the DOS
operating system that was discontinued more than 10 years ago.
This program is writing to a specific address. This will never work
under the win32 versions of windows (windows 95 or higher).
But all this is probably too technical for you. The fact that you
attempt to compile this under windows shows that you haven't got
any idea what this code is doing. I would suggest that you find
someone competent and give this to him (her).
Under DOS, you could write to any memory address since the OS
wasn't using protected mode and virtual memory. This doesn't work
since windows 95...
Anyway, maybe it will run if you compile it under a 16 bit DOS compiler
under the emulation layer of windows, who knows.
jacob
- Next message: Richard Bos: "Re: Using hobby source code in your job ?"
- Previous message: Jens.Toerring_at_physik.fu-berlin.de: "Re: literal binary?"
- In reply to: developer: "re-compile error"
- Next in thread: developer: "Re: re-compile error"
- Reply: developer: "Re: re-compile error"
- Reply: Jack Klein: "Re: re-compile error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|