Recent

Author Topic: Free Pascal console programs on Android are easy  (Read 38378 times)

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #30 on: April 28, 2017, 02:25:53 pm »
If so, does 2.6.4 or 3.0.0 or 3.0.2 correct this problem?

I just made and posted two more zips on TurboControl.com for testing:
HelloWorld-fpc-2.6.4.arm-linux-042817.zip
HelloWorld-fpc-2.6.2.arm-linux-042817.zip

I previously had:
HelloWorld-fpc-3.0.2.arm-linux-041917.zip
HelloWorld-fpc-2.6.0.arm-linux-052412.zip
HelloWorld-fpc-2.2.2.arm-linux.tar.gz

The simple instructions at the bottom of http://turbocontrol.com/gnuroot.htm make testing easy.

When I run ppcarm from 2.6.2 and 2.6.0 I get: Illegal instruction

When I run ppcarm from 3.0.2 and 2.6.4 and 2.2.2 I get: Segmentation fault
Increasing stack size (ulimit -s 65536) doesn't change the last three errors.
« Last Edit: April 29, 2017, 03:12:49 am by Paul Breneman »
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #31 on: May 19, 2017, 02:59:57 am »
I finally got back to this...

I just installed the full fpc on Debian Jessie on GNUroot (chroot) on ARM and 2.6.4 was installed.  A lot of fp* programs are installed in /usr/bin/ so I tried running those.  Most get Segmentation fault, one gets Illegal instruction, and two (fpdoc & fppkg) run OK!  Any ideas on why those two run?  I'll have to look at the dependencies.
Regards,
Paul Breneman
www.ControlPascal.com

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Free Pascal console programs on Android are easy
« Reply #32 on: May 19, 2017, 11:12:56 am »
fpdoc maybe doesn't use floating  point? The compiler does for literals.

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #33 on: May 19, 2017, 02:41:46 pm »
fpdoc maybe doesn't use floating  point? The compiler does for literals.

I didn't try to compile any program.  I just ran the programs by themselves.  fpdoc and fppkg both run and display their options.
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #34 on: May 24, 2017, 05:32:19 am »
It seems that fpc has had problems before with proot:
https://github.com/proot-me/PRoot/issues/74

It also seems that development in proot and GNUroot has slowed or stopped?  Sadly things are no longer easy on Android.   :(
Please share if you know of something easy for engineers who are not full-time programmers!

Console and fpGUI programs are still easy on inexpensive Windows tablets such as this:  http://www.microcenter.com/product/439773/TW700_Tablet_-_Black  :)
Control Terminal works on my TW700: http://ctrlterm.com/
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #35 on: May 29, 2017, 05:27:53 am »
I've had PascalGUI for a while which I need to check out more:
https://play.google.com/store/apps/details?id=com.n0n3m4.droidpascal

I'm also checking out the Limbo PC Emulator QEMU ARM x86:
https://play.google.com/store/apps/details?id=fr.energycube.android.app.com.limbo.emu.main.armv7

I'm also testing things here a little: http://wiki.freepascal.org/ideU

There must be some way to run simple Free Pascal & FreeVision console programs on Android!   :)
« Last Edit: May 29, 2017, 05:29:24 am by Paul Breneman »
Regards,
Paul Breneman
www.ControlPascal.com

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Free Pascal console programs on Android are easy
« Reply #36 on: May 29, 2017, 01:35:25 pm »
As a start, you are right, but in a point in time, it should be possible to create more complex Application in Android for Android. With no need to cross-compile and the ability to debug on the System itself.
My hope is that one time there is not only Laz4Android but also LazOnAndroid.

[Edit]
BTW: There are two more things to check out:
FlashPascal: http://flashpascal.sourceforge.net/

.. at the other, i can't remember the name, but it was a full Studio to compile Pascal to HTML-Websites..   




 
« Last Edit: May 29, 2017, 01:49:00 pm by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #37 on: May 29, 2017, 04:50:46 pm »
As a start, you are right, but in a point in time, it should be possible to create more complex Application in Android for Android. With no need to cross-compile and the ability to debug on the System itself.
My hope is that one time there is not only Laz4Android but also LazOnAndroid.

One of my favorite technical authors is Rob Landley http://www.landley.net/ who has a lot of interesting stuff:
https://www.patreon.com/posts/mkroot-is-almost-9607891 - has a great video at the bottom
http://se-instruments.com/ - real engineering where he works

As you (and Rob) mention, it probably won't be very long before we're developing Android apps on Android!  I'm wanting to start this now with simple console apps.

BTW: There are two more things to check out:
FlashPascal: http://flashpascal.sourceforge.net/

.. at the other, i can't remember the name, but it was a full Studio to compile Pascal to HTML-Websites..

I'm looking for simple console programs!  Those are other things but thanks for sharing...
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #38 on: May 30, 2017, 04:34:07 pm »
Does anyone here use PascalGUI?

I've seen it mentioned a few times, but is there anywhere that is better to discuss it than in this message thread?

I've been doing some research on writing (C or Java or Python or Pascal) console programs directly on Android and some recent links are below.

https://en.wikipedia.org/wiki/Self-hosting
http://landley.net/aboriginal/about.html#selfhost
https://en.wikibooks.org/wiki/Android/Terminal_IDE - first section is nice
« Last Edit: June 01, 2017, 12:53:49 pm by Paul Breneman »
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #39 on: May 31, 2017, 11:16:23 pm »
Am I the only person left who cares about simple things like console programs on Android?  :-\

I do need to find some way to keep busy since retiring (there are a lot of us old Delphi programmers).  :)

So I added the 4th paragraph (5th if you count the TOC) here today: http://controlpascal.com/tutorial.htm
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Free Pascal console programs on Android are easy
« Reply #40 on: June 03, 2017, 01:24:15 pm »
I'm not the smartest cookie, but I refuse to give up and quit!  :)

http://controlpascal.com/self-hosted.htm has link to new wiki page!
Regards,
Paul Breneman
www.ControlPascal.com

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Free Pascal console programs on Android are easy
« Reply #41 on: June 04, 2017, 09:11:31 am »
BTW: There are two more things to check out:
FlashPascal: http://flashpascal.sourceforge.net/

.. at the other, i can't remember the name, but it was a full Studio to compile Pascal to HTML-Websites..

I'm looking for simple console programs!  Those are other things but thanks for sharing...
You're probably right, they are defintily not simple, but as I can remember they both do console-programs.

BTW I am interested in console-programs simple and not so simple
e.G:
Code: Pascal  [Select][+][-]
  1. Unit Unt_iopcc;{$mode delphi}{$H+}Interface Procedure Main;Implementation{$define WaitAtEnd}
  2. Function X(B:Boolean;I1,I2:Integer):Integer;Begin If B Then Result:=I1 Else Result
  3. :=I2;End;Var A:Array[0..999]Of Integer;Const B=39;C:Array[0..3]Of Integer=(0,-1,B
  4. -1,-1);D:Array[0..3]Of Integer=(1,-B,-1,B);Procedure Main;Const E:Integer=22;Var
  5. F:Integer=0;G:Array[0..999]Of Integer;H:Array[0..3]Of Integer;I:Integer=0;J:Integer
  6. =0;K,L,M,N,O,P:Integer;Q:Integer=0;Begin Randomize;A[0]:=2;O:=B*E-1;L:=O;A[O]:=24
  7. ;While(Q<>0)Or(J>=I)Do Begin N:=O;O:=L;K:=A[N];P:=0;Q:=0;While(P<4)Do Begin L:=D[
  8. P]+N;If((L>=0)And(L<B*E)And(C[P]<>(L Mod B))And((K And 16)<>(A[L]And 16)))Then Begin
  9. H[Q]:=P;Q:=Q+1;End;P:=P+1;End;If(Q<>0)Then Begin P:=H[Random(Q)];L:=D[P]+N;M:=A[L
  10. ];M:=M Or 16;A[N]:=K Or 1 Shl P;A[L]:=M Or(1 Shl((P+2)Mod 4));G[J]:=L;J:=J+1;End
  11. Else Begin L:=X(J>I,G[I],L);I:=I+1;End;End;Write('  ');P:=B-1;While(P>0)Do Begin
  12. Write(' ');P:=P-1;Write('_');End;While(E>0)Do Begin Writeln;E:=E-1;Write('|');L:=
  13. B;While(L>0)Do Begin L:=L-1;Write(Copy('_ ',((A[F]Div 8)Mod 2)+1,1));F:=F+1;Write
  14. (Copy('| ',((A[F]Div 4)Mod 2)+1,1));End;End;{$IFDEF WaitAtEnd}Readln;{$ENDIF}End;
  15. End.  
  16.  
... would be my item for an IOPCC if there where any ...
the unobfuscated code is in my GidHub - Repo soon ([edit]diverses[/edit] section)
https://github.com/joecare99/Public/tree/master/Fun


« Last Edit: June 19, 2017, 01:02:55 pm by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Free Pascal console programs on Android are easy
« Reply #42 on: June 08, 2017, 02:25:09 pm »
@Paul Breneman:
I think, you are right, since nobody seems to give a damn ...
By the way the Main prog looks like:
Code: Pascal  [Select][+][-]
  1. Program IOPCC;
  2. {$Apptype Console}
  3. uses unt_iopcc;
  4. begin main end.
but that should be obvious ...
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Free Pascal console programs on Android are easy
« Reply #43 on: June 18, 2017, 01:08:17 am »
Am I the only person left who cares about simple things like console programs on Android?  :-\

I do need to find some way to keep busy since retiring (there are a lot of us old Delphi programmers).  :)

So I added the 4th paragraph (5th if you count the TOC) here today: http://controlpascal.com/tutorial.htm
I tried an alternative approach and got at least some attention (but no reaction from your side either)
see:
http://forum.lazarus.freepascal.org/index.php/topic,37229.msg249603.html#msg249603
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Free Pascal console programs on Android are easy
« Reply #44 on: June 18, 2017, 02:21:50 am »
Well,

LAMW has "indirect" app console support.

There is a "New Project" entry: "Android Console App [Lamw]".

A demo is here:

https://github.com/jmpessoa/lazandroidmodulewizard/tree/master/demos/Console/LamwConsoleAppDemo1

and about "indirect" support you can read the "readme_How_To_Run_Real_Device" in project folder...

https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/demos/Console/LamwConsoleAppDemo1/readme_How_To_Run_Real_Device.txt
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018