[comp.sys.mac.programmer] HyperCard - Ethernet access

jth90342@uxa.cso.uiuc.edu (02/20/89)

I am interested in using HyperCard for access of a UNIX based database over
Ethernet.  Because of technical reasons, UDP packets must be used.  If anyone 
has had any experience in a project like this, or has seen information on 
this, I would like to know more.           Thanx.    Jeff Huber - U of Illinois
                                                     jth90342@uxa.cso.uiuc.edu

phil@Apple.COM (Phil Ronzone) (02/22/89)

In article <227700005@uxa.cso.uiuc.edu> jth90342@uxa.cso.uiuc.edu writes:
>
>I am interested in using HyperCard for access of a UNIX based database over
>Ethernet.  Because of technical reasons, UDP packets must be used.  If anyone 
>has had any experience in a project like this, or has seen information on 
>this, I would like to know more.           Thanx.    Jeff Huber - U of Illinois
>                                                     jth90342@uxa.cso.uiuc.edu

Well, if you use A/UX, you can run HyperCard under it and write XCMDs/XFCNs
to do standard TCP/IP networking. We're doing a fair amount of direct UNIX
system call using code and it works quite nicely.

You can develop the code as standard UNIX programs, debug them, then wrap
them in a little glue, and voila!

The only medium slow part is that you have to do your own interface library
to the UNIX system calls. But, they are not hard. An example for the
UNIX read system call is shown below: This is in LSC 3.0.

/*****************************************************************************/
/*                                                                           */
/*  read() - The A/UX system call read.                                      */
/*                                                                           */
/*****************************************************************************/
long read(file,buffer,count)
                long    file;
                char   *buffer;
                long    count;
                {       
                asm
                    {
                            move.l  count,-(sp)  ; Push argument
                            move.l  buffer,-(sp) ; Push argument
                            move.l  file,-(sp)   ; Push argument
                            move.l  #0,-(sp)     ; Dummy return address
                            move.l  #READ,d0     ; Setup system call number
                            trap    #0           ; Do the system call
                            bcc     @noerr       ; Branch if no error
                            move.l  d0,errno     ; Save the error number
                            move.l  #-1,d0       ; Always return -1 for an error
                    noerr:  add.l   #16,sp       ; Pop the arguments
                    }
                }

Otherwise, you'll have to get a Mac OS package that supports TCP/IP and UDP
and write an XCMD for it.

+------------------------+-----------------------+----------------------------+
| Philip K. Ronzone      | A/UX System Architect | APPLELINK: RONZONE1        |
| Apple Computer MS 27AJ +-----------------------+----------------------------+
| 10500 N. DeAnza Blvd.  | Computer viruses don't cause security problems,    |
| Cupertino CA 95014     | computer programmers do ...                        |
+------------------------+----------------------------------------------------+
|{amdahl,decwrl,sun,voder,nsc,mtxinu,dual,unisoft}!apple!phil                 |
+-----------------------------------------------------------------------------+