[comp.sources.amiga] v89i199: hp11 calculator emulator v1.01, Part02/03

page%swap@Sun.COM (Bob Page) (11/13/89)

Submitted-by: dg3i+@andrew.cmu.edu (David Gay)
Posting-number: Volume 89, Issue 199
Archive-name: applications/hp11.2

# This is a shell archive.
# Remove anything above and including the cut line.
# Then run the rest of the file through 'sh'.
# Unpacked files will be owned by you and have default permissions.
#----cut here-----cut here-----cut here-----cut here----#
#!/bin/sh
# shar: SHell ARchive
# Run the following text through 'sh' to create:
#	amiga/icon.c
#	amiga/indic.c
#	amiga/internal.h
#	amiga/menus.c
#	amiga/menus.h
#	codes.h
#	doc/hp11.doc
#	doc/quick
#	doc/compile.doc
#	hp11.c
#	hp11.debug
#	hp11.h
#	hp11.lnk
#	hp11.pic.uu
# This is archive 2 of a 3-part kit.
# This archive created: Sun Nov 12 17:33:21 1989
if `test ! -d amiga`
then
  mkdir amiga
  echo "mkdir amiga"
fi
echo "extracting amiga/icon.c"
sed 's/^X//' << \SHAR_EOF > amiga/icon.c
X#include "exec/types.h"
X#include "intuition/intuition.h"
X#include "workbench/workbench.h"
X
Xextern UWORD off_image_data[];
Xextern UWORD prog_image_data[];
X
Xstatic struct Image prog_image = {
X   0, 0,
X   53, 42, 2,
X   prog_image_data,
X   3, 0,
X   NULL
X};
X
Xstruct Image off_image = {
X   0, 0,
X   53, 42, 2,
X   off_image_data,
X   3, 0,
X   NULL
X};
X
Xstatic char *tool_types[] = {
X   "FILETYPE=HP11",
X   NULL
X};
X
Xchar tool[120];
X
Xstruct DiskObject prog_icon = {
X   WB_DISKMAGIC, WB_DISKVERSION,
X   { /* gadget */
X      NULL,
X      0, 0,
X      53, 43,
X      5,
X      3,
X      1,
X      (APTR)&prog_image,
X      NULL
X   },
X   4,
X   tool,
X   tool_types,
X   NO_ICON_POSITION, NO_ICON_POSITION,
X   NULL,
X   "",
X   0
X};
X
SHAR_EOF
echo "extracting amiga/indic.c"
sed 's/^X//' << \SHAR_EOF > amiga/indic.c
X/* These are the structures which define the shape of the indicatos. The
X  actual data is in indic_data.c (it is separate because it MUST reside in
X  chip memory. */
X#include "exec/types.h"
X#include "intuition/intuition.h"
X
Xextern UWORD fData[], gData[], GData[], RADData[], PRGMData[], USERData[];
X
Xstruct Image fImage = {
X   0, 0, /* Position */
X   3, 6, 2, /* width, height, depth */
X   fData, /* Shape data */
X   0, 0, /* PlanePick, PlaneOnOff, defined by SetCol */
X   NULL /* NextImage */
X};
X
Xstruct Image gImage = {
X   0, 1,
X   4, 6, 2,
X   gData,
X   0, 0,
X   NULL
X};
X
Xstruct Image GImage = {
X   0, 0,
X   4, 6, 2,
X   GData,
X   0, 0,
X   NULL
X};
X
Xstruct Image RADImage = {
X   0, 0,
X   14, 6, 2,
X   RADData,
X   0, 0,
X   NULL
X};
X
Xstruct Image PRGMImage = {
X   0, 0,
X   19, 6, 2,
X   PRGMData,
X   0, 0,
X   NULL
X};
X
Xstruct Image USERImage = {
X   0, 0,
X   19, 6, 2,
X   USERData,
X   0, 0,
X   NULL
X};
X
SHAR_EOF
echo "extracting amiga/internal.h"
sed 's/^X//' << \SHAR_EOF > amiga/internal.h
X/* Various informations for internal use by amiga specific routines */
X#define HP11WIDTH 319 /* Drawing size */
X#define HP11HEIGHT 181
X#define HP11X 3 /* Position in window */
X#define HP11Y 12
X#define PATHLEN 100
X
Xextern struct Window *hp11; /* The window */
Xextern struct Menu hp11menu[];
Xextern char *hp11name;
Xextern char hp11path[PATHLEN];
Xvoid Message(char *);
Xchar *mygetpath(char *, BPTR);
X
SHAR_EOF
echo "extracting amiga/menus.c"
sed 's/^X//' << \SHAR_EOF > amiga/menus.c
Xchar message[] =
X "HP11, by David Gay(86-87). You may freely copy & distribute this program.";
Xchar message2[] =
X "Vous pouvez librement copier & distribuer ce programme.";
X#include "exec/types.h"
X#include "graphics/text.h"
X#include "intuition/intuition.h"
X#include "workbench/workbench.h"
X#include "workbench/startup.h"
X#include "libraries/dos.h"
X#include "libraries/arpbase.h"
X#include "proto/arp.h"
X#define NODOS
X#include "libraries/arp_pragmas.h"
X
X#include "proto/exec.h"
X#include "proto/graphics.h"
X#include "proto/intuition.h"
X#include "proto/icon.h"
X#include "proto/dos.h"
X
X#include "string.h"
X#include "math.h"
X
X#include "hp11/hp11.h"
X#include "hp11/io.h"
X#include "hp11/ins.h"
X#include "hp11/amiga/menus.h"
X#include "hp11/amiga/internal.h"
X#include "hp11/amiga/cbio.h"
X
X#define PROJECTWIDTH (75 + COMMWIDTH) /* Width of Project menu options */
X#define EDITWIDTH (65 + COMMWIDTH)
X#define OPTIONSWIDTH 80
X#define DECIMALWIDTH (CHECKWIDTH + 65 + COMMWIDTH)
X#define SPEEDWIDTH (CHECKWIDTH + 55)
X
Xstatic struct TextAttr topaz9attr = { "topaz.font", 9, 0, 0 }; /* The text font desired */
Xstatic struct TextFont *topaz9;
X
X/* Texts for menu options */
Xstatic struct IntuiText hp11text[] = {
X   { 2, 1, JAM1, 4, 1, NULL, "New", NULL },
X   { 2, 1, JAM1, 4, 1, NULL, "Open", NULL },
X   { 2, 1, JAM1, 4, 1, NULL, "Save", NULL },
X   { 2, 1, JAM1, 4, 1, NULL, "Save as", NULL },
X   { 2, 1, JAM1, 4, 1, NULL, "Print", NULL },
X   { 2, 1, JAM1, 4, 1, NULL, "Quit", NULL },
X   { 2, 1, JAM1, 4, 1, NULL, "Copy", NULL },
X   { 2, 1, JAM1, 4, 1, NULL, "Paste", NULL },
X   { 2, 1, JAM1, CHECKWIDTH, 1, NULL, "Radix", NULL },
X      { 2, 1, JAM1, CHECKWIDTH, 1, NULL, "Point", NULL },
X      { 2, 1, JAM1, CHECKWIDTH, 1, NULL, "Comma", NULL },
X   { 2, 1, JAM1, CHECKWIDTH, 1, NULL, "Speed", NULL },
X      { 2, 1, JAM1, CHECKWIDTH, 1, NULL, "Slow", NULL },
X      { 2, 1, JAM1, CHECKWIDTH, 1, NULL, "Fast", NULL },
X   { 2, 1, JAM1, CHECKWIDTH, 1, NULL, "Icons", NULL }
X};
X
X/* The various menu items */
Xstatic struct MenuItem hp11item[] = {
X   { &hp11item[1], 0, 0, PROJECTWIDTH, 10, /* New */
X     ITEMTEXT | ITEMENABLED | HIGHCOMP, 0,
X     (APTR)&hp11text[0], NULL, 0, NULL },
X
X   { &hp11item[2], 0, 10, PROJECTWIDTH, 10, /* Open */
X     ITEMTEXT | ITEMENABLED | HIGHCOMP | COMMSEQ, 0,
X     (APTR)&hp11text[1], NULL, 'O', NULL },
X
X   { &hp11item[3], 0, 20, PROJECTWIDTH, 10, /* Save */
X     ITEMTEXT | ITEMENABLED | HIGHCOMP, 0,
X     (APTR)&hp11text[2], NULL, 0, NULL },
X
X   { &hp11item[4], 0, 30, PROJECTWIDTH, 10, /* Save as */
X     ITEMTEXT | ITEMENABLED | HIGHCOMP | COMMSEQ,  0,
X     (APTR)&hp11text[3], NULL, 'S', NULL },
X
X   { &hp11item[5], 0, 40, PROJECTWIDTH, 10, /* Print */
X     ITEMTEXT | ITEMENABLED | HIGHCOMP, 0,
X     (APTR)&hp11text[4], 0, NULL },
X
X   { NULL, 0, 50, PROJECTWIDTH, 10, /* Quit */
X     ITEMTEXT | ITEMENABLED | HIGHCOMP, 0,
X     (APTR)&hp11text[5], NULL, 0, NULL },
X
X
X   { &hp11item[7], 0, 0, EDITWIDTH, 10, /* Copy */
X     ITEMTEXT | ITEMENABLED | HIGHCOMP | COMMSEQ, 0,
X     (APTR)&hp11text[6], NULL, 'C', NULL },
X
X   { NULL, 0, 10, EDITWIDTH, 10, /* Paste */
X     ITEMTEXT | ITEMENABLED | HIGHCOMP | COMMSEQ, 0,
X     (APTR)&hp11text[7], NULL, 'P', NULL },
X
X
X   { &hp11item[11], 0, 0, OPTIONSWIDTH, 10, /* Radix */
X     ITEMTEXT | ITEMENABLED | HIGHCOMP, 0,
X     (APTR)&hp11text[8], NULL, 0, &hp11item[9] },
X
X      { &hp11item[10], 50, 9, DECIMALWIDTH, 10, /* Point */
X	ITEMTEXT | ITEMENABLED | HIGHCOMP | CHECKIT | CHECKED | COMMSEQ, 2,
X	(APTR)&hp11text[9], NULL, '.', NULL },
X
X      { NULL, 50, 19, DECIMALWIDTH, 10, /* Comma */
X	ITEMTEXT | ITEMENABLED | HIGHCOMP | CHECKIT | COMMSEQ, 1,
X	(APTR)&hp11text[10], NULL, ',', NULL },
X
X   { &hp11item[14], 0, 10, OPTIONSWIDTH, 10, /* Speed */
X     ITEMTEXT | ITEMENABLED | HIGHCOMP, 0,
X     (APTR)&hp11text[11], NULL, 0, &hp11item[12] },
X
X      { &hp11item[13], 50, 9, SPEEDWIDTH, 10, /* Slow */
X	ITEMTEXT | ITEMENABLED | HIGHCOMP | CHECKIT | CHECKED, 2,
X	(APTR)&hp11text[12], NULL, 0, NULL },
X
X      { NULL, 50, 19, SPEEDWIDTH, 10, /* Fast */
X	ITEMTEXT | ITEMENABLED | HIGHCOMP | CHECKIT, 1,
X	(APTR)&hp11text[13], NULL, 0, NULL },
X
X   { NULL, 0, 20, SPEEDWIDTH, 10, /* Icons */
X     ITEMTEXT | ITEMENABLED | HIGHCOMP | CHECKIT | CHECKED, 0,
X     (APTR)&hp11text[14], NULL, 0, NULL }
X};
X
X/* The main menu options */
Xstruct Menu hp11menu[] = {
X   { &hp11menu[1], 0, 0, 80, 9, MENUENABLED, "Project", &hp11item[0] },
X   { &hp11menu[2], 100, 0, 50, 9, MENUENABLED, "Edit", &hp11item[6] },
X   { NULL, 170, 0, 80, 9, MENUENABLED, "Options", &hp11item[8] }
X};
X
X/* state of Icons menu option */
Xstatic BOOL icons_on = TRUE;
X
X/* filename for save & open, window title */
Xstatic char filename[100], undo[100], winname[110];
X
X/* Structures for file requester */
X/* ----------------------------- */
X
Xstatic WORD shadowvert[] = { /* Points for shadow of ok/cancel box  */
X   2, 15,
X   2, 17,
X   82, 17,
X   82, 1,
X   80, 1
X};
Xstatic struct Border cancelshadow = { 0, 0, 2, 0, JAM1, 5, shadowvert, NULL };
Xstatic WORD cancelvert[] = { /* Actual box */
X   -1, -1,
X   80, -1,
X   80, 15,
X   -1, 15,
X   -1, -1
X};
X/* This defines a box with shadow 80 points wide */
Xstatic struct Border cancelborder = { 0, 0, 2, 0, JAM1, 5, cancelvert, &cancelshadow };
X
X/* The cancel gadget */
Xstatic struct IntuiText canceltext = { 2, 1, JAM1, 10, 4, &topaz9attr, "Cancel", NULL };
Xstatic struct Gadget cancelgadget = {
X   NULL,
X   -100, -25, 80, 15, /* it is 100 points from the right, 25 points from
X    the bottom & measures 80x15 */
X   GADGHCOMP | GRELRIGHT | GRELBOTTOM,
X   RELVERIFY | TOGGLESELECT | ENDGADGET,
X   BOOLGADGET | REQGADGET,
X   (APTR)&cancelborder,
X   NULL,
X   &canceltext
X};
X
Xstatic WORD okvert[] = { /* Box thickening */
X   0, 0,
X   79, 0,
X   79, 14,
X   0, 14,
X   0, 0
X};
Xstatic struct Border okborder = { 0, 0, 2, 0, JAM1, 5, okvert, &cancelborder };
X
X/* Ok gadget */
Xstatic struct IntuiText oktext = { 2, 1, JAM1, 30, 4, &topaz9attr, "Ok", NULL };
Xstatic struct Gadget okgadget = {
X   &cancelgadget,
X   20, -25, 80, 15,
X   GADGHCOMP | GRELBOTTOM,
X   RELVERIFY | TOGGLESELECT | ENDGADGET,
X   BOOLGADGET | REQGADGET,
X   (APTR)&okborder,
X   NULL,
X   &oktext
X};
X
Xstatic WORD bluevert[] = {
X   0, 8,
X   199, 8
X};
Xstatic struct Border blueline = { 0, 0, 0, 0, JAM1, 2, bluevert, NULL };
X
Xstatic WORD namevert[] = { /* for filename box */
X   -1, -1,
X   200, -1,
X   200, 9,
X   -1, 9,
X   -1, -1
X};
Xstatic struct Border nameborder = { 0, 0, 2, 0, JAM1, 5, namevert, &blueline };
X
Xstatic struct StringInfo nameinfo = {
X   filename, undo,
X   0, 100, 0
X};
X
Xstatic struct IntuiText nametext = { 2, 1, JAM1, -55, 0, &topaz9attr, NULL, NULL };
X
X/* filename gadget */
Xstatic struct Gadget namegadget = {
X   &okgadget,
X   62, 10, 200, 9,
X   GADGHCOMP,
X   ENDGADGET,
X   STRGADGET | REQGADGET,
X   (APTR)&nameborder,
X   NULL,
X   &nametext,
X   0,
X   (APTR)&nameinfo
X};
X
Xstatic WORD filevert[] = { /* for the complete requester */
X   0, 0,
X   269, 0,
X   269, 59,
X   0, 59,
X   0, 0
X};
Xstatic struct Border fileborder = { 0, 0, 2, 0, JAM1, 5, filevert, NULL };
X
X/* The actual requester */
Xstatic struct Requester filereq = {
X   NULL,
X   25, 65,
X   270, 60,
X   0, 0,
X   &namegadget,
X   &fileborder,
X   NULL,
X   0,
X   1
X};
X
X/* Message requester */
X/* ----------------- */
Xstatic struct IntuiText msgtext = { 2, 1, JAM1, 10, 10, &topaz9attr, NULL, NULL };
X
Xstatic struct Gadget msgokgadget = {
X   NULL,
X   20, -25, 80, 15, /* Message inits LeftEdge */
X   GADGHCOMP | GRELBOTTOM,
X   RELVERIFY | TOGGLESELECT | ENDGADGET,
X   BOOLGADGET | REQGADGET,
X   (APTR)&okborder,
X   NULL,
X   &oktext
X};
X
Xstatic WORD msgvert[][2] = {
X   0, 0,
X   0, 0,
X   0, 59,
X   0, 59,
X   0, 0
X};
Xstatic struct Border msgborder = { 0, 0, 2, 0, JAM1, 5, msgvert, NULL };
X
Xstatic struct Requester msgreq = {
X   NULL,
X   0, 65, /* LeftEdge is initialised by Message */
X   0, 60, /* Width also */
X   0, 0,
X   &msgokgadget,
X   &msgborder,
X   &msgtext,
X   0,
X   1
X};
X
X/* struct DiskObject {
X    int a;
X};  Little problem: DiskObject def lost !!! */
X
Xstruct Library *IconBase; /* for the icon library */
Xstruct ArpBase *ArpBase; /* Arp lib */
Xextern char tool[]; /* Path to hp11 program */
Xextern struct DiskObject prog_icon;
Xstatic BOOL clip;
X
Xvoid LoadProg(void), OpenProg(void), StoreProg(void), SaveProg(void), Copy(void), Paste(void);
X
XBOOL MenusInit(argc, argv)
Xint argc;
XAPTR argv;
X#define argw ((struct WBStartup *)argv)
X#define arg1 (argw->sm_ArgList[1])
X{
X   char path[PATHLEN];
X
X   topaz9 = OpenFont(&topaz9attr); /* Open the desired font */
X
X   IconBase = OpenLibrary("icon.library", 0);
X   if (!IconBase) { /* no icon library, disable icons */
X      icons_on = FALSE;
X      hp11item[14].Flags &= ~(CHECKED | ITEMENABLED);
X   }
X   ArpBase = OpenLibrary("arp.library", 0);
X
X   /* Set up tool path */
X   strcat(strcpy(tool, hp11path), hp11name);
X
X   if (!(clip = !CBOpen(0))) /* Disable clip options if no clipboard */
X      hp11menu[1].Flags = NULL;
X
X   SetMenuStrip(hp11, hp11menu);
X
X   if (argc != 0) { /* CLI */
X      icons_on = FALSE;
X      hp11item[14].Flags &= ~CHECKED; /* by default, no icons from cli */
X      if (argc > 1) { /* argument */
X	 strcpy(filename, ((char **)argv)[1]);
X	 LoadProg();
X      }
X   }
X   else if (argw->sm_NumArgs > 1) { /* workbench, with argument */
X      if (!mygetpath(path, arg1.wa_Lock)) path[0] = '\0';
X      strcpy(filename, strcat(path, arg1.wa_Name));
X      LoadProg();
X   }
X   return(TRUE);
X}
X#undef arg1
X#undef argw
X
Xvoid MenusCleanUp()
X{
X   if (hp11) ClearMenuStrip(hp11);
X   if (clip) CBClose();
X   if (ArpBase) CloseLibrary(ArpBase);
X   if (IconBase) CloseLibrary(IconBase);
X   if (topaz9) CloseFont(topaz9);
X}
X
X/* Enable menus */
Xvoid MenusOn(void)
X{
X   SetMenuStrip(hp11, hp11menu);
X}
X
X/* Disable menus */
Xvoid MenusOff(void)
X{
X   ClearMenuStrip(hp11);
X}
X
Xvoid EditOn(void)
X{
X   if (clip) OnMenu(hp11, SHIFTMENU(1) | SHIFTITEM(NOITEM));
X}
X
Xvoid EditOff(void)
X{
X   OffMenu(hp11, SHIFTMENU(1) | SHIFTITEM(NOITEM));
X}
X
X/* The menu handler, number represents the chosen option */
Xint MenuHandler(UWORD number)
X{
X   register struct MenuItem *item;
X   register int key = -1;
X
X   MenusOff(); /* Disable menus */
X
X   while (number != MENUNULL) {
X
X      switch (MENUNUM(number)) {
X	 case 0: /* Project */
X	    switch (ITEMNUM(number)) {
X	       case 0: /* New */ HP11ColdReset(); key = BRESET; break; /* back to main loop */
X	       case 1: /* Open */ OpenProg(); key = BRESET; break;
X	       case 2: /* Save */ StoreProg(); break;
X	       case 3: /* Save as */ SaveProg(); break;
X	       case 4: /* Print */ break;
X	       case 5: /* Quit */ quit = TRUE; key = BRESET; break;
X	    }
X	    break;
X	 case 1: /* Edit */
X	    switch (ITEMNUM(number)) {
X	       case 0: /* Copy */ Copy(); break;
X	       case 1: /* Paste */ Paste(); key = BDISPLAY; break;
X	    }
X	    break;
X	 case 2: /* Options */
X	    switch (ITEMNUM(number)) {
X	       case 0: /* Radix */
X		  comma = SUBNUM(number); /* false for Point, true for Comma */
X		  key = BDISPLAY; /* Redisplay */
X		  break;
X	       case 1: /* Speed */
X		  fast = SUBNUM(number); /* false for Slow, true for Fast */
X		  break;
X	       case 2: /* Icons */
X		  icons_on = !icons_on;
X
X		  /* Toggle flag */
X		  if (icons_on) hp11item[14].Flags |= CHECKED;
X		  else hp11item[14].Flags &= ~CHECKED;
X
X		  break;
X	    }
X	    break;
X      }
X
X      item = ItemAddress(hp11menu, (long)number);
X      number = item->NextSelect;
X   }
X
X   MenusOn();
X   return(key);
X}
X
X/* Display an error message */
Xvoid Message(text)
Xchar *text;
X{
X   register int width;
X
X   msgtext.IText = text;
X   width = IntuiTextLength(&msgtext) + 20; /* width of requester */
X   if (width < 100) width = 100; /* min width */
X   msgokgadget.Flags &= ~SELECTED;
X   msgreq.Width = width;
X   msgreq.LeftEdge = (HP11WIDTH - width) >> 1; /* center rqeuester */
X   msgokgadget.LeftEdge = (width >> 1) - 40; /* center OK */
X   msgvert[1][0] = width - 1;
X   msgvert[2][0] = width - 1;
X
X   Request(&msgreq, hp11);
X}
X
X/* Read a file name, text is displayed to the left of the name box.
X  Return FALSE if cancel selected, TRUE otherwise */
Xstatic BOOL GetFile(char *text)
X{
X   ULONG saveIDCMP;
X   struct IntuiMessage *msg;
X   int done;
X
X   if (ArpBase) /* Use arp file req */
X   {
X      static char directory[DSIZE + 1];
X      static struct FileRequester FR;
X
X      filename[0] = '\0';
X      FR.fr_Hail = text;
X      FR.fr_File = filename;
X      FR.fr_Dir = directory;
X
X      if (FileRequest(&FR))
X      {
X	  long lock = Lock(directory, SHARED_LOCK);
X
X	  if (lock)
X	  {
X	      CurrentDir(lock);
X	      return TRUE;
X	  }
X      }
X      return FALSE;
X   }
X   else
X   {
X      nametext.IText = text;
X      okgadget.Flags &= ~SELECTED;
X      cancelgadget.Flags &= ~SELECTED;
X
X      saveIDCMP = hp11->IDCMPFlags;
X      ModifyIDCMP(hp11, REQCLEAR | REQSET);
X      Request(&filereq, hp11);
X      do {
X	     WaitPort(hp11->UserPort); /* Wait for requester to appear */
X	 msg = GetMsg(hp11->UserPort);
X	 done = msg->Class == REQSET;
X	 ReplyMsg(msg);
X      } while (!done);
X
X      ActivateGadget(&namegadget, hp11, &filereq);
X
X      do {
X	 WaitPort(hp11->UserPort); /* Wait for requester to disappear */
X	 msg = GetMsg(hp11->UserPort);
X	 done = msg->Class == REQCLEAR;
X	 ReplyMsg(msg);
X      } while (!done);
X
X      ModifyIDCMP(hp11, saveIDCMP);
X
X      if (!(cancelgadget.Flags & SELECTED))
X      {
X	 CurrentDir(DupLock(CurrentDir(0)));
X	 return TRUE;
X      }
X      else
X	 return FALSE;
X   }
X}
X
Xstatic void SetTitle(void)
X{
X   SetWindowTitles(hp11, strcat(strcpy(winname, "HP11C - "), filename), (char *)(long)-1);
X}
X
Xstatic int FileType(struct DiskObject *icon, char *type)
X{
X   char *value;
X
X   if (!(value = FindToolType(icon->do_ToolTypes, "FILETYPE"))) return(FALSE);
X   return((int)MatchToolValue(value, type));
X}
X
Xstatic void LoadProg()
X{
X   LONG file;
X   struct Regs newhp11;
X   struct DiskObject *icon = NULL;
X   BYTE dummy;
X
X   if (IconBase && (icon = GetDiskObject(filename)) &&
X       !FileType(icon, "HP11")) {
X      Message("This isn't an HP11 program");
X      goto exit;
X   }
X
X   if (file = Open(filename, MODE_OLDFILE)) {
X      if ((Read(file, (char *)&newhp11, sizeof(struct Regs)) == sizeof(struct Regs))
X	  && (Read(file, &dummy, 1) != 1)) { /* dummy read to check file size */
X	    hp11r = newhp11; /* Set new internal state */
X	    running = FALSE; /* Interrupt program */
X	    PC = 0;
X	    retCnt = 0;
X	    ENABLE();
X
X	    SetTitle();
X	 }
X	 else Message("This isn't an HP11 program");
X      Close(file);
X   }
X   else Message("Couldn't open file");
X
Xexit: if (icon) FreeDiskObject(icon);
X}
X
X/* Save current state under current filename */
Xstatic void StoreProg()
X{
X   LONG file;
X   struct DiskObject *temp_icon;
X
X   file = Open(filename, MODE_NEWFILE);
X   if (!file) Message("Couldn't open file");
X   else {
X      if (Write(file, (char *)&hp11r, sizeof(struct Regs)) != sizeof(struct Regs))
X	 Message("Error writing the file");
X      else {
X	 SetTitle();
X	 if (icons_on)
X	    if (!(temp_icon = GetDiskObject(filename)))
X	       PutDiskObject(filename, &prog_icon);
X	    else FreeDiskObject(temp_icon);
X      }
X      Close(file);
X   }
X}
X
X/* Save current state under a filename */
Xstatic void SaveProg()
X{
X   BPTR cdir, new;
X
X   CurrentDir(cdir = CurrentDir(0));
X
X   if (GetFile("Save:"))
X   {
X      StoreProg();
X      if (new = CurrentDir(cdir)) UnLock(new);
X   }
X}
X
X/* Load the hp11 state */
Xstatic void OpenProg()
X{
X   BPTR cdir, new;
X
X   CurrentDir(cdir = CurrentDir(0));
X
X   if (GetFile("Open:")) /* Get file name */
X   {
X      LoadProg();
X      if (new = CurrentDir(cdir)) UnLock(new);
X   }
X}
X
Xstatic void Copy()
X{
X   CBCut(NbStr(X));
X}
X
Xstatic void Paste()
X{
X   char buf[256];
X
X   if (CBPaste(buf)) {
X      Enter(); ENABLE();
X      X = Check(atof(buf));
X   }
X}
X
SHAR_EOF
echo "extracting amiga/menus.h"
sed 's/^X//' << \SHAR_EOF > amiga/menus.h
XBOOL MenusInit(int, APTR);
Xvoid MenusCleanUp(void);
Xint MenuHandler(UWORD number);
SHAR_EOF
echo "extracting codes.h"
sed 's/^X//' << \SHAR_EOF > codes.h
X/* Instruction codes */
X
X/* Unshifted codes */
X#define KMAIN		(0)
X#define KSQRT		(KMAIN + 0)
X#define KEXP		(KMAIN + 1)
X#define KEXP10		(KMAIN + 2)
X#define KEXP_YX 	(KMAIN + 3)
X#define KINV		(KMAIN + 4)
X#define KCHS		(KMAIN + 5)
X#define KDIV		(KMAIN + 6)
X#define KTRIG		(KMAIN + 7)
X#define KEEX		(KMAIN + 10)
X#define KMUL		(KMAIN + 11)
X#define KR_S		(KMAIN + 12)
X#define KRDN		(KMAIN + 13)
X#define KEXG_XY 	(KMAIN + 14)
X#define KENTER		(KMAIN + 15)
X#define KSUB		(KMAIN + 16)
X#define KPOINT		(KMAIN + 17)
X#define KSIGMA_PLUS	(KMAIN + 18)
X#define KPLUS		(KMAIN + 19)
X
X/* f codes */
X#define KF		(KMAIN + 20)
X#define KPI		(KF + 0)
X#define KX_LE_Y 	(KF + 1)
X#define KEXG_X_IND	(KF + 2)
X#define KRECT		(KF + 3)
X#define KEXG_XI 	(KF + 4)
X#define KDSE		(KF + 5)
X#define KISG		(KF + 6)
X#define KX_GT_Y 	(KF + 7)
X#define KPSE		(KF + 8)
X#define KCLR_SIGMA	(KF + 9)
X#define KCLR_REG	(KF + 10)
X#define KRANDOM 	(KF + 11)
X#define KPERM		(KF + 12)
X#define KHMS		(KF + 13)
X#define KTO_RAD 	(KF + 14)
X#define KX_NE_Y 	(KF + 15)
X#define KFRAC		(KF + 16)
X#define KFACT		(KF + 17)
X#define KESTIMATE	(KF + 18)
X#define KLR		(KF + 19)
X#define KX_EQ_Y 	(KF + 20)
X
X/* g codes */
X#define KG		(KF + 21)
X#define KSQR		(KG + 0)
X#define KLN		(KG + 1)
X#define KLOG		(KG + 2)
X#define KPERC		(KG + 3)
X#define KDELTA_PERC	(KG + 4)
X#define KABS		(KG + 5)
X#define KDEG		(KG + 6)
X#define KRAD		(KG + 7)
X#define KGRD		(KG + 8)
X#define KX_LT_0 	(KG + 9)
X#define KARC		(KG + 10)
X#define KPOLAR		(KG + 13)
X#define KX_GT_0 	(KG + 14)
X#define KRTN		(KG + 15)
X#define KRUP		(KG + 16)
X#define KRND		(KG + 17)
X#define KCLX		(KG + 18)
X#define KLSTX		(KG + 19)
X#define KCOMB		(KG + 20)
X#define KHR		(KG + 21)
X#define KTO_DEG 	(KG + 22)
X#define KX_NE_0 	(KG + 23)
X#define KINT		(KG + 24)
X#define KMEAN		(KG + 25)
X#define KSDEV		(KG + 26)
X#define KSIGMA_SUB	(KG + 27)
X#define KX_EQ_0 	(KG + 28)
X
X/* Miscellaneous codes */
X#define KSTO_RANDOM	(KG + 29)
X#define KRCL_SIGMA	(KG + 30)
X#define KHYP		(KG + 31)
X#define KARCHYP 	(KHYP + 3)
X
X/* Start of complex codes (dealt with differently in execution routine) */
X#define KCOMPLEX	(KARCHYP + 3)
X
X/* Flags */
X#define KFLAGS		(KCOMPLEX)
X
X/* Numeric codes */
X#define KFIG		(KFLAGS + 6)
X
X/* display codes */
X#define KFIX		(KFIG + 10)
X#define KSCI		(KFIX + 10)
X#define KENG		(KSCI + 8)
X
X/* GTO, GSB, LBL codes */
X#define KLBL		(KENG + 8)
X#define KGTO		(KLBL + 15)
X#define KGSB		(KGTO + 16)
X
X/* STO & RCL codes */
X#define KSTO		(KGSB + 16)
X#define KRCL		(KSTO + 110)
X
X
X/* Offsets used by various codes */
X#define OSIN 0
X#define OCOS 1
X#define OTAN 2
X#define OSF 0
X#define OCF 2
X#define OSET 4
X#define OA 10
X#define OB 11
X#define OC 12
X#define OD 13
X#define OE 14
X#define OIND_G 15
X#define OI 20
X#define OIND_R 21
X#define OPLUS 22
X#define OSUB 44
X#define OMUL 66
X#define ODIV 88
X
X
X/* Immediate action codes */
X#define ISST		0
X#define ICLR_PRGM	1
X#define ICLR_PREFIX	2
X#define IUSER		3
X#define IBST		4
X#define IP_R		5
X#define IMEM		6
X#define ION		7
X#define IBACK		8
X#define IRESET		9
X#define IDISPLAY	10
X#define IGTO_LINE	100
SHAR_EOF
if `test ! -d doc`
then
  mkdir doc
  echo "mkdir doc"
fi
echo "extracting doc/hp11.doc"
sed 's/^X//' << \SHAR_EOF > doc/hp11.doc
X			  HP11C Calculator
X			  ================
X
XThis is version 1.01 (a few bug fixes & minor changes from the previous
Xversion).
X
XThis program emulates an HP11C calculator. Everything is there, including
Xthe program mode (with the instructions displayed as usual, as numbers
X...). By default, it's even as slow. It is callable from Workbench or CLI.
X
XUsage
X-----
XYou can pass as argument a program to be loaded (not run): from CLI, type
Xhp11 <name> (you must be in the directory containing the program, cf
Xmiscellaneous), from the Workbench click on the program's icon, press &
Xhold shift and double click on the hp11's icon.
X
XBasically, the program opens a window containing an image of an HP11C (it
Xwill only look right if you use the standard workbench colours), it looks
Xbest on an interlaced screen but will work in non-interlaced mode (however,
Xthe image will be rather elongated). You select keys with the mouse or the
Xkeyboard, the following keys are supported: 0..9,.,+,-,*,/,return (for
Xenter), esc (for ON).
X
XThe ON key is treated specially: when you select it, the HP11C becomes an
Xicon that you can move around with the mouse. To turn the calculator back
Xon, double-click on the icon.
X
XThe following menu options are avalaible:
X
X   Project
X      New		Clear HP11 memory (equivalent to ON -)
X      Open	  AO	Load an HP11 program
X      Save		Save program under current name
X      Save As	  AS	Save program under a name
X      Print		Print program -- unimplemented
X      Quit		End program
X
X   Edit
X      Copy	  AC	Copy number in display to clipboard
X      Paste	  AP	Enter clipboard as a number into X
X
X   Options
X      Radix
X	 Point	  A.	Select UK/USA format for numbers
X	 Comma	  A,	Select European format for numbers
X      Speed
X	 Slow		Program's execute at HP11C speed
X	 Fast		Program's execute faster ...
X      Icons		Save an icon with a program ? Default = Off when
X			called from CLI, on from Workbench
X
XFor more details (especially concerning HP11C programming), refer to HP's
Xmanual. (I didn't want to get sore fingers ...)
X
X
XMiscellaneous
X-------------
XPlease send all bug reports, suggestions for enhancements ... to me.
X
XThe format for Copy & Paste is not the same (alas ? if you disagree
Xstrongly, please send me a note): Copy essentially places an image of what
Xis on the display in the clipboard, thus 200*10^23 becomes 200.0000   23.
XPaste reads a number in the format +/-x.xE+/-x.
X
XThe ARP file requester is used if arp.library is present.
X
XThe program must be able to find the file HP11.PIC. It should be in the
Xsame directory as the executable file. However, if you run the program
Xfrom the CLI, you must either give an explicit path when you execute the
Xprogram (as in df1:hp11/hp11), or have the file hp11.pic in the current
Xdirectory. In other words, the program shouldn't be in your PATH
Xspecification (for instance in C:).
X
XThis program is placed in the public domain.
X
X
X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XDavid Gay
X  "(p.suiv :=: q.prec.suiv).prec :=: q.prec"
X  You don't want to know about this language !
X
XGAY@ELMA.EPFL.CH, or GAY%ELMA.EPFL.CH@CLSEPF51.bitnet
X
X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
X
SHAR_EOF
echo "extracting doc/quick"
sed 's/^X//' << \SHAR_EOF > doc/quick
XThis is a very small tutorial for those who don't know how to use an HP11:
X
X- The HP11 uses RPN (Reverse Polish Notation), not conventional algebraic
X  notation. Calculations must thus be done by first entering the operands,
X  and then the operation. For example, to calculate:
X
X    5 + 3	     you type	   5 3 +
X    5 * (2 + 4)      you type      5 2 4 + *
X    2 * sin(0.5)     you type      0.5 sin 2 *
X
X- When you want to enter two numbers consecutively, you must separate them by
X  typing the ENTER key, the above will thus actually be
X
X    5 ENTER 3 +
X    5 ENTER 2 ENTER 4 + *
X    0.5 SIN 2 * 	     <- ENTER only necessary when entering two numbers
X
X- Intermediate results are saved on a stack, but as this is only 4 levels deep,
X  you must be slightly careful in which order you do the operations, as in:
X
X  ( 6 + 5) * (3 + 2 + 4 + 6)
X
X  if you try
X
X  6 ENTER 5 +	3 ENTER 2 ENTER 4 ENTER 6 + + +   *
X
X  you won't get the expected result, because the 11 (result of 6 5 +) will
X  have been lost. This is what happens (X, Y, Z, T are the names of the four
X  levels of the stack, the keys pressed are marked between the snapshots of
X  the stack) :
X
X     -------	   -------     -------	   -------     -------
X T   |	   |	   |	 |     |     |	   |	 |     |     |
X     -------	   -------     -------	   -------     -------
X Z   |	   |	   |	 |     |     |	   |	 |     |     |
X     -------  ENT  -------  5  -------	+  -------  3  -------	ENT
X Y   |	   |	   |  6  |     |  6  |	   |	 |     |  11 |
X     -------	   -------     -------	   -------     -------
X X   |	6  |	   |  6  |     |  5  |	   |  11 |     |  3  |
X     -------	   -------     -------	   -------     -------
X
X     -------	   -------     -------	   -------     -------
X T   |	   |	   |	 |     |  11 |	   |  11 |     |  3  |	 <- 11 is lost
X     -------	   -------     -------	   -------     -------
X Z   | 11  |	   | 11  |     |   3 |	   |   3 |     |  2  |
X     -------   2   ------- ENT -------	4  ------- ENT -------	 6
X Y   |	3  |	   |  3  |     |   2 |	   |   2 |     |  4  |
X     -------	   -------     -------	   -------     -------
X X   |	3  |	   |  2  |     |   2 |	   |   4 |     |  4  |
X     -------	   -------     -------	   -------     -------
X
X     -------	   -------     -------	   -------     -------
X T   |	3  |	   |   3 |     |  3  |	   |  3  |     |  3  |
X     -------	   -------     -------	   -------     -------
X Z   |	2  |	   |   3 |     |  3  |	   |  3  |     |  3  |
X     -------   +   -------  +  -------	+  -------  *  -------
X Y   |	4  |	   |   2 |     |  3  |	   |  3  |     |  3  |
X     -------	   -------     -------	   -------     -------
X X   |	6  |	   |  10 |     | 12  |	   | 15  |     | 45  |
X     -------	   -------     -------	   -------     -------
X
X
X   you get 45 instead of 165 ... You can notice here the effect of ENTER:
X   it duplicates the number in X into Y, but the next number entered will
X   overwrite it.
X
X   If you had done
X
X   3 ENTER 2 + 4 + 6 +	 6 ENTER 5 + *
X
X   you would have got 165 as expected (it's also shorter to type it this
X   way ...). Note that in practice, this problem rarely arises.
X
X- Operations like sin, cos, hyperbolic sine (got by typing f HYP SIN) modify
X  the number in X.
X
X- There are 20 registers, accessible by RCL/STO 0-9 & RCL/STO . 0-9
X
X- You can choose the display mode with f FIX/SCI/ENG 0-9, and the angular
X  mode with g DEG/RAD/GRAD.
X
X- Statistics use registers 0 to 5 (clear them first with f CLEAR-Sigma).
X  Sigma-+ adds the X,Y pair, you can calculate the mean, sdev, linear
X  regression, estimation & correlation (these last two simultaneously).
X
XProgramming
X-----------
X
X- You enter or leave programming mode by typing g P/R.
X
X- You add instructions by typing them, remove them with <-, and you can move
X  around in the program with SST, g BST & GTO . xxx, where xxx is the
X  program step number.
X
X- Programs are composed of numbered steps, from 1 to 203. When a program is
X  run, these are normally executed sequentially.
X
X- Program steps are displayed as sequences of up to 3 pairs of 2 digits
X  (eventually with a . ) These numbers correspond to the keys pressed to
X  enter the instructions, with the keys numbered starting at 11 for
X  square root, 12 for e^x, ... 16 for CHS, 10 for /, 21 for SST, ...
X  Digits (0 to 9) are represented as themselves. Experiment ! You'll
X  remember them after a while (if you have the patience :-)).
X
X- Gotos: You can enter labels anywhere, with f LBL 0-9 or A-E. GTO 0-9, A-E
X  will transfer control to the step following the label.
X
X- Gosub: GSB 0-9, A-E will call the subroutine starting at the label, the
X  next RTN will return you to the step after the GSB. Subroutines can be
X  nested (upto four deep).
X
X- Tests: the instructions x =<>... 0/y compare X with 0 or Y. if the condition
X  is true, thew next step is executed, otherwise skipped (this step is often
X  a GTO).
X
X- Indirection: The special register I allows indirection. If I contains 5,
X  RCL/STO (i) is equivalent to RCL/STO 5,
X  GSB/GTO I   is equivalent to GTO/GSB 5
X  DSE & ISG drive you mad. Actually, if I = nnnnn.xxxyy
X
X  DSE will do : I = I - yy
X		if I <= xxx skip next step
X
X  ISG	      : I = I + yy
X		if I > xxx skip next step
X
X  If yy = 0, 1 is used.
X
X- Programs are runb out of program mode, either by pressing R/S (program starts
X  at current step) (This will stop a program if it is running), or with
X  GSB 0-9,A-E which will start the program at the apropriate label.
X
XErrors
X------
XError 0 : division by 0, ln 0
XError 1 : Register overflow (when using STO+, STO*, ...)
XError 2 : Statistic error
XError 3 : No such register
XError 4 : No program memory left
XError 5 : Subroutines nested more than 4 deep
XError 6 : No such flag
X
X
XRemark
X------
X
XThere is a lot I haven't said (LastX, STO+-*/, lots of functions, etc, etc)
Xand certainly a few subtleties missed out. Experiment !
X
SHAR_EOF
echo "extracting doc/compile.doc"
sed 's/^X//' << \SHAR_EOF > doc/compile.doc
X- This program is written for Lattice C V5.02. It will need some work to
Xcompile under Manx (long ints, various library routines, prototypes, etc).
X
X- I've slightly modified my ARP include files, specifically, arp_pragmas.h
Xdoesn't replace the dos.library routines if NODOS is defined (add an
X#ifndef NODOS ... #endif around the pragmas from Open to Execute).
X
X- To compile & link, simply:
X
X    lmk    ; At last !
X
XIf you want to use CPR, execute
X
X    lmk -f lmkdebug
X
XI've had a few problems with CPR on this program, it may well crash ... Try
Xusing a different startup module if this happens.
X
X- mail me any questions, at
X
X  gay_d@elma.epfl.ch, or
X  gay_d%elma.epfl.ch@clsepf51.bitnet, or
X  gay_d%elma.epfl.ch@cunyvm.cuny.edu (not checked)
X
X  till the end of august.
X
XDavid Gay
X19 Chemin de la Source
X1296 Coppet
XVaud, Switzerland
X
XVoice: (22)-776 35 81
X
X
SHAR_EOF
echo "extracting hp11.c"
sed 's/^X//' << \SHAR_EOF > hp11.c
X#include "exec/types.h"
X#include "proto/dos.h"
X
X#include "hp11/hp11.h"
X#include "hp11/amiga/amiga.h"
X#include "hp11/io.h"
X#include "hp11/support.h"
X#include "hp11/ins.h"
X#include "hp11/codes.h"
X
X#include <stdlib.h>
X
X/* Values for Cback */
XLONG _stack = 4000;
Xchar *_procname = "HP11C";
XLONG _BackGroundIO = 0;
XLONG _priority = 0;
X
Xstruct Regs hp11r;
Xint running, fast, error, skip;
Xint PC, retStack[MAXSTACK], retCnt;
Xint Flags;
X
Xint quit, on = TRUE; /* Set to false to quit */
X
Xstatic void ExecAction(int act) /* Execute an Action in normal mode */
X{
X   if (act >= IGTO_LINE) { /* GTO .nnn where act = IGTO_LINE + nnn */
X      entering = FALSE; /* Digit entry disabled */
X      GTOLine(act - IGTO_LINE);
X   }
X   else switch (act) {
X      case ISST: SST(); break;
X      case IBST: BST(); break;
X      case IP_R: ProgramEntry(); break;
X      case IUSER: USER(); break;
X      case ICLR_PRGM: RTN(); break; /* Clear Prgm = RTN() in normal mode */
X      case ION: on = !RelKey(); break; /* Allow user to change his mind */
X      case IMEM: MEM(); break;
X      case ICLR_PREFIX: PREFIX(); break;
X      case IBACK:if (entering) EnterNum(-IBACK); /* Correct during digit entry */
X		 else CLX();
X		 break;
X   }
X}
X
Xvoid ExecIns(ins) /* Execute an instruction (normal or run mode) */
Xregister int ins;
X{
X   skip = FALSE;
X
X   if (ins < KCOMPLEX) (*insfunc[ins])(); /* miscellaneous ins */
X   else if (ins < KFLAGS + OCF) SF(ins - (KFLAGS + OSF));
X   else if (ins < KFLAGS + OSET) SF(ins - (KFLAGS + OSF));
X   else if (ins < KFIG) SF(ins - (KFLAGS + OSF));
X   else if (ins < KFIX) EnterNum(ins);
X   else if (ins < KSCI) FIX(ins - KFIX);
X   else if (ins < KENG) SCI(ins - KSCI);
X   else if (ins < KLBL) ENG(ins - KENG);
X   else if (ins < KGTO) ENABLE() /* LBL : ignore, just enable stack */;
X   else if (ins < KGSB) GTO(ins - KGTO);
X   else if (ins < KSTO) GSB(ins - KGSB);
X   else if (ins < KRCL) STO((ins - KSTO) % OPLUS,
X			    (enum StoTypes)((ins - KSTO) / OPLUS));
X      /* compute type of operation to do : there are 21 regs per operation,
X	 + indirect, the codes are sequential : all the stos, all the pluses ...
X	 PLUS is first so it is 22, hence the division to determine the operation */
X   else if (ins < KRCL + 22) RCL(ins - KRCL);
X
X   X = Check(X); Y = Check(Y); /* Check the values in X & Y to conform to HP11
X      limits. The testing is done here to save code space so that all the instructions
X      don't have to include the check */
X}
X
Xstatic BOOL Init(int argc, APTR argv) /* Initialize the calculator, return FALSE if it fails */
X{
X   DEG(); /* Initial state, all other values are zero */
X   FIX(4);
X
X   /* Computer specific intialisation, can load an initial program */
X   return(AmigaInit(argc, argv));
X}
X
Xstatic void CleanUp(void)
X{
X   AmigaCleanUp();
X}
X
X/* Standard version of sleep */
X/* On Amiga, iconifies (special routine in amiga.c */
X/* static void sleep()
X{
X   int key;
X
X   Display("");
X
X   while (!quit && !on) {
X      key = PollKey(TRUE);
X      RelKey();
X      on = key == 30 (* ON *), replace ( with / if you uncomment this;
X   }
X} */
X
Xvoid main(int argc, char **argv)
X{
X   WORD code;
X   enum KeyTypes type;
X
X   if (Init(argc, (APTR)argv))
X      do { /* while (!quit) */
X	 while (on && !quit) { /* Exit when calculator turned off */
X	    Disp();
X	    error = FALSE; overflow = FALSE;
X
X	    if (running) { /* Run mode */
X	       if (PollKey(FALSE) != -1) { /* User pressed a key */
X		  running = FALSE;
X		  RelKey(); /* Wait for him to release it */
X	       }
X	       else {
X		  if (!fast) Wait50(2L); /* Slow calculator down to make it more realistic (wait 2/50 s) */
X		  ExecIns(Prog[PC]); /* Exec current ins */
X		  if (error || overflow) running = FALSE; /* An error occured, halt */
X		  else {
X		     if (skip) PC++; /* A conditional instruction asked for the next
X			instruction to be skipped */
X		     PC++;
X		     while (PC > lastIns) { /* There is an implicit return at the end of the program */
X			RTN();
X			PC++;
X		     }
X		  }
X	       }
X	    }
X	    else { /* normal mode operation */
X	       MenusOn();
X	       EditOn();
X	       type = ReadKey(&code);
X	       EditOff();
X	       switch (type) { /* Read an instruction/action */
X		  case Action:
X		     ExecAction(code); /* Execute corresponding action */
X		     break;
X		  case Instruction:
X		     ExecIns(code); /* Interpret instruction */
X		     break;
X	       }
X	       MenusOff();
X	       RelKey();
X	    }
X
X	 }
X
X	 if (!quit) {
X	    sleep(); /* Wait till woken up */
X	    ENABLE();
X	 }
X      } while (!quit);
X
X   CleanUp();
X}
X
SHAR_EOF
echo "extracting hp11.debug"
sed 's/^X//' << \SHAR_EOF > hp11.debug
XFROM LIB:catch.o,HP11:od/chars.o,HP11:od/indic.o,HP11:od/chip.o,HP11:od/icon.o,*
X     LIB:cbio.o,HP11:od/menus.o,HP11:od/amiga.o,HP11:od/kbd.o,HP11:od/io.o,*
X     HP11:od/prog_codes.o,HP11:od/hp11.o,HP11:od/ins.o,*
X     HP11:od/support.o
XDEFINE @_main=@_tinymain
XLIBRARY lib:lcmr.lib,lib:lcr.lib,lib:amiga.lib
XTO hp11
XBATCH
XVERBOSE
XADDSYM
XPLAIN
XSWIDTH 16
XHWIDTH 16
Xsc
Xsd
XMAP ram:hp11.map,h,x
SHAR_EOF
echo "extracting hp11.h"
sed 's/^X//' << \SHAR_EOF > hp11.h
X#define MAXPROG 203 /* Max number of instructions */
X#define MAXSTACK 4 /* The stack is 4 levels deep */
X
X/* 2 pseudo-keys, which don't exist on the keyboard. They are used to force
X  certain actions, and are generated by certain menu functions */
X#define BRESET 40 /* Return to main program loop. Generated by New, Quit, Open */
X#define BDISPLAY 41 /* Redisplay. Generated by Paste, Radix */
X
X#define NUMKEYS 42
X
Xenum KeyTypes {Action, Instruction, Prefix, Invalid};
X   /* Keyboard sequence are of 2 types: Actions & Instructions. The other types
X     are for internal use in the keyboard routines. Instructions can  be incorporated
X     into programs, while actions are immediately acted upon (eg enter program mode). */
X
Xstruct Regs { /* The status of the HP11. This can be saved */
X   double r[20]; /* The 20 storage registers */
X   double x,y,z,t,l,i; /* The stack & the indirection register */
X   enum {fix, sci, eng} mode; /* display mode */
X   double _minfix; /* 10^-Digits in fixed mode to determine smallest displayable value */
X   enum {deg, rad, grad} angles; /* Trigonometric mode */
X   int digits; /* Number of digits for display mode */
X   int user; /* User mode flags */
X   WORD prog[MAXPROG + 1]; /* The program */
X   int lastins; /* Last instruction used */
X};
X
Xextern struct Regs hp11r; /* the current internal state */
Xextern int on, quit, running, fast, error, skip; /* various flags indicating the run mode ... */
Xextern int PC, retStack[MAXSTACK], retCnt; /* PC & return stack (4 levels) */
Xextern int Flags; /* the current flags */
X
X/* Defines to easily access components of internal state */
X#define X (hp11r.x)
X#define Y (hp11r.y)
X#define Z (hp11r.z)
X#define T (hp11r.t)
X#define L (hp11r.l)
X#define I (hp11r.i)
X#define R (hp11r.r)
X#define Mode (hp11r.mode)
X#define Angles (hp11r.angles)
X#define Digits (hp11r.digits)
X#define User (hp11r.user)
X#define Prog (hp11r.prog)
X#define lastIns (hp11r.lastins)
X#define minfix (hp11r._minfix)
X
Xextern void ExecIns(int);
X
SHAR_EOF
echo "extracting hp11.lnk"
sed 's/^X//' << \SHAR_EOF > hp11.lnk
XFROM LIB:cback.o,HP11:o/chars.o,HP11:o/indic.o,HP11:o/chip.o,HP11:o/icon.o,*
X     LIB:cbio.o,HP11:o/menus.o,HP11:o/amiga.o,HP11:o/kbd.o,HP11:o/io.o,*
X     HP11:o/prog_codes.o,HP11:o/hp11.o,HP11:o/ins.o,*
X     HP11:o/support.o
XDEFINE @_main=@_tinymain
XLIBRARY lib:lcmr.lib,lib:lcr.lib,lib:lc.lib,lib:amiga.lib
XTO hp11
XBATCH
XVERBOSE
XNODEBUG
XPLAIN
XSWIDTH 16
XHWIDTH 16
XMAP ram:hp11.map,h,x
Xsc
X
X
SHAR_EOF
echo "extracting hp11.pic.uu"
sed 's/^X//' << \SHAR_EOF > hp11.pic.uu
X
Xbegin 644 hp11.pic
XM_____________________________________________________H-55555N
XM5555555555555555555555555555555555555555555558*#JJJJJJJJJJJJ)
XMJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJN"@U555555555555555555N
XM55555555555555555555555555555555@H.JJJJJJJJJJJJJJJJJJJJJJJJJ;
XMJJJJJJJJJJJJJJJJJJJJJJJJJX*#55555555555555555555555555555555<
XM5555555555555555556"@ZJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJM
XMJJJJJJJJJJJK@H-555555555555555555555555555555555555555555555*
XM555558*#JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJN"8
XM@U555555___________________________]5555555555555555@H.JJJJJ^
XMJ____________________________JJJJJJJJJJJJJJJJX*#555555?\````Z
XM`````````````````````?]5555555555555556"@ZJJJJJK^```````````,
XM``````````````#^JJJJJJJJJH````JK@H-555555_@`````````````````!
XM````````_U555555554````%58*#JJJJJJOX````````````````````````\
XM`/ZJJJJJJJJJC_K_RJN"@U555557^`````````````````````````#_5555'
XM555550_Z/\55@H.JJJJJJ_@`````````````````````````_JJJJJJJJJJ/Y
XMY`_*JX*#555555?X`````````````````````````/]555555555#^0/Q56"`
XM@ZJJJJJK^`````````````````````````#^JJJJJJJJJH_*Y\JK@H-55555`
XM5_@`````````````````````````_U555555554/RI?%58*#JJJJJJOX````[
XM`````````````````````/ZJJJJJJJJJC\JGRJN"@U555557^```````````!
XM``````````````#_5555555550_AS\55@H.JJJJJJ_@`````````````````[
XM````````_JJJJJJJJJJ/X0_*JX*#555555?X`````````````````````````
XM`/]555555555#_D_Q56"@ZJJJJJK^`````````````````````````#^JJJJ_
XMJJJJJH_]?\JK@H-555555_@`````````````````````````_U555555554`B
XM```%58*#JJJJJJOX`````````````````````````/ZJJJJJJJJJC___RJN"2
XM@U555557^`````````````````````````#_5555555550XXX<55@H.JJJJJF
XMJ_@`````````````````````````_JJJJJJJJJJ,,,#*JX*#555555?X````@
XM`````````````````````/]555555555#SS/Q56"@ZJJJJJK^```````````6
XM``````````````#^JJJJJJJJJH\\P,JK@H-555555_@`````````````````,
XM````````_U555555554//.'%58*#JJJJJJOX````````````````````````H
XM`/ZJJJJJJJJJC___RJN"@U555557^`````````````````````````#_5555,
XM555550````55@H.JJJJJJ_@`````````````````````````_JJJJJJJJJJ`B
XM```*JX*#555555?X`````````````````````````/]5555555555555556":
XM@ZJJJJJK^`````````````````````````#^JJJJJJJJJJJJJJJK@H-55555>
XM5_P````````````````````````!_U5555555555555558*#JJJJJJO_____C
XM______________________ZJJJJJJJJJJJJJJJN"@U555555____________,
XM_______________]5555555555555555@H.JJJJJJJJJJJJJJJJJJJJJJJJJ1
XMJJJJJJJJJJJJJJJJJJJJJJJJJX*#55555555555555555555555555555555<
XM5555555555555555556"@ZJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJM
XMJJJJJJJJJJJK@H-555555555555555555555555555555555555555555555*
XM555558*#JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJN"8
XM@U55555555555555555555555555555555555555555555555555@H.JJJJJ.
XMJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJX*"````````````9
XM``````````````````````````````````````""@@``````````````````$
XM````````````````````````````````@H(`````````````````````````$
XM`````````````````````````(*"````````````````````````````````$
XM``````````````````""@G______________________________________G
XM___________\@H)_____________________________________________6
XM_____(*"8`````````````````````````````````````````````````R"K
XM@F`````````````````````````````````````````````````,@H)@`!P`N
XM``#@```'````.````>```!\```\D0``<Y``#TF```!2`#(*"8``B````D```]
XM"(```"0```$````*```((H``(10``AJ0`"1B@`R"@F``(@```.````@````DF
XM```!X```"@``#R$``!D$``/6@``8@8`,@H)@`#X```"0```(@```)````0``5
XM``H```@B@``%%``"$K``&&"`#(*"8``B````X```!P```#@```'@```*```(M
XM)$``..0``])@`"21``R"@F``````````````````````````````````````:
XM````````8@`,@H)@'__^`/__\`?__X`___P!___@#___`'__^`/__\`?__X`:
XM___P#(*"8!```@"`"A`$`"B`(`4$`00`(`@``0!```@"``!`$``"`(``$`R"'
XM@F`0?\(`@`00!"80@"$B!`$,$"`(R3D`0/@(`@'`0!`<`@"`8!`,@H)@$$!"R
XM`('*$`1I*(`A)00!!"`@"2E!`$`0"`("($`0(@(`@``0#(*"8!%*`@""(!`$U
XM*0"`(.`$`01`(`D/,0!`(`@"`<!`$!X"`('X$`R"@F`0A`(`@\`0!"D`@"`@%
XM!`$$BB`)*0D`0$`(`@(@0!`"`@"``!`,@H)@$(H"`((`$`0F`(`A(`0!`00@Q
XM",EQ`$!`"`(!P$`0/`(`@&`0#(*"8!```@"!P!`$``"`(,`$`0`*(`@``0!`Z
XM``@"``!`$``"`(``$`R"@F`?__X`___P!___@#___`'__^`/__\`?__X`___(
XMP!___@#___`,@H)@$`&"`(0D$`2#&(`@P@0!"&(@",XY`$YYB`)QG$`1G.(`1
XM@!$0#(*"8!`"0@"$-!`$A*"`(,0$`11D(`DI00!)0D@"2E)`$E*2`))BD`R""
XM@F`02((`A"P0!(2L@"`(!`$4""`)+C$`27H(`G)20!(<D@",@I`,@H)@$#'"C
XM`(0D$`2$I(`@$P0!(A,@">D)`$E"R`)+TD`2TI(`C(*0#(*"8!`P`@"'I!`$C
XM\QB`(",$`3XC(`DN<0!.>8@"2EQ`$9+B`))A$`R"@F`02`(`@``0!```@"``Y
XM!`$``"`(``$`0``(`@``0!```@"`$!`,@H)@#__\`'__X`/__P`?__@`___`7
XM!__^`#__\`'__X`/__P`?__@#(*"8```````````````````````````````)
XM``````````````````R"@F``````````````````````````````````````P
XM```````````,@H)@````````````````````````````````````````````P
XM````#(*"8`````````````````````````````````````````````````R"^
XM@F`````````````````````````````````````````````````,@H)@````2
XM````````$0``(@``````````````````````````````#(*"8```````````C
XM`B2``$D```````````````````````````````R"@F`"'(``$HN``E\@@`!!<
XM```!P````X```!'``''>``$YP```0D`,@H)@`A*``!)20`&")(``20```(``X
XM`!)``!+X@`!*$``!0B``$C%`#(*"8`(<@``>(X`!@"2``$D```"```#[@``,@
XM$(``2=X``3(```P(P`R"@F`"$H``$B(``D@D@`!)````@```$D``#$"``$A0C
XM``$*8``,"(`,@H)@`]SP`!(B```?%0``*@```<````)``!+YP`!SG@`!<<``A
XM$C$`#(*"8```````````"```````````````````0`````````````!"``R"+
XM@F`?__X`___P!___@#___`'__^`/__\`?__X`___P!___@#___`,@H)@$``":
XM`(``$`0``(`@``0!```@"``!`$``"`(``$`0``(`@``0#(*"8!'.X@".<Q`$4
XM>22`(QCD`3F1(`GO10!`"`@"`\!`$`X"`(&8$`R"@F`2$$(`D220!($T@"2E=
XM!`$262`)""D`0!@(`@(`0!`0`@"`\!`,@H)@$8Q"`)`DD`1Q+(`D),0!$E4@8
XM">\1`$`H"`(#@$`0'`(`@&`0#(*"8!!"0@"3))`$"22`)*0D`1/3(`D(*0!`%
XM?`@"`$!`$!("`(#P$`R"@F`3G$(`CB,0!/$D@",9Q`$242`)[T4`0`@(`@.`[
XM0!`,`@"!F!`,@H)@$``"`(``$`0``(`@``0!```@"``!`$``"`(``$`0``(`'
XM@``0#(*"8!___@#___`'__^`/__\`?__X`___P!___@#___`'__^`/__\`R"$
XM@F`3CN(`JK!0!'4B@"(C%`%R2*`(`<$`0=X(`@SP0!!YP@"`01`,@H)@$E!"]
XM`*JK4`2%JH`E5%0!)6J@"`DA`$(0"`(2@$`00$(`DC*0#(*"8!.,0@"Y,%`$I
XM96*`)%(4`258H`A]P0!!G@@"$/!`$'F"`(P*D`R"@F`20D(`J2`0!!4@@"51=
XM!`$G2"`("0$`0%`(`A*`0!!!`@","I`,@H)@$YQ"`*D@$`3E((`B)@0!)4@@H
XM"`$!`$.0"`(,@$`00`(`DC$0#(*"8!```@"``!`$``"`(``$`0``(`@``0!`\
XM``@"``!`$`$"`(!`$`R"@F`/__P`?__@`___`!__^`#__\`'__X`/__P`?__+
XM@`___`!__^`,@H)@````````````````````````````````````````````8
XM````#(*"8`````````````D<F`````````````````````````````````R"[
XM@F`````````````5$50````````````````````````````````,@H)@````,
XM!_______D1U8_______\````````````````````````#(*"8`````0`````S
XM`!41U```````!`````````````````````````R"@F`````$```````)W50`L
XM``````0````````````````````````,@H)@````!``````````````````$\
XM````````````````````````#(*"8`..\``!\``!F)(`!SS``S.ZH`<22@`.1
XM````%$F``'$X```B0`R"@F`"4(```)```55>``2A(`*J(D`$JU\`"5%``)1ZW
XM``)*I``E^4`,@H)@`XSP``!```&9$@`'/0`#,[I`!RK*``XP@`/<20`/<J0`C
XM&$#`#(*"8`("@```D``!%=(`!*%@`BHB0`2Z7P`()4``E$B``DND`!GX@`R"-
XM@F`"'/```?```122``2\P`(KHJ`$JDH`"$@``!5+``!*N``D@0`,@H)@````V
XM``````````````````````````"```````````````(`#(*"8!___@#___`'#
XM__^`/__\`?__X`___P!___@#___`'__^`/__\`R"@F`0``(`@``0!```@"``;
XM!`$``"`(``$`0``(`@``0!```@"``!`,@H)@$X)R`(QW$`0X8(`E"20!`0`@T
XM"``!`$`0"`(#@$`0'`(`@``0#(*"8!)$@@"2A)`$)&"`)7RD`0,`(`@``0!`,
XM,`@"`$!`$`("`(``$`R"@F`3A&(`D&<0!#A@@"((9`$'^"`('P$`0!`(`@"`:
XM0!`<`@"!^!`,@H)@$D@2`)84D`0D\(`E(20!`P`@"!`!`$`0"`(!`$`0`@(`[
XM@``0#(*"8!)(X@",YQ`$)&"`)7S$`0$`(`@?`0!`$`@"`\!`$!P"`(``$`R"?
XM@F`0``(`@``0!```@"`@!`$``"`($`$`0``(`@``0!```@"``!`,@H)@'__^^
XM`/__\`?__X`___P!___@"!\!`'__^`/__\`?__X`___P#(*"8!.$X@"<Z)`$V
XM.&"`)R7$`1D(H`@``0!&``@"`)!`$&<R`(`0D`R"@F`22)(`DDR0!"3P@"2U7
XM)`$E!2`($0$`25%(`@200!)42@"2_5`,@H)@$XCB`)Q*D`0X8(`G+20!(0(@+
XM"!D!`$@PB`(^\$`?5T(`C"%0#(*"8!(0D@"229`$)&"`)*4D`24%(`@5`0!)]
XM)4@"!)!`$E1:`(S]4`R"@F`2$)(`DDB0!"1@@"2EQ`$9Z*`($P$`1D@(`@"0E
XM0!!G,@"20)`,@H)@$``"`(``$`0``(`@``0!```@"!$!`$"`"`(``$`0``(`<
XM@``0#(*"8`___`!__^`#__\`'__X`/__P`@``0`___`!__^`#__\`'__X`R"I
XM@F`````````````````````````('P$````````````````````,@H)@````Z
XM````````````````````"`0!````````````````````#(*"8```````````]
XM``````````````@$`0````````````````````R"@F``````````````````]
XM```````(!`$````````````````````,@H)@````````````````````````]
XM"`0!```````<````````````#(*"8`````````````````````````@``0``B
XM````(@````````````R"@F`````````````````````````('P$```(`````\
XM```````````,@H)@```````````````=Q&``IWN`"!`!```"```2(``"!P``I
XM``)`#(*"8```````````````$2J0`*A"0`@?`0`!(@``"AP``@2``!+Y0`R"W
XM@F```````````````!W*@`"F>X`($`$``,(```80``('```,`,`,@H)@````@
XM```````````1+I``H4)`"!\!``#````$4``"!(``#/B`#(*"8```````````H
XM````$2I@`$YZ0`@``0`!(@``")```]2@`!(!``R"@F``````````````````A
XM```````('@$``````!```````````@`,@H)@#__\`/__\`?__X`___P!___@_
XM"!$!`'__^`/__\`?__X`___P#(*"8!```@#___`$``"`(``$`0``(`@>`0!`[
XM``@"``!`$``"`(``$`R"@F`0``(`_Y_P!```@".YQ`$XR"`($@$`0'`(`@``6
XM0!#X@@"`(!`,@H)@$.(B`/\/\`0``(`D$B0!)2@@"!$!`$"("`(``$`02((`.
XM@"`0#(*"8!$3(@#_/_`$``"`(Q(D`3D((`@``0!`B`@"`8!`$"/B`(#X$`R":
XM@F`1$J(`_A_P!```@""2)`$E*"`(``$`0(@(`@&`0!!(@@"`(!`,@H)@$1*B7
XM`/\_\`0``(`G$<0!),\@"``!`$!P"`(``$`0^((`@"`0#(*"8!$28@#_/_`$F
XM``"`(``$`0``(`@``0!```@"``!`$``"`(``$`R"@F`1$B(`___P!_C_@#__9
XM_`'__^`/__\`?__X`___P!___@#___`,@H)@$1(B`/__\`0``(`B1<0!)>D@J
XM"AW5`$!X"`(!P$`0^`(`@`$0#(*"8!$2(@#___`$``"`(F2$`3T/(`H@B0!`K
XM``@"`@!`$$@"`)+ZD`R"@F`0XB(`___P!```@")4A`$EZ2`*&(D`0$@(`@&`?
XM0!`CX@",`I`,@H)@$``"`/__\`0``(`B3(0!)0D@"@2)`$`P"`(`0$`02`(`3
XMC/J0#(*"8!```@#___`$``"`(D2$`27I(`NXE0!`,`@"`X!`$/@"`)(!$`R"S
XM@F`0``(`___P!```@"``!`$``"`(``$`0$@(`@``0!```@"``!`,@H)@#__\B
XM`'__X`/__P`?__@`___`!__^`#__\`'__X`/__P`?__@#(*"8```````````\
XM``````````````````````````````````````R"@F``````````````````P
XM```````````````````````````````,@H)@````````````````````````P
XM````````````````````````#(*"8```````````````````````````````P
XM``````````````````R"@F``````````````````````````````````````P
XM```````````,@H)P`````````````````````````````````````````````
XM````'(*"?_Q"?))`^?/@#PX<1''CP_____________________________R"T
XM@G_\0D"20(!`@`B1(DB)$B/____________________________\@H)__$)`Z
XMDD"`0(`(D2!0B1(C_____________________________(*"?_Q^?%1`^$"`%
XM#Q$@8(GB(_____________________________R"@G_\0D!40(!`@`@?(%#YZ
XM(B/____________________________\@H)__$)`5$"`0(`($2)(B1(C_____
XM_________________________(*"/_Q"?"A\^$"`"!$<1(D3P___________3
XM__________________B"@@``````````````````````````````````````O
XM````````````@H(`````````````````````````````````````````````$
XM`````(*"``````````````````````````````````````````````````""&
XM_____________________________________________________@``````7
XM``````````````````````````````````````````````!\JJJJJJJJJJJJV
XMJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJI\?%555555555555555555@
XM55555555555555555555555555555554?'RJJJJJJJJJJJJJJJJJJJJJJJJJ-
XMJJJJJJJJJJJJJJJJJJJJJJJJJGQ\55555555555555555555555555555555.
XM5555555555555555551\?*JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ?
XMJJJJJJJJJJJJ?'Q555555555555555555555555555555555555555555555\
XM55555'Q\JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJI\#
XM?%55555555555555555555555555555555555555555555555554?'RJJJJJY
XMJ@```````````````````````````JJJJJJJJJJJJJJJJGQ\5555550`````$
XM``````````````````````%5555555555555551\?*JJJJJH`____________
XM______________X`JJJJJJJJJJJJJJJJ?'Q555555`?_________________&
XM________`5555555555____U5'Q\JJJJJJ@'________________________1
XM_P"JJJJJJJJJ____^JI\?%555554!_________________________\!5555:
XM555557`%`#54?'RJJJJJJ`?_________________________`*JJJJJJJJKPD
XM!<`ZJGQ\5555550'_________________________P%555555555<!OP-51\1
XM?*JJJJJH!_________________________\`JJJJJJJJJO`;\#JJ?'Q555551
XM5`?_________________________`5555555555P-1@U5'Q\JJJJJJ@'____N
XM_____________________P"JJJJJJJJJ\#5H.JI\?%555554!___________F
XM______________\!5555555557`U6#54?'RJJJJJJ`?_________________1
XM________`*JJJJJJJJKP'C`ZJGQ\5555550'________________________7
XM_P%555555555<![P-51\?*JJJJJH!_________________________\`JJJJ4
XMJJJJJO`&P#JJ?'Q555555`?_________________________`5555555555P:
XM`H`U5'Q\JJJJJJ@'_________________________P"JJJJJJJJJ____^JI\*
XM?%555554!_________________________\!5555555557```#54?'RJJJJJ%
XMJ`?_________________________`*JJJJJJJJKQQQXZJGQ\5555550'____@
XM_____________________P%555555555<\\_-51\?*JJJJJH!___________5
XM______________\`JJJJJJJJJO##,#JJ?'Q555555`?_________________\
XM________`5555555555PPS\U5'Q\JJJJJJ@'________________________&
XM_P"JJJJJJJJJ\,,>.JI\?%555554!_________________________\!5555N
XM555557```#54?'RJJJJJJ`?_________________________`*JJJJJJJJK_N
XM___ZJGQ\5555550'_________________________P%555555555?___]51\,
XM?*JJJJJH!_________________________\`JJJJJJJJJJJJJJJJ?'Q55555$
XM5`?_________________________`5555555555555555'Q\JJJJJJ@#____,
XM_____________________@"JJJJJJJJJJJJJJJI\?%555554````````````'
XM```````````````!5555555555555554?'RJJJJJJ@``````````````````&
XM`````````JJJJJJJJJJJJJJJJGQ\55555555555555555555555555555555J
XM5555555555555555551\?*JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ?
XMJJJJJJJJJJJJ?'Q555555555555555555555555555555555555555555555\
XM55555'Q\JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJI\#
XM?%55555555555555555555555555555555555555555555555554?'RJJJJJY
XMJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJGQ\555555555555)
XM555555555555555555555555555555555555551\??__________________+
XM________________________________?'W_________________________.
XM_________________________WQ]________________________________.
XM__________________]\??______________________________________.
XM____________?'V`````````````````````````````````````````````P
XM`````WQ]@`````````````````````````````````````````````````-\[
XM?9_________________________________________________S?'V?____`
XM____________________________________________\WQ]G___________B
XM______________________________________-\?9__________________B
XM_______________________________S?'V?________________________B
XM________________________\WQ]G_______________________________B
XM__________________-\?9______________________________________B
XM___________S?'V?____________________________________________B
XM____\WQ]G^```?\```_X``!_P``#_@``'_```/^```?\```_X``!_P`0#_-\M
XM?9_O__W_?_7O^__7?]_Z^_[[_]_W__[_O__W_?__O^___?]__^_S?'V?[X`]4
XM_W_[[_O9[W_>W?O^\^_?]S;&_[\']_W^/[_OX_W_?Y_O\WQ]G^^_O?]^->_[T
XMEM=_WMK[_OO?W_;6OO^_[_?]_=^_[]W]_W__[_-\?9_NM?W_?=_O^];_?]\?3
XM^_[[O]_V\,[_O]_W_?X_O^_A_?]^!^_S?'V?[WO]_WP_[_O6_W_?W_O^^W7?#
XM]M;V_[^_]_W]W[_O_?W_?__O\WQ]G^]U_?]]_^_[V?]_WM_[_O[[W_<VCO^_2
XMO_?]_C^_[\/]_W^?[_-\?9_O__W_?C_O^___?]\_^_[_]=_W__[_O__W_?__0
XMO^___?]__^_S?'V?X``!_P``#_@``'_```/^```?\```_X``!_P``#_@``'_X
XM```/\WQ]G^```?\```_X``!_P``#_@``'_```/^```?\```_X``!_P``#_-\O
XM?9_@``'_```/^```?\```_X``!_P``#_@``'_```/^```?\```_S?'V?X``!N
XM_P``#_@``'_```/^```?\```_X``!_P``#_@``'_```/\WQ]G^```?\```_XW
XM``!_P``#_@``'_```/^```?\```_X``!_P``#_-\?9_@``'_```/^```?\``P
XM`_X``!_P``#_@``'_```/^```?\```_S?'V?X``!_P``#_@``'_```/^```?1
XM\```_X``!_P``#_@``'_```/\WQ]G_```_^``!_\``#_X``'_P``/_@``?_`4
XM``_^``!_\``#_X``'_-\?9______________________________________,
XM___________S?'V?____________________________________________B
XM____\WQ]G_________________________________________________-\3
XM?9_________________________________________________S?'V?____`
XM____________________________________________\WQ]G___________B
XM______________________________________-\?9__________________B
XM_______________________________S?'V?________________________B
XM________________________\WQ]G_______________________________B
XM__________________-\?9______________________________________B
XM___________S?'V?____________________________________________B
XM____\WQ]G_________________________________________________-\3
XM?9_________________________________________________S?'V?X``!D
XM_P``#_@``'_```/^```?\```_X``!_P``#_@``'_```/\WQ]G^___?]__^_[B
XM__]_W__[_O__W_?__O^___?]__^_[__]_W__[_-\?9_N,1W_<8SO^X;;?]SGZ
XM&_[&;M_V$+K_O_?W_?P_O^_Q_?]^9^_S?'V?[>^]_V[;;_M^RW_;6OO^[:;?]
XM]O?6_[_G]_W]_[_O[_W_?P_O\WQ]G^YSO?]OVV_[CM-_V]L[_NVJW_80[O^_!
XMU_?]_'^_[^/]_W^?[_-\?9_OO;W_;-MO^_;;?]M;V_[L+-_V]];_OX/W_?^_0
XMO^_M_?]_#^_S?'V?[&.]_W'<[_L.VW_<YCO^[:[?]A"Z_[_W]_W\?[_O\_W__
XM?F?O\WQ]G^___?]__^_[__]_W__[_O__W_?__O^___?]__^_[__]_W__[_-\*
XM?9_@``'_```/^```?\```_X``!_P``#_@``'_```/^```?\```_S?'V?X``!N
XM_P``#_@``'_```/^```?\```_X``!_P``#_@``'_```/\WQ]G^```?\```_XW
XM``!_P``#_@``'_```/^```?\```_X``!_P``#_-\?9_@``'_```/^```?\``P
XM`_X``!_P``#_@``'_```/^```?\```_S?'V?X``!_P``#_@``'_```/^```?1
XM\```_X``!_P``#_@``'_```/\WQ]G^```?\```_X``!_P``#_@``'_```/^`@
XM``?\```_X``!_P``#_-\?9_@``'_```/^```?\```_X``!_P``#_@``'_```T
XM/^```?\```_S?'V?\``#_X``'_P``/_@``?_```_^``!_\``#_X``'_P``/_@
XM@``?\WQ]G_________________________________________________-\U
XM?9_________________________________________________S?'V?____`
XM____________________________________________\WQ]G___________B
XM______________________________________-\?9__________________B
XM_______________________________S?'V?________________________B
XM________________________\WQ]G_______________________________B
XM__________________-\?9______________________________________B
XM___________S?'V?____________________________________________B
XM____\WQ]G_________________________________________________-\3
XM?9_________________________________________________S?'V?____`
XM____________________________________________\WQ]G___________B
XM______________________________________-\?9_@``'_```/^```?\``5
XM`_X``!_P``#_@``'_```/^```?\```_S?'V?[__]_W__[_O__W_?__O^___?.
XM]__^_[__]_W__[_O__W_?__O\WQ]G^Q]C?]SB._[QY]_VO;;_O[_W_?__O^_Z
XM[_?]_'^_[^/]_W__[_-\?9_MNWW_;7MO^]N??]J#6_[\_]_W__[_O\_W_?^_5
XMO^_]_?]__^_S?'V?['N=_V^8[_O'GW_=]YO^^`??]^#^_[_O]_W_?[_OX_W_$
XM?@?O\WQ]G^VW[?]IZV_[VP]_VM[;_OS_W_?O_O^_[_?]_O^_[_W]_W__[_-\F
XM?9_MMQW_<QCO^]N??]J#._[^_]_WX/[_O^_W_?P_O^_C_?]__^_S?'V?[__]=
XM_W__[_O__W_?W_O^___?]^_^_[__]_W__[_O__W_?__O\WQ]G^```?\```_X3
XM``!_P``#_@``'_?@_O^```?\```_X``!_P``#_-\?9_@``'_```/^```?\``5
XM`_X``!_W__[_@``'_```/^```?\```_S?'V?X``!_P``#_@``'_```/^```?5
XM]^[^_X``!_P``#_@``'_```/\WQ]G^```?\```_X``!_P``#_@``'_?F_O^`^
XM``?\```_X``!_P``#_-\?9_@``'_```/^```?\```_X``!_WZO[_@``'_```C
XM/^```?\```_S?'V?X``!_P``#_@``'_```/^```?]^S^_X``!_P``#_@``'_!
XM```/\WQ]G^```?\```_X``!_P``#_@``'_?N_O^```?\```_X``!_P``#_-\B
XM?9_P``/_@``?_```_^``!_\``#_W__[_P``/_@``?_```_^``!_S?'V?____E
XM____________________]^#^____________________\WQ]G___________Z
XM______________?[_O____________________-\?9__________________5
XM_______W^_[____________________S?'V?________________________5
XM]_O^____________________\WQ]G_________________________?[_O__(
XM__________________-\?9_________________________W__[_________9
XM___________S?'V?________________________]^#^________________Z
XM____\WQ]G_________________________?O_O____________________-\Z
XM?9_________________________WX/[____________________S?'V?____8
XM____________________]^_^____________________\WQ]G___________)
XM______________?@_O____________________-\?9__________________Z
XM_______W__[____________________S?'V?________________________9
XM]^'^____________________\WQ]G_```_\```_X``!_P``#_@``'_?N_O^`,
XM``?\```_X``!_P``#_-\?9_O__W_?__O^`:`?]__^_[__]_WX?[_O__W_?__)
XMO^___?]__^_S?'V?[__]_W__[_@/@'_<1CO^QS??]^W^_[^/]_W__[_O!WW_(
XM?]_O\WQ]G^\=W?]__^_X#8!_V^W;_MK7W_?N_O^_=_?]__^_[[=]_W_?[_-\)
XM?9_N[-W_?__O^`^`?]SMV_[&]]_W__[_OW?W_?Y_O^_<'?]_!^_S?'V?[NU=[
XM_W__[_@'@'_?;=O^VM??]__^_[]W]_W^?[_OMWW_?]_O\WQ]G^[M7?]__^_X.
XM`8!_V.X[_MLPW_?__O^_C_?]__^_[P=]_W_?[_-\?9_N[9W_?__O^`^`?]__M
XM^_[__]_W__[_O__W_?__O^___?]__^_S?'V?[NW=_P``#_@'`'_```/^```?^
XM\```_X``!_P``#_@``'_```/\WQ]G^[MW?]__^_X``!_P``#_@``'_```/^`5
XM``?\```_X``!_P``#_-\?9_N[=W_?__O^```?\```_X``!_P``#_@``'_```I
XM/^```?\```_S?'V?[QW=_W__[_@``'_```/^```?\```_X``!_P``#_@``'_V
XM```/\WQ]G^___?]__^_X``!_P``#_@``'_```/^```?\```_X``!_P``#_-\7
XM?9_O__W_?__O^```?\```_X``!_P``#_@``'_```/^```?\```_S?'V?[__]@
XM_W__[_@``'_```/^```?\```_X``!_P``#_@``'_```/\WQ]G_```_^``!_\[
XM``#_X``'_P``/_@``?_```_^``!_\``#_X``'_-\?9__________________W
XM_______________________________S?'V?________________________B
XM________________________\WQ]G_______________________________B
XM__________________-\?9______________________________________B
XM___________S?'V?____________________________________________B
XM____\WQ]C________________________________________________^-\S
XM?8`#O8-MOP8,'_#QX[N.'#P````````````````````````````#?'V``[V_]
XM;;]_OW_W;MVW=NW<`````````````````````````````WQ]@`.]OVV_?[]_%
XM]V[?KW;MW`````````````````````````````-\?8`#@8.KOP>_?_#NWY]VV
XM'=P````````````````````````````#?'V``[V_J[]_OW_WX-^O!MW<````_
XM`````````````````````````WQ]@`.]OZN_?[]_]^[=MW;MW```````````:
XM``````````````````-\?<`#O8/7@P>_?_?NX[MV[#P`````````````````_
XM```````````'?'W_____________________________________________>
XM_____WQ]__________________________________________________]\+
XM??__________________________________________________?```````3
XC``````````````````````````````````````````````#__
X``
Xend
Xsize 14480
SHAR_EOF
echo "End of archive 2 (of 3)"
# if you want to concatenate archives, remove anything after this line
exit