Re: [fpc-pascal] [OT] which editor - emacs?

2010-01-10 Thread Holger Bruns
Marco van de Voort schrieb: In our previous episode, Hans-Peter Suter said: Is Emacs a good choice? Does it work well with FPC? Maybe, but what would you use as editor? :_) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] readonly variables

2009-12-02 Thread Holger Bruns
Anthony Walter schrieb: This first time concerning the topic const records passed incorrectly you said, It is nowhere written in the Delphi specs that const parameters are passed by reference. It is often so, but is by no means guaranteed I checked this out. Both Turbo Pascal and fpc

Re: [fpc-pascal] One experience with the unit serial

2009-11-20 Thread Holger Bruns
Jonas Maebe schrieb: On 19 Nov 2009, at 14:30, Holger Bruns wrote: Since iopl is still not available to fpc in its 64-bit-version, I should move to c for future port programming. $ man iopl ... This call is mostly for the i386 architecture. On many other architec- tures

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Holger Bruns
Brad Campbell schrieb: Holger Bruns wrote: Hi, one more question regarding the unit serial. I use the following function to get one single byte form a serial port, which has been open before with seropen: function getdata(inhandle: tserialhandle; var recdata: char): longint; begin fillchar

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Holger Bruns
Gustavo Enrique Jimenez schrieb: Thank you for your answer. I played with different baud rates. The sender delivers a stream of bytes. The faster a transmission rate is, the less amount of data can be received. This leds me to two conclusions: At first, there must be a queue for incoming data

[fpc-pascal] IOPL - how to use it?

2009-11-18 Thread Holger Bruns
Hi, I am currently running the fpc in version 2.2.2-8, and I have some problems to get iopl and fpiopl working. It seems, the units oldlinux and x86 are not available to this version. How can I solve this problem? Cheers, Holger ___ fpc-pascal

[fpc-pascal] One experience with the unit serial

2009-11-18 Thread Holger Bruns
Hi, one more question regarding the unit serial. I use the following function to get one single byte form a serial port, which has been open before with seropen: function getdata(inhandle: tserialhandle; var recdata: char): longint; begin fillchar(inbuffer, sizeof(inbuffer), #0); getdata :=

Re: [fpc-pascal] const records passed incorrectly

2009-11-16 Thread Holger Bruns
Michael Van Canneyt schrieb: In reality it's always the FPC team that is f*d when an incompatibility arises. I refuse to use Borland again. I have their Delphi and the manuals as well on my cupboard, but since I saw Lazarus und fpc the first time, I decided to move on. Holger

[fpc-pascal] Debugger for the fpc available?

2009-11-07 Thread Holger Bruns
Hi, while writing some Pascal code, I am still looking for a debugger, which works like the turbo debugger, in a similar way. I would love it to get a clue. Best regards, Holger ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] x86.pp and oldlinux.pp

2009-11-04 Thread Holger Bruns
Gustavo Enrique Jimenez schrieb: Accessing serial ports in linux could be as simple as to write/read to/from /dev/ttySx . You don't need io ports. For a multiplatform solution, use synapsis/synaser. Sometimes it is useful to get more information about device drivers. Searching the internet

Re: [fpc-pascal] x86.pp and oldlinux.pp

2009-11-04 Thread Holger Bruns
Paul Breneman schrieb: Here is a very simple serial example using FPC and SynaSer: http://www.turbocontrol.com/simpleserial.htm Hope that is of some help. Thank you. I have already solved the problem to access serial ports, but I am rather clueless while dealing with device drivers like

Re: [fpc-pascal] x86.pp and oldlinux.pp

2009-11-04 Thread Holger Bruns
Jeff Wormsley schrieb: If you really need to go that route, with full access to 100% of the UART, perhaps this book would help (chapter 6 is on serial device drivers). *http://tinyurl.com/yjk4c9j* I'll follow your link. Just know that you will have to do that part of your application

Re: [fpc-pascal] x86.pp and oldlinux.pp

2009-11-04 Thread Holger Bruns
Vinzent Höfler schrieb: I doubt it. You sure sound write-only... I am aware, that I raise problably anger while asking on mailing lists for information, because every question can be interpreted as an insult. I do not post for interpersonal relationships, but for answers to technical

Re: [fpc-pascal] x86.pp and oldlinux.pp

2009-11-03 Thread Holger Bruns
Jonas Maebe schrieb: And regarding your later remark about FPC only being usable as root: it's the Linux kernel that only allows direct port access by root. Please stop blaming every single one of your problems on the compiler or the RTL. Under the bottom line, the result is just the same.

Re: [fpc-pascal] Access to RS232 ports with fpc

2009-11-02 Thread Holger Bruns
Jonas Maebe schrieb: Holger Bruns wrote on Mon, 02 Nov 2009: Martin schrieb: you can do: var buffer: Array of byte; SetLength(Buffer, 1000); SerRead(Handle, Buffer[0], 1000); I checked this out. It works not reliable. Sometimes I get real data, sometimes the data are corrupted. I have

Re: [fpc-pascal] Access to RS232 ports with fpc

2009-11-02 Thread Holger Bruns
Felipe Monteiro de Carvalho schrieb: It may be useful to know that there is a serial communication example using Synaser here: http://wiki.lazarus.freepascal.org/Hardware_Access#Serial_Communication Yes, thank you. I checked this out. The procedure reccvbyte, as used in this manner:

Re: [fpc-pascal] Access to RS232 ports with fpc

2009-11-02 Thread Holger Bruns
Holger Bruns schrieb: I try to implement a direct port access. If this also leads to access errors, I should give it up. Embarassing. Accessing ports is limited to ports 03ffh, more ports cannot be released with fpioperm. This means to me, successful serial port access on higher addresses

Re: [fpc-pascal] Access to RS232 ports with fpc

2009-11-02 Thread Holger Bruns
Florian Klaempfl schrieb: Holger Bruns schrieb: Holger Bruns schrieb: I try to implement a direct port access. If this also leads to access errors, I should give it up. Embarassing. Accessing ports is limited to ports 03ffh, more ports cannot be released with fpioperm

Re: [fpc-pascal] Access to RS232 ports with fpc

2009-11-02 Thread Holger Bruns
Bernd Mueller schrieb: Holger Bruns wrote: Holger Bruns schrieb: I try to implement a direct port access. If this also leads to access errors, I should give it up. Embarassing. Accessing ports is limited to ports 03ffh, more ports cannot be released with fpioperm. This means to me

[fpc-pascal] Some more units

2009-11-02 Thread Holger Bruns
Hi, I decided to use iopl and portread to address my idea on accessing ports on addresses above 0x3ff. Sadly, these units are not compiled yet, but the sourcecode is available. I still have no luck at all. Pointing fpc to x86.pp leads to an error message. The compiler misses an include

[fpc-pascal] x86.pp and oldlinux.pp

2009-11-02 Thread Holger Bruns
Hi, I decided to copy all the necessary files for x86.pp and oldlinux.pp into one directory for compiling these two units. This compilation failed due to syntax errors. A bunch of warnings also appeared. I post only the syntax error messages: oldlinux.pp(1696,2) Error: User defined: Cannot

Re: [fpc-pascal] Access to RS232 ports with fpc

2009-11-02 Thread Holger Bruns
Marc Santhoff schrieb: sDefaultPort: string = '/dev/cuaa0'; { this would be /dev/ttyS2 for you } fPort = sDefaultPort; { Init } fCom := SerOpen(fPort); if (fCom -1) then begin SerSetParams(fCom, 1200, 7, NoneParity, 2, []); end else begin writeln('Metex: failed to open port'); n :=

Re: [fpc-pascal] x86.pp and oldlinux.pp

2009-11-02 Thread Holger Bruns
Jonas Maebe schrieb: Holger Bruns wrote on Tue, 03 Nov 2009: I decided to copy all the necessary files for x86.pp and oldlinux.pp into one directory for compiling these two units. This compilation failed due to syntax errors. A bunch of warnings also appeared. I post only the syntax error

Re: [fpc-pascal] Access to RS232 ports with fpc

2009-11-02 Thread Holger Bruns
Brad Campbell schrieb: Why not try attaching your test code that is failing so we can help you get it working? Done. My fault was the following declaration: var inbuffer: array of char; This is a better declaration: var inbuffer: array[0..10] of char; Now I got my code working. Hidden

[fpc-pascal] Access to RS232 ports with fpc

2009-11-01 Thread Holger Bruns
Hello, I am new to this list. For programming the serial ports on a linux system, I tried to use the serial unit. i don't understand the declaration for buffer in the function below, because no type is declared for buffer. How can I read a character from the selected serial port? This is the

Re: [fpc-pascal] Access to RS232 ports with fpc

2009-11-01 Thread Holger Bruns
Jürgen Hestermann schrieb: function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt): LongInt; begin Result := fpRead(Handle, Buffer, Count); end; i don't understand the declaration for buffer in the function below, because no type is declared for buffer. I believe that

Re: [fpc-pascal] Access to RS232 ports with fpc

2009-11-01 Thread Holger Bruns
Martin schrieb: Holger Bruns wrote: Jürgen Hestermann schrieb: function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt): LongInt; begin Result := fpRead(Handle, Buffer, Count); end; i don't understand the declaration for buffer in the function below, because no type