JX(1)

NAME
jx - 630 MTG execution and stdio interpreter

SYNOPSIS
jx [ -d ] [ -p ] [ -z ] [ -f ] [ -Z n ] [ -n ] file
[ command line arguments]

DESCRIPTION
The jx utility downloads the program in file to the 630 MTG and runs it there, simulating most of the standard I/O library functions. This gives application programs downloaded into the 630 MTG the ability to perform operations such as file I/O to files resident on the host computer, using the same interface as programs written for execution on the host computer.

The jx utility calls dmdld to do the download into the terminal. Therefore, the -d, -p, -z, -f, -Z, and -n options are available for use with jx. See the dmdld(1) manual page for information on these options.

Stdin directed to the host portion of jx, either through the jx command line or with the popen function, is properly redirected. Note that input from the 630 MTG keyboard is not translated to stdin to the host portion of jx. Rather, programs wishing to read from the keyboard should use kbdchar(3R).

Stdout and stderr, written to by the below library functions, will be stored in a buffer during execution. After the terminal program has been rebooted, stdout and stdin will be redirected to the terminal.

Programs intended for use by jx should include <dmd.h> and <dmdio.h> and call exit(3R) upon termination. Exit() returns control to the shell and causes a reboot of the default terminal emulator.

What follows is a list of stdio library functions available under jx. These functions are called from an application downloaded into the 630 MTG by jx. The jx library routines in the terminal then translate the call into a message which is sent to the host portion of jx for processing.

getc | getchar | fgets | fflush
putc | putchar | puts | fputs
fopen | freopen | fclose | access
popen | pclose | fread | fwrite
printf | Printf | fprintf | Fprintf

The functions fprintf and printf are stripped down versions of those on UNIX. The functions that start with an upper case letter are identical to those on UNIX. See printf(3L) for more details.

FILES
$DMD/include/dmdio.h
$DMD/lib/sysint		host portion of jx after download is complete
$HOME/.jxout			saved standard output
$HOME/.jxerr			saved standard diagnostic output

SEE ALSO
dmdld(1), exit(3R), kbdchar(3R), printf(3L).
access(2), fopen(3S), fread(3S), getc(3S), popen(3S), printf(3S), putc(3S), puts(3S) in the UNIX System V Programmer's Reference Manual.

WARNING

Because 630 MTG keyboard data is not sent to the stdin of the host component of jx, applications running under jx which read from the stdin will hang if their stdin is not redirected.

The stdin can be redirected either from the command line or by function calls inside the application process running on the 630 MTG terminal.

BUGS
Jx does not work when su'ed to another user.

Jx does not work in the nonlayers environment.

Jx does not work with application cached with A_SHARED, A_BSS or A_DATA.

Stderr is buffered. Use fflush (stderr) if this is a problem.

getc(), getchar(), putc(), and putchar() are not macros as described in getc(3S) and putc(3S).

The fopen() routine does not support the following modes: r+, w+, a+.