>  'h','e','l','l','o',' ','v','a','x','\n',

That wasn't quite right.  Amazingly, mullender.c works unmodified
on 4.3/vax.  Using simh-pdp11 and
www.tuhs.org/Archive/PDP-11/Boot_Images/{2.9BSD_rl02_1145.gz,README}
confirms that the output was the same on both machines.

Recipe for running 4.4/landisk:
gavare.se/gxemul/gxemul-stable/doc/guestoses.html

- - -

/*
 * A remake of www.ioccc.org/1984/mullender.c for
 * OpenBSD/i386/landisk/vax.  Public domain.
 */

char blob[] = {
  0,200,49,200,0,200,235,32,
  1,228,18,199,3,101,9,230,4,224,128,195,13,199,3,100,0,229,120,224,
  0,64,128,195,242,175,9,0,0,0,0,0,
  144,144,235,27,91,106,9,141,75,8,81,106,1,83,106,4,88,205,128,49,
  192,80,83,83,176,240,205,128,131,196,28,232,224,255,255,255,
  0,0,0,0, 0,225,245,5, 32,32,58,45,41,8,8,8,8,
  221,9,159,175,242,221,1,251,3,175,11,221,0,159,175,223,251,2,175,7,
  17,234,0,0,188,4,4,0,0,188,143,240,0,4,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,17,142
};

#include <sys/types.h>
#include <sys/mman.h>
int main(void) {
  mprotect(blob, sizeof blob, PROT_READ|PROT_EXEC);
  ((void (*)(void))blob)();
  return 1;
}

Reply via email to