Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computing > Alt Msdos Programmer > Re: High Speed ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 475 of 501
Post > Topic >>

Re: High Speed IRQ Timer/Clock in C

by Francis Glassborow <francis.glassborow@[EMAIL PROTECTED] > Dec 28, 2007 at 12:15 PM

Andrew Wan wrote:
> I found this excellent High Speed Timer (in Pascal). I compiled it
> (using Turbo Pascal 7 and it runs fine):
> 
>
http://www.sorucevap.com/bilisimteknolojisi/programcilik/pascal/ders.asp?207995
>  and same High Speed Timer here too:
>
http://groups.google.com/group/comp.lang.pascal/browse_thread/thread/92e9398f16c10ba4/e67ff3cf587648ef?lnk=st&q=inline(%24CD)+inline(%241C)+inline(%249C)&rnum=1&hl=en#e67ff3cf587648ef
> 
> I converted it to C (using p2c), compiled it using Borland C++ 4.5 and
> it runs. But it crashes when it gets to setvect(...) in TimerOn.
> 
> Does anyone know how IRQ programming works in C? If you know IRQ timer/
> clock please contact me. I need urgent help in understanding why it's
> not working.
> 
> Below is my translated C code:


What you presented was code that was riddled with warnings from p2c. 
IOWs the code was way beyond what it can handle correctly. And a quick 
glance at the code shows such things as inline assembler code.

When you say it compiled with Borland C++ 4.5 was that without any 
diagnostics? If not, have you taken time to look at them and think how 
to resolve them (yes, warnings are not issued just for fun)

I suspect that you know very little about either turbo pascal or C. 
However, for the sake of argument, let us suppose I am wrong, why do you 
want to translate from Pascal to C a program that is extremely platform 
specific? Why not just use the pascal? You might even find that Borland 
tools will allow you to mix the two languages.
 




 1 Posts in Topic:
Re: High Speed IRQ Timer/Clock in C
Francis Glassborow <fr  2007-12-28 12:15:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 8:06:26 CDT 2008.