Recent

Author Topic: Need to port an old Pascal utility for use in Basic4android  (Read 3830 times)

moviesbymartin

  • Newbie
  • Posts: 2
Need to port an old Pascal utility for use in Basic4android
« on: January 07, 2013, 12:27:34 am »
Hello fellow Pascal lovers! I am a longtime Pascal aficionado and Delphi developer for all my professional life. I've been tinkering with Basic4android as of late and I need some advice on how to proceed with a project.

At my day job we have this ancient utility program that I'd love to port over to mobile using Basic4android. This utility has got some crazy home-brewed encryption code that uses a form of DES. It's pretty complicated and would probably take me the next 10 years to figure out how to do a direct port to Basic4android. After some Googling, I noticed that Lazarus can now target Android compatible Java bytecode.

So then I thought, hey, maybe I can compile this utility in Lazarus into some kind of package that my Basic4android app can consume. The utility was originally written in Borland Pascal so I don't think it'll be too hard to get it compiling in Lazarus. Ideally it would be great to have all the logic of the utility compiled into a single package with a nice function that my Basic4android app can call, then my Android app really just becomes a GUI interface to this package. You know, kind of like a DLL in Windows but I don't think that's how it works in the Java world.

Does anyone have any experience with a similar scenario? I appreciate any thoughts, comments or advice that anyone is willing to give. Thanks!

Blaazen

  • Hero Member
  • *****
  • Posts: 3029
  • POKE 54296,15
    • Eye-Candy Controls
Re: Need to port an old Pascal utility for use in Basic4android
« Reply #1 on: January 07, 2013, 01:19:12 am »
Welcome to Lazarus forum.

Lazarus is just a IDE/RAD for FreePascal Compiler. To compile old TurboPascal code in FPC, there is a directive:
Code: [Select]
{$mode TP}You can also read some instructions here: http://www.freepascal.org/port.var
Lazarus 2.1.0 r64546 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

moviesbymartin

  • Newbie
  • Posts: 2
Re: Need to port an old Pascal utility for use in Basic4android
« Reply #2 on: January 07, 2013, 04:58:12 am »
Whoops, sorry about that! I'll post my question over in the FreePascal Community message boards. Thanks for the information!

 

TinyPortal © 2005-2018