[comp.sys.apollo] node in C or FTN

bonnetf@apo.esiee.fr (bonnet-franck) (05/24/91)

Here is my contribution to get the node id of an APOLLO,
at this time ( 10.3 - cc 6.8 - ftn 10.8) it seems to work.

--------------------- source program in C ------------------

#include <stdio.h>

std_$call asknode_$who();

main ()

{
  int   nodeid;
  short int nodecnt,i=1;                            

	asknode_$who(nodeid,i,nodecnt);
	printf("%x\n",nodeid);

}
---------------------- end ---------------------------------

--------------------- source program in FORTRAN ------------

      program  ask_node_id                                  

      integer*4 nodeid
      integer*2 nodecnt                            

      call asknode_$who(nodeid,int2(1),nodecnt)
      write(*,10)nodeid
10    format(z5)
      end

---------------------- end ---------------------------------

-------------------------------------------------------------------------------|
bonnetf@apo.esiee.fr                     |                                     |
Frank Bonnet                             | Surfing ...                         |
E.S.I.E.E                                |                                     |
BP99 93162 Noisy le Grand cedex.FRANCE.  | the rest is details !               |
Fax   : 33 1 45 92 66 99                 |                                     |
Voice : 33 1 45 92 66 17                 |                                     |
-------------------------------------------------------------------------------|