osfree-project / osfree

osFree - open source Operating System/2 clone, usermode parts.
http://osfree.org
116 stars 12 forks source link

Finish ReginaREXX port as IBM Classic REXX replacement #79

Open prokushev opened 2 years ago

prokushev commented 2 years ago

Regina REXX is mostly working under OS/2. Originally, it had only 32-bit API functions available. Recently, we mostly created proper 16-bit wrappers for 32-bit API's, plus 32-bit wrappers for 16-bit subcommand handlers (which are created by CMD.EXE and 16-bit WPS functions). So, we now have mostly working 16-bit functions in CMD.EXE. Also, sharing the REXX interpreter between different processes is now working too. (originally, we were able to run a single REXX program at the same time, only. Now this problem is fixed too.). We created our versions of REXX.DLL and REXXAPI.DLL for that purpose, and they are mostly working.

Also, our current REXX.DLL and REXXAPI.DLL can be used as a "REXX switcher" for different REXX interpreters. This works with renaming original interpreters to e.g.,

REXO.DLL and REXOAPI.DLL for Object REXX

and

REXC.DLL and REXCAPI.DLL for Classic REXX

with renmodul.exe utility form Hobbes. Then we'll be able to switch REXX interpreters with setting environment variables. If we set

set REXX_DLL=REGINA set REXXAPI_DLL=REGINA

then we'll have REGINA.DLL as our REXX interpreter. If we set

set REXX_DLL=REXC set REXXAPI_DLL=REXCAPI

then we'll have Classic REXX interpreter loaded. So, we'll use REXC.DLL as our REXX.DLL and REXCAPI.DLL instead of REXXAPI.DLL. The same with Object REXX. It is possible to switch REXX interpreters on the fly this way, so. I'm able to have three different REXX interpreters in three different CMD.EXE windows.

Though, currently, there are still some problems remained, which prevent to use Regina REXX as a drop-in replacement for IBM Classic REXX

1) There are some minor syntax incompatibilities

2) Regina REXX has macrospace functions missing (actually, only dummy functions are present)

3) REXX queues implementation is a bit different from IBM's REXX queues. There are several types of queues (internal and external). IBM REXX interpreter has queues implemented in REXXAPI.DLL externally to the REXX interpreter. For REXX queues to behave IBM's way, we need to clone IBM's way of working with REXX queues in REXXAPI.DLL.

Currently, implementation of REXX queues and macrospace functions the IBM way is in progress. Missing these parts will prevent us from running REXX extensions like VXREXX and programs written on VXREXX (like Arca Noae package manager, for example). So, we need this for sure for having Regina REXX as a drop-in replacement of IBM's Classic REXX.

So, the current task is to finish Regina as a drop-in replacement