× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Walden,

> >I cannot write an HLL program that will modify the memory allocated by
> another program
>
> Sure you can. Just have 2 RPG programs. In program A define a character
> field that's 6 bytes long and pass it on a call to program B. In program
> B define that parm as 10 bytes and fill it with blanks. Where do you
> think the other 4 blanks are going to go? They'll write over whatever is
> in memory beyond the 6 bytes that belong to the field in program A. This
> _might_ be another field in program A, or it might be unused space.

That's true, although it's still within the same job.  And is it possible to
extend that into the program's executable code? Can you move data to a
procedure pointer?

> >I guess my question is, what are the system-enforced memory boundaries
> for a program?
>
> My understanding is that there aren't any. That is to say, IF you can
> get a pointer to a memory location you can modify it. Your normal
> everyday RPG program isn't going to be able to modify a memory space
> that isn't in it's own job. However, read a couple of chapters of leif's
> book and you'll see that with a little work you can modify just about
> anything.

Including OS400 itself?  Using just HLL programs?  Isn't Leif's book mostly
about MI?

I guess the trick is getting the pointer.

Peter Dow
Dow Software Services, Inc.
www.dowsoftware.com
909 793-9050 voice
909 793-4480 fax

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.8/114 - Release Date: 9/28/2005



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.