Re: [fpc-pascal] spin_lock

2006-05-30 Thread Burkhard Carstens
Am Dienstag, 30. Mai 2006 01:05 schrieb Alain Michaud: Hi, would someone know how to execute: spin_lock spin_lock_init and spin_unlock I just want to disable the interrupts for 200 miliseconds maximum! This is not too long and hopefuly, my system will not crash... Well, 200 ms is about

Re: [fpc-pascal] real to integer

2006-05-30 Thread Vincent Snijders
Tony Pelton schreef: On 5/29/06, Vincent Snijders [EMAIL PROTECTED] wrote: Use a IDE with code tools that support find declaration. that is a terrible answer. this isn't the IDE list, it is the Free Pascal compiler list. Indeed. But sometimes the compiler doesn't give enough information

Re: [fpc-pascal] spin_lock

2006-05-30 Thread Marco van de Voort
[ Charset ISO-8859-15 unsupported, converting... ] Am Dienstag, 30. Mai 2006 01:05 schrieb Alain Michaud: Hi, would someone know how to execute: spin_lock spin_lock_init and spin_unlock I just want to disable the interrupts for 200 miliseconds maximum! This is not too long and

Re: [fpc-pascal] spin_lock

2006-05-30 Thread Jonas Maebe
On 30 mei 2006, at 08:57, Marco van de Voort wrote: This is not that easy: Is it only for UP or maybe also for SMP machines? Basically, for x86 the cli and sti asm instructions do disable/ enable interrupts, but read about it before you try. Currently, I do such stuff only inside a driver

Re: [fpc-pascal] real to integer

2006-05-30 Thread Vincent Snijders
Jonas Maebe schreef: On 30 mei 2006, at 08:37, Vincent Snijders wrote: i would have beat my head against a wall for days on a problem like that. Using the wrong tool for the wrong job, I would say. A compiler is to compiler, an IDE to write code. The compiler already gives unit

Re: [fpc-pascal] spin_lock

2006-05-30 Thread Burkhard Carstens
Am Dienstag, 30. Mai 2006 09:51 schrieb Jonas Maebe: On 30 mei 2006, at 08:57, Marco van de Voort wrote: This is not that easy: Is it only for UP or maybe also for SMP machines? Basically, for x86 the cli and sti asm instructions do disable/ enable interrupts, but read about it before you

Re[2]: [fpc-pascal] real to integer

2006-05-30 Thread Пётр Косаревский
The compiler already gives unit information in case you have conflicting types for making it easier to debug such problems. I don't see why it shouldn't do the same for used function definitions. Jonas program A; // Bad program uses sysutils,windows; const B:shortstring='1.txt'; begin

Re: Re[2]: [fpc-pascal] real to integer

2006-05-30 Thread Jonas Maebe
On 30 mei 2006, at 12:10, Пётр Косаревский wrote: The compiler already gives unit information in case you have conflicting types for making it easier to debug such problems. I don't see why it shouldn't do the same for used function definitions. This is fpc-pascal maillist, I don't insist,

Re: [fpc-pascal] spin_lock

2006-05-30 Thread Alain Michaud
You might want to give some more details about your situation. arch? os? and why would you do this? There might be a better solution.. than locking the hole system for 1/5 second .. Burkhard Hi, I feel a little bit guilty to use this list for my personal problems, but here it is: I use

[fpc-pascal] writeln in fpc 2.0.2

2006-05-30 Thread Gustavo Enrique Jimenez
I use Lazarus. So, I've upgraded fpc from 1.0.10 to 2.0.2 . I've recompiled my cgi apps, and now something is wrong: lines with more than 80 char writed with writeln seems to be truncated at position 80. A #10 char follows, an then the rest of the line. If I send the output to a text file,

Re: [fpc-pascal] writeln in fpc 2.0.2

2006-05-30 Thread Marco van de Voort
ps: Deep in the code, it is possible that crt unit is still linked (the cgi app comes from an old turbopascal console app). I think this is the primary problem, in combination with your terminal emulator and/or settings. - What do you use for console? - Some X program like xterm or

Re: [fpc-pascal] writeln in fpc 2.0.2

2006-05-30 Thread Michael Van Canneyt
On Tue, 30 May 2006, Gustavo Enrique Jimenez wrote: I use Lazarus. So, I've upgraded fpc from 1.0.10 to 2.0.2 . I've recompiled my cgi apps, and now something is wrong: lines with more than 80 char writed with writeln seems to be truncated at position 80. A #10 char follows, an then the

Re: [fpc-pascal] writeln in fpc 2.0.2

2006-05-30 Thread Gustavo Enrique Jimenez
You MUST remove the CRT unit. It's mentioned explicitly in the documentation that you are not allowed to use it for CGI. ok ! I will remove crt references. Sorry for not read the docs Thank you very much (Marco and Michael)... Gustavo Enrique Jiménez

Re: [fpc-pascal] spin_lock

2006-05-30 Thread Marc Santhoff
Am Dienstag, den 30.05.2006, 16:24 -0400 schrieb Alain Michaud: I use one of those (ISA) I/O bards: I write or read from a port and control a slow experiment. More details about the timing: IMO this is your main problem: the rotten old board. ;) To get away from dangerous programming I

Re: [fpc-pascal] spin_lock

2006-05-30 Thread Joep Blom
Marc Santhoff wrote: Am Dienstag, den 30.05.2006, 16:24 -0400 schrieb Alain Michaud: I use one of those (ISA) I/O bards: I write or read from a port and control a slow experiment. More details about the timing: IMO this is your main problem: the rotten old board. ;) To get away

Re: [fpc-pascal] spin_lock

2006-05-30 Thread Felipe Monteiro de Carvalho
On 5/30/06, Alain Michaud [EMAIL PROTECTED] wrote: The problem: the problem is: even if the timing is not so critical and the the experiment does not last for long, once it has started then the processor should not leave and go answer the phone for another process... I think that most process

Re: [fpc-pascal] writeln in fpc 2.0.2

2006-05-30 Thread Gustavo Enrique Jimenez
You MUST remove the CRT unit. It's mentioned explicitly in the documentation that you are not allowed to use it for CGI. I've removed all crt references. My cgi app works perfectly now. As an unexpected side effect, this app works perfectly also with Apache for windows. Thank you, thank