Thread overview | |||||
---|---|---|---|---|---|
|
February 14, 2007 Cannot get out and in to work | ||||
---|---|---|---|---|
| ||||
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 Re: Cannot get out and in to work | ||||
---|---|---|---|---|
| ||||
Posted in reply to Arthur Becker | 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 Re: Cannot get out and in to work | ||||
---|---|---|---|---|
| ||||
Posted in reply to Arthur Becker | 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
|
Copyright © 1999-2021 by the D Language Foundation