Re: [fpc-pascal] Floating point question

2024-02-10 Thread greim--- via fpc-pascal
Hi, 



my test with Borland Pascal 7.0 running in dosemu2 running 80x87 code. 

The compiler throws an error message for calculating HH and II with explicit 
type conversion. 

The results of FF and GG are the same!
Even on 16 bit system!


I think this behavior is right!


In the 80x87 emulation mode data type single is not available and throws also 
an error during compilation. 



PROGRAM Consta;


Const
A_const : integer = 8427;
B_const : byte = 33;
C_const : Single = 1440.0;


Var
A_Var : Integer;
B_Var : Byte;
C_Var : Single;
FF, GG, HH, II : Extended;


begin
A_Var := A_Const;
B_Var := B_Const;
C_Var := C_Const;


FF := A_Var+B_Var/C_Var;
GG := A_Const+B_Const/C_Const;
(* HH := Extended(A_Const 

Re: [fpc-pascal] Oberon-0

2023-04-19 Thread Markus Greim via fpc-pascal
You are right there are in between many compilers for the Propeller 2 around. 
My idea would be a to have an Oberon system on the Propeller itself. 
Developing on the target itself is unbeatable clever. 
Is started 35 Years ago with the 8051-AH Basic processor and later on similar 
systems. 


The Propeller 2 has already a built in Forth which is already a fine thing, but 
I am sure the Processor is powerful enough to run also a full Oberon 
in the latest flavor of the RISC5 system. 
The Oberon0 compiler would be necessary as bootstrap for a full Oberon system. 
A native Oberon0 to Propeller ASM compiler would be fine, but maybe it would be 
easier to write first an Oberon0 to PropForth compiler. 

Kind Regards


Markus

--- original message ---
On April 19, 2023 at 1:25 AM GMT+2 tsie...@softcon.com wrote:



Gcc has already been ported to the propeller II, (and it runs on
the original propeller too), so porting other languages should be
"relatively" easy. I've not made the attempt to port anything yet
though, mostly because I've been out of the propeller world for a
couple years, and now that the version 2 is out, I'm trying to
reestablish some working environments so I can use the propeller
2. I have bought some of the mystery boxes, which gave me a
propeller 2 edge board with 32MB of ram, but I don't think I have
an actual propeller 2 just yet. Needing others to id things for
me is making the list of products I have hard to create, but I'm
getting there.

Anyway, since gcc exists, any compiler that uses gcc as the
backend should be possible to port. I've thought about porting
FPC, but I'd have to start with a version that's already meant for
smaller systems, I do believe someone posted a link to one a few
months ago, perhaps that one could be used as a jumping off point,
would be interesting to see pascal available for the propeller
boards.



On 4/18/2023 6:21 AM, Markus Greim via
fpc-pascal wrote:


> Hi Adriaan,



> whats about a Oberon-0 compiler compiling to Forth?

> And then Forth to MacOSX? (RetroForth, Swift or whatever) 



> That may sound silly, but such a Compiler would help a lot> to port Obern to 
> other platforms resp Microcontrollers etc. 

> For example to the Propeller II 


> Kind Regards



> Markus




>> On April 18, 2023>> at 12:13 PM GMT+2 fpc-pascal@lists.freepascal.org>> 
>> wrote:


>> Any suggestions for running simple>> Oberon-0 programs on the MacOSX 
>> command-line ? EIther by>> emulating its RISC processor or by changing the 
>> Oberon-0>> compiler ? I prefer not to load the entire Oberon system (for>> 
>> which there do exist emulators).


>> Regards,


>> Adriaan van Os

>> ___

>> fpc-pascal maillist - fpc-pascal@lists.freepascal.org

>> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal





> ___>fpc-pascal maillist - 
> fpc-pascal@lists.freepascal.org>https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Oberon-0

2023-04-18 Thread Markus Greim via fpc-pascal
Hi Adriaan,


whats about a Oberon-0 compiler compiling to Forth?
And then Forth to MacOSX? (RetroForth, Swift or whatever) 


That may sound silly, but such a Compiler would help a lot to port Obern to 
other platforms resp Microcontrollers etc. 
For example to the Propeller II 

Kind Regards


Markus

--- original message ---
On April 18, 2023 at 12:13 PM GMT+2 fpc-pascal@lists.freepascal.org wrote:

Any suggestions for running simple Oberon-0 programs on the MacOSX command-line 
? EIther by emulating its RISC processor or by changing the Oberon-0 compiler ? 
I prefer not to load the entire Oberon system (for which there do exist 
emulators).

Regards,

Adriaan van Os
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] [Pas2js] FPC and WebAssembly

2021-12-25 Thread greim--- via fpc-pascal


Congratulations! 


and 


Frohe Weihnachten


Markus

--- original message ---
On December 24, 2021, 2:16 PM GMT+1 fpc-pascal@lists.freepascal.org wrote:




>> And yes, we can do graphics too:

>>

>> https://www.freepascal.org/~michael/pas2js-demos/wasienv/terminal/


> That should obviously be:


> https://www.freepascal.org/~michael/pas2js-demos/wasienv/canvas/


> My apologies for the mistake.


> Michael.

> ___

> fpc-pascal maillist - fpc-pascal@lists.freepascal.org

> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Conversion from C to Pascal - Left bit shift

2021-09-04 Thread Markus Greim via fpc-pascal
After 35 years of Pascal experience I would urgently recommend NOT to trust any 
automatic type conversion in the case of shift operators. Alteady Turbo Pascal 
failed here on x386 architectures. Force input and output variables to a 
certain data type before you use the shift operator. 


Just my 5 cents 
Markus Greim

Mit freundlichen Grüßen

Markus Greim

Schleibinger Geräte
Teubert u. Greim GmbH
Gewerbestrasse 4
84428 Buchbach
Germany

Tel. +49 8086 94731-10
Fax. +49 8086 94731-14
Mobil +49 172 8 999 196
http://www.schleibinger.com


Amtsgericht Traunstein HRB 9646
Geschäftsführer:
Dipl.-Ing. (FH) Oliver Teubert
Dipl.-Ing. (Univ.) Markus Greim
UST-ID. DE 174 175 046

--- original message ---
On September 3, 2021 at 2:36 PM GMT+2 fpc-pascal@lists.freepascal.org wrote:

I made a few tests on Ubuntu 64 bits (arch x86_64) with variations on a small 
test program:
var
E2: Byte= 3;
E1: LongWord= 1;
E: QWord;
begin
E:= (1000*E1) shl E2;
writeln( 'E2', E2);
writeln( 'E1', E1);
writeln( 'E', E);
end.

In the assembly window, shl is computed on 64 bits %rax, I get :

project1.lpr:132 E:= (1000*E1) shl E2;
004011B2 8b05d8f50c00 mov 0xcf5d8(%rip),%eax # 0x4d0790 

004011B8 4869c0e803 imul $0x3e8,%rax,%rax
004011BF 0fb60dbaf50c00 movzbl 0xcf5ba(%rip),%ecx # 0x4d0780 

004011C6 48d3e0 shl %cl,%rax
004011C9 48890580b51000 mov %rax,0x10b580(%rip) # 0x50c750 


Changing the formula to E:= E1 shl E2, shl computed on 32 bits %edx, (I don't 
understand the "and %edx,%edx", may be just to clear the carry ?)
I get :

project1.lpr:132 E:= E1 shl E2;
004011B2 0fb605c7f50c00 movzbl 0xcf5c7(%rip),%eax # 0x4d0780 

004011B9 8b15d1f50c00 mov 0xcf5d1(%rip),%edx # 0x4d0790 

004011BF 89c1 mov %eax,%ecx
004011C1 d3e2 shl %cl,%edx
004011C3 21d2 and %edx,%edx
004011C5 48891584b51000 mov %rdx,0x10b584(%rip) # 0x50c750 


Changing E1 to QWord ( E1: QWord= 1; ), shl is computed on 64 bits %rax, I get :

project1.lpr:132 E:= E1 shl E2;
004011B2 0fb605c7f50c00 movzbl 0xcf5c7(%rip),%eax # 0x4d0780 

004011B9 488b15d0f50c00 mov 0xcf5d0(%rip),%rdx # 0x4d0790 

004011C0 4889c1 mov %rax,%rcx
004011C3 48d3e2 shl %cl,%rdx
004011C6 48891583b51000 mov %rdx,0x10b583(%rip) # 0x50c750 


___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-24 Thread greim--- via fpc-pascal
Travis, 


I was working with the Propeller1 for many years We realized a commercial 
project with it . See 
http://www.schleibinger.com/cmsimple/en/?Setting_and_Maturity:Ultrasonic_Setting_Measurement


It works very reliable. 


In June, I have got my first Propeller2 board from Parallax. 
Really an impressive chip. Getting all relevant info
and testing and evaluating all the different development platforms is still 
demanding. 
But situation is getting better each day. 


Pascal on the Propeller itself would be possible. There are CPM2.2 emulator for 
the Propeller around, so
TurboPascal 3.0 should work. But with all the CP/M and Z80 emulator overhead. 


As you may know, Niklaus Wirth developed Oberon as a successor of Pascal. 
Its near identical to Pascal, just yet another name. 


Its not only a compiler but also a development environment, including an editor 
and also an own OS and GUI ! 
He developed it with Gutknecht mainly at the Xerox PARC labs, long before Steve 
Jobs and Bill Gates made their own copies of the ALTO work-station. 


The required resources are minimal. In 2013 Wirth developed an own RISC 
processor on a FPGA
He published the Verilog and also the Oberon code, because Oberon is written in 
Oberon (!)
The whole compiler, editor, OS, GUI, screen driver, mouse control, etc has less 
then 10.000 lines of Oberon code !!!
That is near nothing, 
See
http://people.inf.ethz.ch/wirth/
and
http://www.projectoberon.com/


I realized this project on a FPGA for myself as proof of concept. 
It worked finally, but handling the Xilinx development software was (and is 
still) a mess. 
Later I translated the according PC emulator of Peter de Wachter from C to 
FreePascal. 


The RISC-5 ** architecture of Wirth is quite simple and I would see
no real problem to adapt the Oberon system to the Propeller2. 


The 3 main obstacles: 


1. There is no divider in the COGs, but I guess its possible to use the CORDIC 
divider instead.


2. The RAM space of the Propeller2 is too small, OBERON requires 1 MByte of RAM 
mainly for the video buffer. 
The Propeller2 is supporting some RAM extension, so also this should work. 
As far as I can see know, this would be the only necessary hardware extension 
the the P2 evaluation board. 


3. RISC-5 has a floating point adder, multiplier and divider. So any emulator 
required. 


Porting the core compiler called OBERON-0 to the propeller would be the most 
complicated thing and 
OBERON-0 is using no floating point math. 
All other things should be easier, I guess. 
Finally we would get a 8 core OBERON computer


Many Christmas dreams...


Regards
Markus


P.S. **) don't mix RISC-5 up with the now popular RISC-V architecture. Wirth is 
a genius, but has never
a lucky hand for finding good and unique names for his projects. So from 
Algol to Pascal to Modula to Oberon to Oberon-2 to A2 to Project Oberon...

--- original message ---
On December 23, 2020, 6:10 PM GMT+1 tsie...@softcon.com wrote:





On 12/22/2020 11:43 AM, Markus Greim
via fpc-pascal wrote:


> Wow..



> Programming languages I worked with in the last 40 years: 


> 12. SPIN
> 




When you say spin, I'm assuming you're talking about the parallax
propeller boards programming language. The propeller 2 is coming
out shortly (already out for early adopters), and I am anxiously
awaiting the day I can get my hands on one. I've built all kinds
of projects with the propeller 1 board, the first of which was an
FM radio.

But, to put this (somewhat) on topic, I've been wondering how
complicated it would be to port FPC to the propeller 2 board,
since they now have GCC ported, I would absolutely love to be able
to program the propeller boards in pascal. I do have a couple of
their java stamps, those are interesting, and they do have a micro
python that can be run on the propeller 2 boards, so adding pascal
should be doable, I'm just not sure how much work it would take,
but it would be nice to have another language to add to the mix.
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-23 Thread Markus Greim via fpc-pascal
Wow..


I am impressed... I hope my PASCAL is better then my English (first foreign 
language: Latin (for 7
years), 2nd English (6 years), 3rd ancient Greek (3 years)...) 


Programming languages I worked with in the last 40 years: 


1. Basic first on a Tektronix 4050 and a TRS-80 about 1979
2. Fortran batch jobs on a CDC Cyber 205 
3. PASCAL first on a DEC VAX 780 about 1986
4. PDC Prolog on MS-DOS
5. Assembler 
6. C
8. Perl and others on Linux from 1998
9. Java
10. Python 
11. PHP
12. SPIN

n. ERLANG <- most recently


aside FORTRAN I earned some money programming in all languages above..


Totally off topic, but it is Christmas time..

Kind Regards


Markus

--- original message ---
On December 22, 2020, 1:03 PM GMT+1 fpc-pascal@lists.freepascal.org wrote:

On Mon, 21 Dec 2020 at 22:11, Travis Siegel via fpc-pascal
 wrote:

>>

>> I don't know what non native english speakers are taught, nor can I address 
>> the folks across the pond, but here in the Us at least, has denotes 
>> currently exists, while had indicates past tense, I.E. no longer exists. 
>> Combining the two is where it gets dicy, and is generally avoided for 
>> syntactical reasons.


> FWIW... I'm (among other things) a qualified teacher of English as a

> second language. "Has had" and "had had" are 100% genuine correct

> English tenses, called the present perfect and past perfect

> respectively.


> Simple present: FPC _has_ a console-mode IDE -- now, it possesses one.

> Simple past: FPC _had_ a console-mode IDE -- it used to, but this

> state ended in the past; it no longer does.

> Present perfect: FPC _has had_ a console-mode IDE -- it has one, and

> the time it started to have one is a significant time ago.

> Past perfect: FPC _had had_ a console-mode IDE -- it used to have one

> a long time ago, but it stopped having it a long time ago.


> I will not itemise all the other alternatives. There is an informal

> competition as to how many tenses it is possible to create in English,

> and the record is some 120 different ones, and 144 if you include

> passive-voice constructions. There are about a dozen in common use.


> FPC has had a console-mode IDE means that there is one now and that

> there has been one for a considerable time. I presume this is what

> Nikolay meant. I did not know and I apologize for my ignorance of

> this.


> -- 

> Liam Proven – Profile: https://about.me/liamproven

> Email: lpro...@cix.co.uk – gMail/gTalk/gHangouts: lpro...@gmail.com

> Twitter/Facebook/LinkedIn/Flickr: lproven – Skype: liamproven

> UK: +44 7939-087884 – ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

> ___

> fpc-pascal maillist - fpc-pascal@lists.freepascal.org

> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-22 Thread Markus Greim via fpc-pascal
FPC has had a Turbo Pascal-like console IDE for many years...


"has had" ?


AKAIK "has" 


I still used it yesterday. 

Grüße


Markus

--- original message ---
On December 20, 2020, 7:33 PM GMT+1 fpc-pascal@lists.freepascal.org wrote:


On 12/19/20 6:35 PM, Liam Proven via fpc-pascal wrote:

>> https://github.com/magiblot/tvision

>>

>> Someone enterprising could make a TurboPascal clone out of FPC. :-)

>>

> Meh. FPC has had a Turbo Pascal-like console IDE for many years. It uses Free 
> Vision, which is a pascal port of the C++ version of Turbo Vision (because 
> Borland didn't release their Pascal version under a free/open source license).


> https://wiki.freepascal.org/Free_Vision#Turbo_Vision


> Nikolay


> ___

> fpc-pascal maillist - fpc-pascal@lists.freepascal.org

> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-22 Thread Markus Greim via fpc-pascal
Hello Nikolay,


I am a German - so may be we are both "lost in translation"

Kind Regards


Markus

--- original message ---
On December 21, 2020, 10:17 AM GMT+1 nick...@gmail.com wrote:





On 12/21/20 10:42 AM, Markus Greim
wrote:


> FPC has had a Turbo Pascal-like console IDE for many> years...



> "has had" ?



> AKAIK "has" 



> I still used it yesterday. 




English is not my native language, but I think "has had" means it
still has it. If I had said "had" instead of "has had", it would
mean it had it in the past, but no longer has it. Please correct
me if I'm wrong.


Nikolay



> Grüße



> Markus




>> On December 20,>> 2020, 7:33 PM GMT+1 fpc-pascal@lists.freepascal.org>> 
>> wrote:



>> On 12/19/20 6:35 PM, Liam Proven via fpc-pascal wrote:

>>> > https://github.com/magiblot/tvision

>>> >

>>> > Someone enterprising could make a TurboPascal clone out>>> of FPC. :-)

>>> >

>>> Meh. FPC has had a Turbo Pascal-like console IDE for many>>> years. It uses 
>>> Free Vision, which is a pascal port of the>>> C++ version of Turbo Vision 
>>> (because Borland didn't release>>> their Pascal version under a free/open 
>>> source license).


>>> https://wiki.freepascal.org/Free_Vision#Turbo_Vision


>>> Nikolay


>>> ___

>>> fpc-pascal maillist - fpc-pascal@lists.freepascal.org

>>> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] New User

2020-12-02 Thread greim--- via fpc-pascal
Fantastic, a real good introduction for us old Pascalians !!
We should send a link to Niklaus Wirth ;-) 


Markus Greim

--- original message ---
On November 30, 2020, 12:09 PM GMT+1 fpc-pascal@lists.freepascal.org wrote:

On Mon, Nov 30, 2020 at 4:43 AM Derek Stewart via fpc-pascal
 wrote:

>>

>> Hi,

>>

>> I have just discover FreePascal and compiled FPC from source. I must say

>> it look very good.

>>

>> I did a software engineering course in the UK Open University, in the

>> 1980s, which was mainly Pascal orientated.

>>

>> I am working my way through the excellent FPC tutorials.

>>

>> Can anyone recommend any good reference books on FPC.


> https://castle-engine.io/modern_pascal_introduction.html


> regards,

> Marcos Douglas

> ___

> fpc-pascal maillist - fpc-pascal@lists.freepascal.org

> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Graphing library

2020-11-17 Thread Markus Greim via fpc-pascal
Hello Bernd,


there is a bachelor thesis from Jörg Winkler, 2013 in the net (in German): 


"OpenGL-basierter logischer Gerätetreiber für ein Grafisches Kernsystem"
Entwicklung eines logischen GKS Gerätetreibers
auf der Basis von OpenGL


https://docplayer.org/20014258-Entwicklung-eines-logischen-gks-geraetetreibers-auf-der-basis-von-opengl.html


It includes the source code (in C) . Seems to be a GKS to OpenGL software. 


AFAIK the author is on GitHub, so may be you can ask him for some details or 
the source files: 
https://github.com/joergi-w

Kind Regards


Markus

--- original message ---
On November 15, 2020, 11:25 PM GMT+1 fpc-pascal@lists.freepascal.org wrote:



Hi, 


I don't know if this can help you, but in the 1980s I worked with
a library called GKS (graphic kernel system) 

which I used to build such graphics like the following example: 

http://bernd-oppolzer.de/fdynsb.pdf

This programs that did this were written in Pascal at that time. 


It still works today for me (the customer still uses this
software), 

although is it C today, and GKS is not available any more. 

What I did: the original GKS calls are written to files (some sort
of GKS metafile, but not the 

original 1980s format), and then this file format is read by a C
program GOUTHPGL, 

which translates this (proprietary) format to HPGL. The HPGL files
are either sent to 

HP plotters or translated to PDF using public domain software; see
the file above. 

(GOUTHGPL was a Pascal program in the 1990s, too). 


IMO, you could easily write the "GKS metafile format" with
Pascal; 

in fact, it is simply is a sort of logfile of the GKS calls. 


Here is an old paper about the GKS system:
http://nsucgcourse.github.io/lectures/Lecture01/Materials/Graphical%20Kernel%20System.pdf

The translator GOUTHGPL supports only a small subset of GKS; see
again the example picture above. 


If you are interested for more details, you could contact me
offline. 


Kind regards

Bernd 




Am 15.11.2020 um 09:33 schrieb Darius
Blaszyk via fpc-pascal:


> Hi,



> I am looking for a simple to use non-visual graphing> library to produce x-y 
> plots in a raster file format (similar> to how pyplot works). Rather than 
> developing something from> scratch or writing a wrapper to GNU plot 
> (additional> dependency), I was hoping something like this already would> 
> exist that I could build upon.



> Thank you for any tips!



> Rgds, Darius





> ___>fpc-pascal maillist - 
> fpc-pascal@lists.freepascal.org>https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] basic question on begin, end;

2020-09-25 Thread Markus Greim via fpc-pascal
Bo,


"Programs must not be regarded as code for computers, but as literature for 
humans"


Niklaus Wirth, the inventor of PASCAL.
Last sentence on the last slide of his presentation. 
given at a conference to honor of his 80th birthday at the ETH Zürich in 2014.


(i had the honor to participate)

Kind Regards


Markus

--- original message ---
On September 24, 2020, 10:04 AM GMT+2 fpc-pascal@lists.freepascal.org wrote:

On Wed, 23 Sep 2020 08:28:20 -0700, Ralf Quint via fpc-pascal
 wrote:


>> Similar like moving code blocks around in 

>> Python with a one-off indentation and all the sudden the flow of that 

>> code changes, without complaining...


> This use of whitespace as block delimiter is why I never could cope

> with Python when I was working (now retired).


> Begin-end are really big helpers to correctly structure loops etc and

> I use them all the time to make things clearer.


> Also putting begin right below if, for, while etc makes it much easier

> in Lazarus to see what happens in multi-level code when one is

> selecting begin or end since they match vertically.

> So I never do:


> if something then begin

> some multi-line code here

> end;


> Instead:


> if something then

> begin

> some multi-line code here

> end;


> And of course as has already been pointed out the original question's

> example code fundamentally changes execution with or without the

> begin-end pair!


> -- 

> Bo Berglund

> Developer in Sweden


> ___

> fpc-pascal maillist - fpc-pascal@lists.freepascal.org

> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Porting from Turbo Pascal to FPC

2020-05-01 Thread Markus Greim
Hello,


I run Borland Pacal 7.01 in Dosemu / XdosEmu (don't use the 64bit binary) on 
Linux (Kernel 4.15, 64bit, Linux Mint 19.1, 16 CPUs...) here. 
Works fine, even the serial interface. At least for my experience, the printer 
doesn't work. 
So I "print" in a (shared) graphic file, and print then with Linux. 


Maybe LPT works now, I tested it last time about 10 years ago. 

Grüße


Markus

--- original message ---
On April 30, 2020, 11:27 AM GMT+2 xhaj...@hajny.biz wrote:

On 2020-04-30 10:29, Elmar Haneke wrote:

>> Am 29.04.20 um 10:42 schrieb Francisco Glover via fpc-pascal:

>>> Overt the years I have developed programs in Turbo Pascal for student

>>> lab use, in which the student can easily send to an attached printer

>>> contents of the text or VGA graphics screens. These no longer work on

>>> Windows 10. In shifting to FPC , certain key procedures which worked

>>> in Turbo Pascal running on Windows XP no longer work in FPC running on

>>> Windows 10. Samples are shown below:

>> 

>> The Problem depends more on moving from DOS to Windows than movong from

>> very old TP to FPC.

>> 

>> It might be an option to use DOSBox to run that old software.


> Indeed, the point of the original poster is not related to FPC versus TP 

> but rather porting low-level DOS access to other operating systems - FPC 

> would probably allow using these low-level constructs without problems 

> for the DOS target (either without changes with the 16-bit msdos target, 

> or with rather minor changes with the 32-bit GO32v2 target).


> Talking about DOSBox, things like printing may still not work very well 

> there, although there seem to be modified versions of DOSBox which may 

> have better support for this functionality according to a very quick 

> Google search. In any case, it's probably better to bite the bullet and 

> rewrite the low-level parts of that old application. The other option 

> might be running DOS in a full-featured virtualized environment (e.g. 

> VirtualBox).


> Tomas

> ___

> fpc-pascal maillist - fpc-pascal@lists.freepascal.org

> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Illegal counter variable?

2019-09-10 Thread Markus Greim
James, 



not every body is using a GHz machine. I am , for example, programming a 80186 
in an embedded system with very limited speed an RAM. 

But I understand thats not a general argument. 



But look at MISRA C. Its a big set of rules for "real" save C programming, more 
or less now the standard in the automobile industry. 

Also here are strict rules for counters in for loops. 

See: 

https://www.misra.org.uk/forum/viewtopic.php?t=272​


So what they are doing is writing Pascal programs in C... ;-) And they need 
huge and expensive and complex tools to check the C code for 

MISRA compatibility!
So we should NOT give up the safety of Pascal for the sloppiness of C! 

Kind Regards


Markus

--- original message ---
On September 9, 2019, 7:19 PM GMT+2 ja...@productionautomation.net wrote:

Yes, today such limitations do seem too restrictive, I wonder if the reasons 
for the restrictions have become obsolete. You would have to have a really slow 
computer with very limited resources to optimize loops to the point of reducing 
functionality like this, and the tendency with modern pc's is to have a larger 
library of much more powerful and more flexible tools, even if they are more 
complex and take more memory and resources. For example Case statements used to 
only work with characters or integers, but the modern version now also works 
with strings, very much added functionality for sure, but also would use more 
resources but we would all rather have the capability because even a 
raspberry pi is blazing fast and has ram to burn compared to our old 8086s It 
seems silly to me that I can't so what I used to do with Turbo Pascal for DOS 
where I was limited to programs of a few hundred K, due to optimizations that 
just can't make much of a difference at all on modern computers. I am happy 
that FPC has TP compatibility mode though! It's just I get to a point where I 
eventually can't cross units since I can't have a circular unit reference. So I 
have to choose for any given unit.. do I want my old for loops and change the 
control variables, or do I want cool new case statements... etc.. it would be 
nice to have {$Mode everything_the_way_I_want_it}

Since the compiler knows I was trying to change the variable inside the for 
loop, could it not just compile in not quite as efficient code (TP MODE for 
loop) when it detects this, and use the more efficient optimized code when it 
detects that it is able to use it?

James

-Original Message-
From: fpc-pascal  On Behalf Of Bernd 
Oppolzer
Sent: Monday, September 9, 2019 10:46 AM
To: FPC-Pascal users discussions 
Subject: Re: [fpc-pascal] Illegal counter variable?

Am 09.09.2019 um 16:11 schrieb James Richters:

>> I just don't see why having the limitation, there is no technical 

>> reason that the for loop couldn't change that I can see.. especially since 
>> it works in TP mode.


> The original reason why some Pascal implementations had this limitation:


> for performance or optimization reasons, the loop control variable was 
> transferred to a register at the beginning of the loop, and changing the 
> variable (at its storage location) inside the loop simply had no effect, 
> because the variable was not fetched from there again during loop execution.

> Worse: maybe, to make read accesses to the loop control variable valid inside 
> the loop, they are prepared by storing the control register value into the 
> loop control variable, thus turning changes to the loop control variable 
> useless.


> Forbidding (write) accesses to the loop control variable allows for many 
> aggressive optimization strategies around loops.


> Maybe today such limitations seem too restrictive.


> Kind regards


> Bernd


> ___

> fpc-pascal maillist - fpc-pascal@lists.freepascal.org 
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

> ___

> fpc-pascal maillist - fpc-pascal@lists.freepascal.org

> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Illegal counter variable?

2019-09-10 Thread Markus Greim
AFAIK these is the standard behavior since the first PASCAL versions. 

We must not change it. It prevents a lot of side effects, and PASCAL is NOT C 
without brackets!
Use while or repeat instead!



>From Niklaus Wirths last 2004 Oberon manual: 

https://people.inf.ethz.ch/wirth/ProgInOberon2004.pdf​




t "It is recommended that the for statement be used in simple cases only; in 
particular, no 
components of the expressions determining the range must be affected by the 
repeated 
statements, and, above all, the control variable itself must not be changed by 
the repeated 
statements. The value of the control variable must be considered as undefined 
after the for 
statement is terminated."

Kind Regards


Markus

--- original message ---
On September 9, 2019, 5:20 PM GMT+2 mar...@templot.com wrote:

On 09/09/2019 15:11, James Richters wrote:

>> If (I>86) And (I<95) then Continue;

>> What does continue do exactly? Loop back to the beginning of the for loop 
>> right away?


> Hi James,


> Yes in effect -- it jumps forward to the test at the end of a loop. Very 

> useful.


> See: https://www.freepascal.org/docs-html/rtl/system/continue.html


> cheers,


> Martin.

> ___

> fpc-pascal maillist - fpc-pascal@lists.freepascal.org

> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Source file macro

2019-06-21 Thread Markus Greim
Great, 
looking for this "Macro" for 15+ years

Kind Regards


Markus

--- original message ---
On June 19, 2019, 5:35 PM GMT+2 ga...@poczta.onet.pl wrote:

W dniu 2019-06-19 o 17:10, Ryan Joseph pisze:

>> 

>> Oh I see now. Strange syntax, never saw that before. Can you get the full 
>> path instead of just the name?

>> 

>> Regards,

>> Ryan Joseph

>> 

> Unfortunately, just the name. But it's a good idea to be able to have a 

> full path.

> You can get full listof directives here:

> https://www.freepascal.org/docs-html/prog/progsu41.html


> Regards,

> Michał.

> ___

> fpc-pascal maillist - fpc-pascal@lists.freepascal.org

> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--- end of original message ---___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Comp type

2018-01-11 Thread greim

By the way there was a bug in fpc 3.0.
I am not sure if it is fixed yet.
Dividing a comp number by any other number gives wrong results.
Please see my posting from 29.06.2016

Markus
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Comp type

2018-01-10 Thread greim

AFAIK there is a small difference between comp and int64

COMP is 63bit + sign bit

int64 is 2s complement.

I hope I am right here.

Markus


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Modern Compiler Construction using Pascal

2018-01-02 Thread greim



I guess you already noticed the book of the master himself: Nicklaus Wirth


https://www.inf.ethz.ch/personal/wirth/CompilerConstruction/index.html

Its revised 2017 (!) based on Oberon.

Afaik one of the first editions was based on Pascal.

Markus




Am 01.01.2018 um 19:17 schrieb Yves Cloutier:

Hi there,

I'd be interested to know if any modern compilers have been written in 
Pascal (other than the Pascal Compiler).


It's unfortunate that that most Pascal books out there are rather 
dated.  I did recently purchase



  Compiler Engineering Using Pascal (by Capon)


https://www.amazon.ca/Compiler-Engineering-Using-Pascal-Capon/dp/0333471555/ref=sr_1_1?ie=UTF8=1514829567=8-1=Compiler+Engineering+Using+PASCAL

And look forward to getting it in my mailbox.

I also have Brinch Hansen on Pascal Compilers. I did have another book 
on writing a compiler using pascal but it was using some framework which 
I was not able to find.


Another great book I have is Introduction to Compiler Construction by 
Thomas Parsons, but I was not able to follow it all the way through.


My interest for the moment is more for creating a DSL that scans, parses 
then generates Groff as its target code.


After gaining some experience with the process I would like to venture 
into writing a transpiler for something like SETL -> Pascal or Oberon -> 
Pascal.  There are other interesting older languages too like BCPL that 
could be used as the source language.  Implementing Icon in Pascal would 
be interesting as well as its implementation is extremely well 
documented in the book "Implementing Icon and Unicon" by Clinton Jeffery


I find the Pascal compiler to be really fast and the fact that it is 
available for so many platforms is very appealing.







___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Pipe vs Memory buffer.

2017-01-26 Thread greim

Hello Fred,

I didn't understand the software structure / problem behind the C-> 
Pascal translation, but for me named pipes work very well for many kinds 
of interprocess communication.


Markus





Am 25.01.2017 um 23:13 schrieb fredvs:

Hello

In a C method:

OP_WARN_UNUSED_RESULT OggOpusFile *op_test_memory(const unsigned char
*_data,
 size_t _size,int *_error);

translated in Pascal with this:

var
 op_test_memory: function(const _data; const size: cuint; out error: cint):
TOggOpusFile;

How to use a pipe for _data ?

The pipe is a TInputPipeStream.

Using this does not work:
pipein was created and linked to a url.

var
pipein :TInputPipeStream; /
PipeBufferSize := $4000;
...
op_test_memory(pointer(InPipe),PipeBufferSize, Err);

The error is -129 which is a null pointer or other generic internal error.

Thanks.

Fre;D




-
Many thanks ;-)
--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Pipe-vs-Memory-buffer-tp5727435.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to split file of whitespace separated numbers?

2017-01-01 Thread greim

Hallo Bo,

You are right. If you want to keep the numbers of one line together, 
then READ doesn't work for you.


Markus






Am 31.12.2016 um 12:18 schrieb Bo Berglund:

On Sat, 31 Dec 2016 11:27:53 +0100, greim
<gr...@schleibinger.com> wrote:


Hallo Bo,

please try the simple

READ(myfile, x);

as mentioned in my posting from 23.dec.
It works w/o any postprocessing.


I saw that but the problem is that there are varying number of items
on each line and a line is considered a record.
So I would anyway have to keep track of the lines.
With Read I guess it skips all whitespace including line endings and
this causes problems in identifying the content because of varying
number of items on each line.
The Readln approach followed by splitting in a stringlist is enough of
an improvement that I can use it.




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to split file of whitespace separated numbers?

2016-12-31 Thread greim

Hallo Bo,

please try the simple

READ(myfile, x);

as mentioned in my posting from 23.dec.
It works w/o any postprocessing.

Markus

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to split file of whitespace separated numbers?

2016-12-23 Thread greim

Hey Kids,

why so complicated?

Good old Niklaus Wirth has already everything done for you:
I have to cite one sentence on the last slide at his birthday colloquium:

"Reducing size and complexity is the triumph"

So READ is already quite clever, it doesn't care about whitespaces, 
carriage returns and linefeeds :



PROGRAM readline;

VAR a  : ARRAY[0..100] OF double;
infile : TEXT;
lauf, lauf2 : longint;

BEGIN
lauf := 0;
assign(infile, 'infile.txt');
reset(infile);
WHILE NOT(eof(infile)) DO

BEGIN
read(infile, a[lauf]);
inc(lauf);
END;

close(infile);

FOR lauf2 := 0 TO pred(lauf) DO

BEGIN
writeln('Index : ', lauf2, ' Value : ', a[lauf2]);
END;


END.


And here infile.txt:

 123.4   55.2 33.1 4
 12.1 1.1
1 2 3 4
333.888 444.555

Regards

Markus


















Am 23.12.2016 um 14:06 schrieb Sven Barth:

Am 23.12.2016 12:54 schrieb "Graeme Geldenhuys"
>:


On 2016-12-23 08:14, Bo Berglund wrote:
> Is there a quick way to split a string of whitespace separated values
> into the separate members?


That problem is perfectly suited for regular expressions. And a rather
simple one at than. The FPC's FCL packages include a regex unit too
which should suite your needs.


http://www.regex101.com/

http://www.regexplained.co.uk/

http://regex.info/
  Even the trial book (first chapter only) of "Mastering Regular
  Expressions" is invaluable for users new to regex. And will
  explain all you need to know to solve your problem.



Regular expressions usually have a higher overhead however (as you might
have noticed, Bo timed his code later on).
For example at work I changed a regular expression based parser for the
lines of a log file to a simpler one and the speedup was noticeable (I
don't have exact numbers anymore however).

Regards,
Sven



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Severe bug (?) dividing comp variables in 3.0.0

2016-06-29 Thread greim

Hi,

there seems to be a very strange effect with dividing comp variables in 
3.0.0:


Dividing a comp variable x by any number which is not 1 or x gives result 0.

Tested on a i386 machine.

It works fine with for example with fpc 2.6.4.
I know I can use int64 instead, but we have a lot of very old, but 
reliable, code around.


Example below.

Regards

Markus



--
PROGRAM compbug300;

VAR x1, x2 : comp;

(* Dividing 8 / 2 doesn't work with fpc 3.0.0
   but works for example with fpc 2.6.4
   Markus Greim / 29.jun.2016 *)

BEGIN

x1 := 8;
writeln('x1 : ',x1);
x2 := x1 / 2;
writeln('x2 = x1/2 should be 4 but is : ', x2);
x2 := x1 / 4;
writeln('x2 = x1/4 should be 2 but is : ', x2);
x2 := x1 / 8.0;
writeln('x2 = x1/8.0 should be 1 and is : ', x2);


END.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] DOS compiler wiki page: please review

2013-10-14 Thread greim

Am 06.10.2013 22:37, schrieb Nikolay Nikolov:

On 10/05/2013 03:07 PM, greim wrote:

Hi,

writing a 8086 version of fpc is not so strange as some may think!
There are still some 80186 processors around running in embedded
systems! These architecture is certified for some applications in
industrial and avionik controll.



So my wish list:
fpc for 80186, supporting the new extended addressing and writing the
header files for RTOS (see
http://www.beck-ipc.com/en/products/rtos/index.asp) incl. a FPU
emulation !

 From what I read from the links you posted, the extended addressing
seems to be just like the regular real mode, except that segments are
spaced not 16, but 256 bytes apart, is that correct?


As far as i personally understand, yes.


If that's the case,

it should be easy to support - it's just a matter of writing the RTL for
the new OS and using the appropriate linker.


RTOS is a pimped IBM/MS-DOS. So standard functions like file i/o etc. 
are identical. Most of the DOS programs are running also on RTOS.



 FPC for i8086 produces

object files in the standard ROMF file format, they just use the
extension .o, instead of .obj. Note that FPC currently only supports the
tiny, small and medium memory models. Compact, large and huge are
planned, but not started yet. But you can try writing an RTL for RTOS
with the current memory models. In principle, it shouldn't be any harder
than porting the compiler to any new OS, where the CPU is already
supported.


Maybe its enough to modify the linker for this special 80186, without 
touching the 8086 compiler?
This was not possible for the Borland compiler, because there are no 
.obj files.


 And when I implement the compact/large/huge memory models,

the RTOS RTL will have to be adapted to support them. Most likely, the
far heap manager (which doesn't exist yet) will have to be adapted to
support the different spacing between the segments. As for FPU
emulation, it is also on my TODO list :)


First of all i will try to run a small Hallo World on the RTOS 24 bit 
machine !


Thanks

Markus




Nikolay
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] DOS compiler wiki page: please review

2013-10-05 Thread greim

Hi,

writing a 8086 version of fpc is not so strange as some may think!
There are still some 80186 processors around running in embedded 
systems! These architecture is certified for some applications in 
industrial and avionik controll.


A good survey over most  #186 derivates you may find at:

http://www.cpushack.com/2013/01/12/the-intel-80186-gets-turbocharged-vautomation-turbo186/


For example

http://www.lantronix.com/device-networking/embedded-device-servers/dstni-lx_dstni-ex.html

or

http://www.lantronix.com/device-networking/embedded-device-servers/xchip.html

and used for example in this embedded computer:

http://www.beck-ipc.com/en/products/sc2x/index.asp

This processors are using an own OS called RTOS which is quite nice.


BUT
most of these prcessors are using an extended addressing for using more 
then 640 kByte, with more address lines. So old  8086 programms can 
only run if they are using only a small memory option. With RTOS also 
the header of the EXE files is slightly modified.

So Borland Pacal 7.01 programs can only runn after some ugly patching.
Frank v. Münchow-Pohl has written a small patch program which is 
decribed here:

http://forum.beck-ipc.com/viewtopic.php?f=7t=824

Until 3 years ago the AMD 186 was still available, which have been real 
80186, but this processor is not produced anymore as far as i know.


So running Pascal programs on these kind of systems is not realy 
possible anymore. The only option afaik is using teh Paradigm C++

compiler:
http://www.devtools.com/pcpp/compiler.htm
which is quite expensive, an as i was told not so reliable.


Here you will see a list of processirs they are supporting, so i think 
there is is still a market for the 80(1)86


http://www.devtools.com/pcpp/processors.htm

So my wish list:
fpc for 80186, supporting the new extended addressing and writing the 
header files for RTOS (see 
http://www.beck-ipc.com/en/products/rtos/index.asp) incl. a FPU emulation !


Anny comment welcome.

Markus


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] [OT] Pascal compiler for embedded platforms

2013-04-28 Thread greim

Hi,

http://www.astrobe.com/default.htm

Oberon on ARM.

I think its worth to try it!

Markus Greim


Am 19.03.2013 08:46, schrieb Martin Schreiber:

On Tuesday 19 March 2013 08:11:49 Justin Smyth wrote:

Thanks, i am waiting to hear back regarding some suggest changes that were
suggest in the debugging section that Michael Ring was working on a while
ago, i want to write some code in lazarus for my ARM Cortex M3 and debug it
in lazarus ( via gdb using gdb from openOCD) so i can see whats going on ,
just as a start because its going to take me a while to get my application
running etc.


Just in case you don't know, MSEide+MSEgui is an alternative to Lazarus
especially made with development of embedded projects in mind:
http://sourceforge.net/projects/mseide-msegui/

Martin
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Job offer East of Munich / Stellenangebot Landkreis Mühldorf Oberbayern

2012-04-19 Thread greim

Hi Admin, i hope its not forbidden here, otherwise please delete this mail.


Hi all,

we are a 9 person company looking for
a hardware-near software engineer or programmer
or a
software-near electronic designer.

for embedded systems and HTML based user interfaces.

We are developing and producing material testing systems.

Most of our firmware is PASCAL, thats the reason why we are searching 
here. But also Perl and a little bit C as well as Assembler.

Maybe Erlang and Python as well as Forth in the future...

More infos about our company at:

http://www.schleibinger.com

We are located in a small village in the very green hart of Upper-Bavaria.

If you are interested please write an e-mail to me:
greim(a)schleibinger.com

Kind Regards

Markus Greim

Schleibinger Geräte
Teubert u. Greim GmbH
Gewerbestrasse 4
84428 Buchbach
Germany

http://www.schleibinger.com


Court having jurisdiction:
Amtsgericht Traunstein HRB 9646
CEO:
Dipl.-Ing. (FH) Oliver Teubert
Dipl.-Ing. (Univ.) Markus Greim
VAT-ID: DE 174 175 046
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Prof. Wirth speaking on Oberon day

2011-06-30 Thread greim
Some asked my to place a link to the Oberon day videos recorded last 
month in Zürich.


For example Professor Wirth was there presenting its original 25 years 
old still running CERES-3 computer.


Also there have been very intersting discussions.


http://www.multimedia.ethz.ch/conferences/2011/oberon

Another private video is there:

http://www.google.de/url?sa=tsource=webcd=4ved=0CDUQtwIwAwurl=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DHoZuzE7Lq5Eei=LVAMTvHlL8nMtAaK7JjWDgusg=AFQjCNH8IqQ6XmTRf1xgEDO0MhLb0zNzKQsig2=BTEC0ZPEueDm7FVacnw8Pg

Regards

Markus Greim
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Oberon Day 2011, N. Wirt speaking!

2011-05-14 Thread greim

Jeppe,


Do you know if the talks there will be recorded? Could be nice :)


i don't know, i am not part of the organizing committee, but i will post 
any link  here.


Markus
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] (Unix) serial port handling

2011-03-08 Thread greim

Hi Mark,


Can anybody say whether there is a good reason that serial.pp lacks a
function to read the CD signal?


i would recommend the synaser library, more sophisticated then the serial.pp

http://www.ararat.cz/synapse/doku.php/download

there is a function getCarrier, i guess this is what you need.

If you are working on a ARM system you have to modify some lines in 
synaser. Please check my previous messages.



Is SerFlush, which calls fpfsync, intended to discard input data, output
data or both?


don't know in serial.pp

In synaser AFAIK on Linux only the transmit buffers,  on Windows RX and TX



Mit freundlichen Grüßen

Markus Greim

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Name of the programming language used in/with FPC

2011-02-16 Thread greim

I suggest to ask first

Professor Niklaus Wirth

Regards

Markus Greim
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Synaser on ARM

2011-02-15 Thread greim

Hi Nataraj


Are you using Angstrom  tool chain on Gumstix Overo? Is it uclibc based?


glibc AFAIK..



I do have my share of woes on Codesourcery TC for fpc.

... sorry i am not sure if i had understand your comment right i fear..
I was using the libs found at free-electrons (see last mail ).

Regards

Markus

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Synaser on ARM

2011-02-14 Thread greim

Hi a short howto for all trying to use the serial port on ARM Linux

After fighting several hours i was able to cross-compile for ARM (OMAP 3 
Gumstix Overo)

Most helpful (but not totally right for the OMAP i think) was:
http://www.eilers.net/index.php?option=com_contentview=articleid=78Itemid=55
but some hints why and not only how would be fantastic

I was trying to compile a program for the serial port using the fantastic
synaser.pas
from Lukas Gebauer
http://www.ararat.cz/synapse/doku.php/download

unfortunately the linker always reported an error.

After several hours more i found a hint at

http://www.turbocontrol.com/simpleserial.htm
from Paul Brenemann

removing the
USE synafpc.pas
from synaser.pas (is not used at all in the Linux version)

In termios.inc Baud symbols over 460800 are not defined for
target cpuarm
,
so this must also adopted in the synaser.pas.

Now it is linking and running, great!

Regards

Markus Greim
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ARM crosscompiler again

2009-07-21 Thread greim
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hallo Henry,


 i just tried to compile a cross compiler
 linux 386 to linux arm
 (Suse 11.1 to a SSV DIL Net PC / 9200 Atmel AT91RM9200)

 I downloades the latest :
 .
 Download Daily Source Snapshot of the Fixes Tree
 Entire fpc sources archive of the fixes branch: fpc.zip (24 MB)
 from the website
 ..

 Also... and there i am not sure:
 Package Binary
 GNU Binutilsarm-binutils-2.16-1.i386.rpm
 and install it.

 Then i started the compiler (as root ???) with :
 make clean all CPU_TARGET=arm OS_TARGET=linux
 BINUTILSPREFIX=/usr/arm/bin/arm-unknown-linux-gnu

 The compiler (2.2.4) was running some minutes.
 But no ppcarm there afterwards.
 Any hint???

so thanks i am some steps further

i now installed the arm binutils from the Suse distribution
ist version 2.19 instead of 2.16 and installed in

/opt/cross/arm-linux/bin/

by Yast

So i now mad a call:

make all CPU_TARGET=arm OS_TARGET=linux
BINUTILSPREFIX=/opt/cross/arm-linux/bin/

an voila it compiles... and ppcrossarm was in ./compiler
fantastic.

Then i did a

make install CPU_TARGET=arm OS_TARGET=linux
BINUTILSPREFIX=/opt/cross/arm-linux/bin/

and now there are some files in
/usr/bin

looks fine!

But now i did a
ppcrossarm -B hallo.pas

The compiler seems to run, and making the s-file, but assembling the
s-file failed, with more then 20 error messages. like

makuslinux3:/home/markus/arm # ppcrossarm -B -Aas hallo.pas
Free Pascal Compiler version 2.3.1 [2009/07/21] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for ARM
Compiling hallo.pas
Assembling hallo
hallo.s: Assembler messages:
hallo.s:11: Warning: .type pseudo-op used outside of .def/.endef ignored.
hallo.s:11: Error: junk at end of line, first unrecognized character is `P'
hallo.s:14: Warning: .type pseudo-op used outside of .def/.endef ignored.
hallo.s:14: Error: junk at end of line, first unrecognized character is `m'
hallo.s:16: Error: too many memory references for `mov'
hallo.s:17: Error: no such instruction: `stmfd r13!,{r4,r11,r12,r14,r15}'
hallo.s:18: Error: too many memory references for `sub'
hallo.s:19: Error: too many memory references for `sub'
hallo.s:20: Error: no such instruction: `bl FPC_INITIALIZEUNITS'
hallo.s:21: Error: no such instruction: `bl fpc_get_output'
hallo.s:22: Error: too many memory references for `mov'
hallo.s:23: Error: too many memory references for `mov'
hallo.s:24: Error: no such instruction: `ldr r2,.Lj9'
hallo.s:25: Error: expecting operand after ','; got nothing
hallo.s:26: Error: no such instruction: `bl fpc_write_text_shortstr'
hallo.s:27: Error: no such instruction: `bl FPC_IOCHECK'
hallo.s:28: Error: too many memory references for `mov'
hallo.s:29: Error: no such instruction: `bl fpc_writeln_end'
hallo.s:30: Error: no such instruction: `bl FPC_IOCHECK'
hallo.s:31: Error: no such ins
etc.

any further idea..???

Thanks!

Markus Greim



 
 If you haven't done a make install, then the compiler should be in
 ./compiler/.
 
 Henry

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkpljGYACgkQWVkhSqgWKAJJkgCgrSrZF2UPXAfWzxvUhq/isJaL
3vUAoLn57wjZRAE5EUh8fPsDfCmDZbnc
=bJeb
-END PGP SIGNATURE-
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ARM crosscompiler again

2009-07-21 Thread greim
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Carsten et. al.

thanks for your help. I think i am to stupid to set the right paths and
links. Maybe Suse is a little bit strange here.

Finally i copied the file Carsten has provided
at
http://www.freepascal.dk/
 and it compiles...
My first Hello World on the ARM is also ok.

Thanks a lot

Markus Greim


Carsten Bager schrieb:
 When I build the compiler i use this
 
 
 - Linux 
 #!/bin/sh
 export PATH=$PATH:/pp/bin
 export PATH=$PATH:/Fpc/ArmBin/218
 make clean all OS_TARGET=linux CPU_TARGET=arm PP=/pp/bin/fpc 
 BINUTILSPREFIX=arm-linux-
 
 Windows 
 PATH = c:\fpc\2.2.2\bin\i386-win32;c:\pp\bin\Arm
 make clean all OS_TARGET=linux CPU_TARGET=arm BINUTILSPREFIX=arm-linux- 
 
 
 
 This works fine with the 222 and 223 version
 
 Regards
 
 Carsten
 
 Med venlig hilsen
 Carsten Bager
 
 BEAS A/S
 Brørupvænget 10
 DK-7650 Bøvlingbjerg
 Tlf. : +45 9788 5222 Fax : +45 9788 5434
 www.beas.dk
 
 
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal
 


- --



Mit freundlichen Grüßen

Markus Greim

Schleibinger Geräte
Teubert u. Greim GmbH
Gewerbestrasse 4
84428 Buchbach
Germany

Tel. +49 8086 94010
Fax. +49 8086 94014
Mobil +49 172 8 999 196
http://www.schleibinger.com


Amtsgericht Traunstein HRB 9646
Geschäftsführer:
Dipl.-Ing. (FH) Oliver Teubert
Dipl.-Ing. (Univ.) Markus Greim
UST-ID. DE 174 175 046
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkpl0fwACgkQWVkhSqgWKAImWACgi/8MAmTRr7bMipMvN9rhWIKL
OPgAn1sKOF05hGygMog8FJx2DwCps1l+
=3tZm
-END PGP SIGNATURE-
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] ARM crosscompiler again

2009-07-20 Thread greim
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

i just tried to compile a cross compiler
linux 386 to linux arm
(Suse 11.1 to a SSV DIL Net PC / 9200 Atmel AT91RM9200)

I downloades the latest :
.
Download Daily Source Snapshot of the Fixes Tree
Entire fpc sources archive of the fixes branch: fpc.zip (24 MB)
from the website
..

Also... and there i am not sure:
Package Binary  
GNU Binutilsarm-binutils-2.16-1.i386.rpm
and install it.

Then i started the compiler (as root ???) with :
make clean all CPU_TARGET=arm OS_TARGET=linux
BINUTILSPREFIX=/usr/arm/bin/arm-unknown-linux-gnu

The compiler (2.2.4) was running some minutes.
But no ppcarm there afterwards.
Any hint???

i know that this is not a new question , but all answers in the last 4
years seem to be a little bit different

Or is there a running precompiled package anywhere or a rpm (oh yeah i
know i am a softiii...)

Mit freundlichen Grüßen

Markus Greim

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkpk4zkACgkQWVkhSqgWKAKikgCgsZxeZ+P/DMXU+wYoIZoJbbkZ
O1QAnAjEi2T8gQLYorRPbjjUJl/WCmA+
=Q9PB
-END PGP SIGNATURE-
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] The reason why linus torvalds hate-pascal

2008-04-20 Thread greim

Lets hear what the old fathers told us...
when Linus Torvalds was still running around the Christmas tree



Niklaus Wirth,

Algorithms and Data Structures 1985 (Oberon version: August 2004, afaik 
first published 1975 in German)


(Regarding pointers and goto statements..)
...This phenomenon of power and flexibility being intimately coupled 
with the danger of misuse is well known in programming, and it 
particularly recalls the GOTO statement. Indeed, if the analogy between 
program structures and data structures is to be extended, the purely 
recursive data structure could well be placed at the level corresponding 
with the procedure, whereas the introduction of pointers is comparable 
to the use of GOTO statements. For, as the GOTO statement allows the 
construction of any kind of program pattern (including loops), so do 
pointers allow for the composition of any kind of data structure 
(including rings).



Kernighan , Ritchie, The C Programming Language 1978
page 62

C provides the infinitely-abusable goto statement, and labels to branch 
to. Formally the goto is never necessary and in practice it is almost 
always  easy to write code without it. We have not used goto in this book.
Nonetheless , we will suggest a few situations where goto's may find a 
place. The most common use is to abandon processing in some deeply 
nested structure, such as breaking out of two loops at once. The break 
statement cannot be used directly since it leaves only the innermost 
loop

.
Although we are not dogmatic about a matter, it does seem that goto 
statements should be used sparingly, if at all.



Mit freundlichen Grüßen

Markus Greim

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Why I?m choosing (Object) Pascal

2008-04-08 Thread greim




Linux works (I did the port myself) but is still a bit rough on the
deployment side, so they don't include it officially yet.
And if linux works, the other platforms should work also (I took care
of that during porting).


i know its more or less OT:
Windows for MORFIK development is not nice but we are living in a real 
world..so what,.but

does i need a Windows web server ? We are using here
Debian/ubuntu based web servers. Any chance to run the server part there ??


Mit freundlichen Grüßen

Markus Greim

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Graphics in Linux?

2005-10-16 Thread greim
I played this weekend a litte bit arround with grx. There is a graph 
unit for gpc.

After some hours, a kind of bgidemo seems to run in fpc/X-Windows.
Ther are still some problems drawing characters in several angles and 
drawing polygons, but all other things seems  (quiet fast!) to run.

Its still a hack, but if there is somebody intersted in i may publish it.
Theoretical it should alos work with WIN32 but i have not testet it yet.

Mit freundlichen Grüßen

Markus Greim

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal