Thread overview
Cannot get out and in to work
Feb 14, 2007
Arthur Becker
Feb 15, 2007
tjulian
Feb 16, 2007
Heinz Saathoff
February 14, 2007
I am trying to read the cpu tick counter using port 61h with this code:
	out((in(0x61) & ~0x02) | 0x01, 0x61);
the compiler completes the command (dmc   sysinfo.c) without error but when
attempting to link it fails with the error:
 Error 42: Symbol Undefined _out
 Error 42: Symbol Undefined _in

I tried linking in about 5 of the different lib files in dm\lib but to no avail.
Please help as I can't figure out the running proc speed w/out a tick counter
of some kind.
Thanks.
February 15, 2007
In DMC, the functions you want are _inp() and _outp().

Arthur Becker wrote:
> I am trying to read the cpu tick counter using port 61h with this code:
> 	out((in(0x61) & ~0x02) | 0x01, 0x61);
> the compiler completes the command (dmc   sysinfo.c) without error but when
> attempting to link it fails with the error:
>  Error 42: Symbol Undefined _out
>  Error 42: Symbol Undefined _in
> 
> I tried linking in about 5 of the different lib files in dm\lib but to no avail.
> Please help as I can't figure out the running proc speed w/out a tick counter
> of some kind.
> Thanks.
February 16, 2007
Hello,

Arthur Becker schrieb...
> I am trying to read the cpu tick counter using port 61h with this code:
> 	out((in(0x61) & ~0x02) | 0x01, 0x61);
> the compiler completes the command (dmc   sysinfo.c) without error but when
> attempting to link it fails with the error:
>  Error 42: Symbol Undefined _out
>  Error 42: Symbol Undefined _in

As tjulian already noted the functions are called _inp and _outp (declared in header dos.h). Even if you use this calls you may not get what you want because you compiled your program as a Windows console application.


- Heinz