glob: proc; /* This program draws the globe from any viewpoint. I have copied the CTSS incarnation of the program. */ dcl (i, j, k, l, m, n) fixed bin, nelts fixed bin, /* gui only lets me display 4000 lines */ toomany fixed bin int static init (1000), ap ptr, al fixed bin, bchr char (al) unaligned based (ap), ec fixed bin, world_ptr ptr, temp_ptr ptr; dcl (fa1, fa2, fa3, fa4, fa5, fa6, fa7, fa8, fa9) float bin, (cosa, cosp, cost, sina, sint, sinp) float bin, (x0, y0, z0) float bin, z float bin, exit fixed bin init (0), mode fixed bin init (1), line fixed bin init (0), (ix, iy) fixed bin, (delx, dely) fixed bin, (xprev, yprev) fixed bin, icentr fixed bin init (0), jcentr fixed bin init (0), erase fixed bin init (0), TINY fixed bin init (2), rad float bin, radus float bin, factor float bin init (1.745329e-2), /* pi / 180 */ frac float bin init (0.0e0); dcl alpha float bin init (0.0e0), phi float bin init (42.36058333e0), /* Latitude of IPC 42-21-38.1 N */ theta float bin init (288.9063333e0), /* Longitude of IPC 71-05-35.4 W */ irad fixed bin, radius float bin init (1.0e0); dcl gui_$ginit_ entry, gui_$gcirc_ entry (fixed bin, fixed bin), gui_$gvec_ entry (fixed bin, fixed bin, fixed bin), gui_$gsps_ entry (fixed bin, fixed bin, fixed bin), gui_$gdisp_ entry, gui_$grmv_ entry, gui_$geras_ entry; dcl 1 worldbin based (world_ptr) aligned, 2 input (0:6048) fixed bin; dcl temp fixed bin; dcl 1 component based (temp_ptr) aligned, 2 x fixed bin (11) unal, 2 y fixed bin (11) unal, 2 z fixed bin (11) unal; dcl (addr, sin, cos, abs, null) builtin; dcl name condition; dcl sysin file; dcl cu_$arg_ptr ext entry (fixed bin, ptr, fixed bin, fixed bin), hcs_$make_ptr entry (ptr, char (*) aligned, char (*) aligned, ptr, fixed bin), ioa_ ext entry options (variable), com_err_ ext entry options (variable), hcs_$terminate_noname ext entry (ptr, fixed bin); /* =============================================== */ temp_ptr = addr (temp); call hcs_$make_ptr (null, "world.bin", "", world_ptr, ec); if world_ptr = null then do; er: call com_err_ (ec, "glob", "world.bin"); return; end; do i = 6048 to 1 by -1; if input (i) = -1 then go to done; if input (i) = 0 then go to linend; temp = input (i); call ioa_("d=^d x=^d y=^d z=^d", i, component.x, component.y, component.z); go to loop; linend: call ioa_("d=^d x=-1 y=-1 z=-1", i); go to loop; loop: end; done: call ioa_("END"); call hcs_$terminate_noname (world_ptr, ec); return; end glob;