www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/16/02:17:19

Message-Id: <3.0.32.19961216161245.006a4b24@icrn.chonbuk.ac.kr>
Date: Mon, 16 Dec 1996 16:13:01 +0900
To: djgpp AT delorie DOT com
From: Jung-mun Kim <jm DOT kim AT koreamail DOT com>
Subject: [Q] What's this messages??
Mime-Version: 1.0

Hi...

I have some trouble that I can't solve..

The Source files....

=============================================================================

#include	<go32.h>
#include 	<dpmi.h>
#include	<sys/farptr.h>
//#include  <iostream.h>
#include 	<dos.h>

_go32_dpmi_seginfo	old_handler, my_callback;

int counter;
char	*string;

void my_int()
{
	char *ch = string;
	int addr = 0xA0000;

	counter++;
	
	while(*ch)
	{
		_farpokeb(_dos_ds, addr, *ch);
		ch++;
		addr += 2;
	}
}

void	end_int(){}

void	init_handler()
{
	_go32_dpmi_lock_data(&counter, sizeof(counter));
	_go32_dpmi_lock_data(&string, sizeof(string));
	_go32_dpmi_lock_code(my_int, (long)end_int - (long)my_int);

	_go32_dpmi_get_protected_mode_interrupt_handler(8, &old_handler);

	my_callback.pm_offset = (int)my_int;
	_go32_dpmi_allocate_iret_wrapper(&my_callback);
	_go32_dpmi_set_protected_mode_interrupt_handler(8, &my_int);
}

void done_handler()
{
	_go32_dpmi_set_protected_mode_interrupt_handler(8, &old_handler);
	_go32_dpmi_free_iret_wrapper(&my_callback);
}


void update_text(char *s)
{
	int ints = disable();

	string = s;

	if(ints) enable();
}
	
main()
{
	char buffer[80], temp[80];
	int ints;
	
	counter = 0;
	update_text("");
	init_handler();

	_go32_lock_data(buffer, 80);
	printf("\nType some text followed by a CR,\n");
	printf(" or EXIT to quit \n");
	
	do {
		printf("Counter = %d \n", counter);
		scanf("%s", temp);
		ints = disable(); 	// clear interrupts
		strcpy(buffer, temp);
		if (ints) enable();		// re-enable interrupts
	} while (!stricmp(buffer, "EXIT"));
	
	done_handler();
}

---------------------------------------------------------------------------


Error Messages:
==========================================================================

timer1.c: In function `init_handler':
timer1.c:35: warning: implicit declaration of function
`_go32_dpmi_get_protected_mode_interrupt_handler'
timer1.c:39: warning: implicit declaration of function
`_go32_dpmi_set_protected_mode_interrupt_handler'
timer1.c: At top level:
timer1.c:59: warning: return-type defaults to `int'
timer1.c: In function `main':
timer1.c:67: warning: implicit declaration of function `_go32_lock_data'
timer1.c:68: warning: implicit declaration of function `printf'
timer1.c:73: warning: implicit declaration of function `scanf'
timer1.c:77: warning: implicit declaration of function `stricmp'
timer1.c:80: warning: control reaches end of non-void function
E:\ccdaaaaa(.text+0x78):timer1.c: undefined reference to
`_go32_dpmi_get_protected_mode_interrupt_handler'
E:\ccdaaaaa(.text+0x9b):timer1.c: undefined reference to
`_go32_dpmi_set_protected_mode_interrupt_handler'
E:\ccdaaaaa(.text+0xaf):timer1.c: undefined reference to
`_go32_dpmi_set_protected_mode_interrupt_handler'
E:\ccdaaaaa(.text+0x161):timer1.c: undefined reference to `_go32_lock_data'

----------------------------------------------------------------------------
---
How can I remove this messages??

thanks...

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019