Subject: Bug fix in pal.c cross assembler

From: "Douglas W. Jones" <[email-masked]>
Date: Wed, 4 Jan 95 10:43:08 CST

Nils M. Holm <[email-masked]> has reported a small bug
in my PAL cross assembler written in C.  The FTPable version has been
fixed.  You can get it from:

  ftp.cs.uiowa.edu:/pub/jones/pdp8/pal.c.Z

and it's indexed in my www page for the PDP-8:

  http://www.cs.uiowa.edu/~jones/pdp8/

Here are the details of the change, as provided by Nils Holm:

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
file pal.c, function onepass():
887     if (line[lexstart] == '*') {
888             int newlc;
889             nextlex(); /* skip * (set origin symbol) */
890             newlc = getexpr() & 07777;
891             if ((newlc & 07600) != (lc & 07600)) { /* we changed pages */
                                             ^^^^^
892                     putcp();
893             }
894             lc = newlc - reloc;
896             if (rimflag != 1) { /* put out origin if not in rim mode */
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The leading zero at the second 07600 was missing what caused the condition
to to become true in some cases where it shouldn't.  The line numbers may
vary a little, because these are from Nils's version, and he made some other
changes for his own purposes.
					Doug Jones
					[email-masked]