c++.dos.32-bits - Cannot get out and in to work
- Arthur Becker (10/10) Feb 14 2007 I am trying to read the cpu tick counter using port 61h with this code:
- tjulian (2/13) Feb 15 2007
- Heinz Saathoff (7/13) Feb 16 2007 As tjulian already noted the functions are called _inp and _outp
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.
Feb 14 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.
Feb 15 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 _inAs 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
Feb 16 2007