[fpc-pascal] Can I compile MASM code/file in FPC?

2016-01-15 Thread silvioprog
Hello, Can I compile MASM code (or files) in FPC? If so, how to declare some MASM directives like .code, .data?, .const etc.?: === begin code === program fpcmasm; {$asmmode masm} // I know, it doesn't compiles, please tell me what I use :-) {$i } procedure somefunc; assembler; asm end; e

Re: [fpc-pascal] FileAge() issue?

2016-01-15 Thread silvioprog
On Fri, Jan 15, 2016 at 9:42 PM, silvioprog wrote: [...] > FPC (3.1.1 - trunk): 05/20/2014 10:33:*50.000* > > Comparing it with Delphi (using same FPC code) and Node > (console.log(stat.mtime.*toISOString*()): > > Delphi (Seattle): 05/20/2014 10:33:*49.646* > > Node: 2014-05-20T13:33:*49.646*Z >

Re: [fpc-pascal] FileAge() issue?

2016-01-15 Thread silvioprog
On Fri, Jan 15, 2016 at 4:15 AM, Michael Van Canneyt wrote: > On Thu, 14 Jan 2016, silvioprog wrote: > >> Hello, >> >> I'm trying to get the datetime from a file, but it seems that the >> FileAge() >> function doesn't work properly. See only the second from the results >> below: >> >> FPC: 20/05/

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-15 Thread Simon Ameis
Am 15.01.2016 um 10:38 schrieb Michael Schnell: > The Linux sleep system call provides a microsecond "busy" wait ,but > only when used with root privilege . Nice to know, but I asked for an AVR implementation. Although I've seen a report describing an ARM emulation on AVR running Linux I don't thin

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-15 Thread Simon Ameis
Am 14.01.2016 um 23:57 schrieb Marc Santhoff: > On Do, 2016-01-14 at 21:33 +0100, Simon Ameis wrote: >> In general I already know these documents; what I'm looking for is an >> implementation of a busy wait, not how to use it. >> For C/C++ it's easy to get the code files. But I don't know where to

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-15 Thread Sven Barth
Am 15.01.2016 18:10 schrieb "Michael Schnell" : > > On 01/15/2016 07:48 AM, Christo Crause wrote: >> >> >> The focus of the code is to get accurate delays down to a few cpu cycles. >> > This is impossible when running in any normal OS.(Of course you can run an fpc project "bare bone" without an OS)

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-15 Thread Marc Santhoff
On Fr, 2016-01-15 at 12:55 +0100, Michael Schnell wrote: > On 01/15/2016 07:48 AM, Christo Crause wrote: > > > > The focus of the code is to get accurate delays down to a few cpu cycles. > > > This is impossible when running in any normal OS.(Of course you can run > an fpc project "bare bone" with

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-15 Thread Michael Schnell
The Linux sleep system call provides a microsecond "busy" wait ,but only when used with root privilege . -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-15 Thread Michael Schnell
On 01/15/2016 07:48 AM, Christo Crause wrote: The focus of the code is to get accurate delays down to a few cpu cycles. This is impossible when running in any normal OS.(Of course you can run an fpc project "bare bone" without an OS), -Michael ___

Re: [fpc-pascal] Writing floating points to steams

2016-01-15 Thread Michael Schnell
On 01/13/2016 10:06 AM, Mark Morgan Lloyd wrote: Can I ask a naive question here please: does a binary stream store endianness anywhere? AFAIK, generally, such binary (file-, Network transfer, ) formats are not supposed to be "natively" portable. To be portable they should be either propr

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-15 Thread Marc Santhoff
On Fr, 2016-01-15 at 08:48 +0200, Christo Crause wrote: > There is a lot of useful information in avr-gcc code, once you can see past > the peculiarities of C. I agrre, but normally I don't need such precision. If working in a millisecond range it's really overkill to use less than 100 nanosecond