Re: Can fortran clear the 3270 screen?

PeterH <[email protected]> Mon, 7 Jun 2010 16:38:51 -0700
Newsgroups gmane.comp.emulators.turnkey-mvs
Message-ID <[email protected]>
On Jun 7, 2010, at 3:52 PM, Rick Fochtman wrote:

> FORTRAN doesn't know anything about "screens" but a very simple  
> Assembler subroutine, callable from FORTRAN, can clear the screen  
> for you.

If you use an external subroutine, which you would separately  
compile, and all it contained was /DATA/, then it is possible to  
include anything in that subroutine as "data", even functional  
machine code.

As a TPUT is SVC 93, you would include what ever "orders" are  
required for a "clear screen" function, and then issue SVC 93.

Everything would be coded in the appropriate source, possibly decimal  
which was converted to hexadecimal by the compiler.

The MAIN would invoke the DATA control section as if it was a closed  
subroutine. MAIN cannot tell that the named subroutine is actually  
DATA, as it was compiled separately.

The "usual suspect" prefix and suffix instructions would be required,  
as with all assembly subroutines, ending in a BR 14, of course.

This is a "hole" in the FORT G and FORT H compilers which, AFAIK, has  
not been closed.

You could, for example, assemble the desired routine, and also name  
it the same as the /DATA/ section, but this is not a requirement, and  
relatively simple assembly-type routines may be made by hand coding  
them, as described, as a FORTRAN external DATA area.