I am re-compile the source program under window XP

T

Thomas Matthews

F

Flash Gordon

What source code?

Indeed. The OP does need to reply to his/her previous post rather than
starting a new thread with no connection. However, since I happen to
remember going through some horribly 16 bit DOS dependant code by the OP
recently I can safely say that you don't want to know.

The OP needs to ask on a windows group or a group dedicated to his/her
implementation how to achieve what s/he wants, since it definitely
cannot be done using standard C and so would be a long way off topic
here.
 
D

developer

#include<dos.h>
#include<process.h>
#include<io.h>
#include<stdio.h>
#define STROBE 0x01
#define NOT_STB 0x00

int 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\henri\farm\TEST.exe" -g3 -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\
lib"
C:/Documents and Settings/farm/TEST.C:9: two or more data types in

declaration of `main'
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)

Execution terminated
 
F

Flash Gordon

#include<dos.h>

<snip system specific code>

As has been mentioned already. This code is completely system specific.
Please don't post it here again, discus it in groups dedicated to your
system.--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,408
Latest member
AlenaRay88

Latest Threads

Top