Polako gubim kosu zbog ovoga
Code:
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#include <conio.h>
#include <graphics.h>
#define PORT1 0x3F8
int main ()
{
FILE *fp;
char file_name [12];
int c, ch;
textcolor (11);
textbackground (1);
clrscr ();
outportb (PORT1 + 1 , 0); //Turn off interrupts - PORT1
outportb (PORT1 + 3 , 0x80); //Set DLAB on
outportb (PORT1 + 0 , 0x03); //BaudRate 38.400 bps- Divisor Latch Low Byte
outportb (PORT1 + 1 , 0x00); //BaudRate- Divisor Latch High Byte
outportb (PORT1 + 3 , 0x03); //8 Bits, No Parity, 1 Stop Bit
outportb (PORT1 + 2 , 0xC7); //FIFO Control Register
outportb (PORT1 + 4 , 0x0B); //Turn on DTR, RTS and out2
printf ("Unesite ime datoteke:");
gets (file_name);
if ( (fp = fopen(file_name, "r")) == NULL)
{
fprintf(stderr, "Greçka pri otvaranju datoteke %s.", file_name);
system ("Pause");
exit(1);
}
fclose (fp);
outport (PORT1, ???); // možda ovdje dođe nešto???
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#include <conio.h>
#include <graphics.h>
#define PORT1 0x3F8
int main ()
{
FILE *fp;
char file_name [12];
int c, ch;
textcolor (11);
textbackground (1);
clrscr ();
outportb (PORT1 + 1 , 0); //Turn off interrupts - PORT1
outportb (PORT1 + 3 , 0x80); //Set DLAB on
outportb (PORT1 + 0 , 0x03); //BaudRate 38.400 bps- Divisor Latch Low Byte
outportb (PORT1 + 1 , 0x00); //BaudRate- Divisor Latch High Byte
outportb (PORT1 + 3 , 0x03); //8 Bits, No Parity, 1 Stop Bit
outportb (PORT1 + 2 , 0xC7); //FIFO Control Register
outportb (PORT1 + 4 , 0x0B); //Turn on DTR, RTS and out2
printf ("Unesite ime datoteke:");
gets (file_name);
if ( (fp = fopen(file_name, "r")) == NULL)
{
fprintf(stderr, "Greçka pri otvaranju datoteke %s.", file_name);
system ("Pause");
exit(1);
}
fclose (fp);
outport (PORT1, ???); // možda ovdje dođe nešto???
return 0;
}
U pitanje je (kao što se vidi) Borland C compiler.
Sky is not a limit
http://www.veleri.hr/~kcetina
http://www.veleri.hr/~kcetina