View previous topic :: View next topic |
Author |
Message |
cyberuser Beginner
Joined: 15 Oct 2005 Posts: 29 Topics: 12
|
Posted: Sat May 07, 2011 12:04 pm Post subject: rexx and assembler |
|
|
i have a small assembler source code to clean the screen.
normally i call this program before to start my rexx procedures.
is there any way during the compilation of the rexx to include this program ?
any other alternative to acquire this result (clear screen+ rexx procedure) is welcome..... |
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 699 Topics: 63 Location: USA
|
|
Back to top |
|
|
cyberuser Beginner
Joined: 15 Oct 2005 Posts: 29 Topics: 12
|
Posted: Sat May 07, 2011 5:33 pm Post subject: |
|
|
ok i understand... and that's the way i've being using since i've wrote both programs...
but the question is... is there any way to pack (compile) both together ? |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Sat May 07, 2011 6:01 pm Post subject: |
|
|
for cobol and assembler, compiling only creates a object which must be link-edited,
to create an executable.
don't know about compiled rexx.
but you can't compile them together, you can only
(don't know if you can)
link-edit - binder process - them together.
so, you have a couple of search terms that you can use. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Mon May 09, 2011 12:35 am Post subject: |
|
|
It has been about 15 years since I dealt with rexx and assembler, but you might look into rexx functions or maybe function packages. I know that you can use non-rexx programs as rexx functions (my realname function, or Rob Scott's stem related functions) but I too do not not know about the linking aspects. I suspect that there is a way to allow your program to call an assembler program as a function linked into in the same load module (even if only linking the csect for the function as an alias entry of the load module - an admittedly ugly idea but workable with some planning for name collisions). _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
|
asr2 Beginner
Joined: 25 Jun 2011 Posts: 26 Topics: 4 Location: Germany
|
Posted: Fri Jul 08, 2011 12:18 am Post subject: |
|
|
The usual way of invoking an Assembler program (or indeed a program written in any programming language) is to use LINK, LINKMVS or LINKPGM. In the reverse direction, a "conventional" program (Assembler, COBOL, etc.) has many ways of directly invoking REXX services (including a REXX exec).
All these methods are described with examples in my book: Practical Usage of TSO REXX.
Regards
Tony |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sun Jul 10, 2011 12:05 am Post subject: |
|
|
The original question though was having the assembler and Rexx code in the same load module. That is probably not possible if the load module only has 1 entry point (the rexx code stub). It would be possible to link the assembler code in and create an alternate entry point (an alias) and then have the Rexx code call that command as usual via any method. The Rexx code would not know it is calling its own load module, but it would not care. Alternate entry points are sometimes frowned upon (see my previous post) because they used to get lost during ISPF copies and they can cause problems with naming collisions if you use an alias name multiple times but with some planning that can be avoided. (I think the ISPF copy problem was fixed but I'm not sure). _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
|
asr2 Beginner
Joined: 25 Jun 2011 Posts: 26 Topics: 4 Location: Germany
|
Posted: Sun Jul 10, 2011 2:56 am Post subject: |
|
|
I do not know why, in this case, you would want to combine REXX and Assembler in a single load module.
On the other hand, I have written Assembler programs that include internal REXX code that is invoked with a REXX service. This allows, for example, REXX services, such as PARSE, to be used. When appropriate, this greatly simplifies the Assembler coding. |
|
Back to top |
|
|
|
|