Who has a PAL-8 pointy hat?

32 views
Skip to first unread message

William Cattey

unread,
Oct 9, 2025, 5:55:46 PM (9 days ago) Oct 9
to PiDP-8
In my work to create the EAE emulation for U/W FOCAL there were some things I wanted to be able to do all in the same .PA file.  I got some of them mostly working, but it's still kind of messy.  I'm beginning this thread in the hope that a reader of this group will have more insight into how to overcome the problems I had, so I can make this implementation cleaner.

Issues:
  1. OS/8 command line hard limit and blow out.
  2. Detection of stand-alone vs. modular assembly.
  3. Hiding conditionally assembled code.
These issue affect my development of the 8NFIO.PA module for U/W FOCAL V4E.
The current version is attached to this note.

On to the issues:

1. OS/8 command line hard limit and blow out.

My current command line to build U/W FOCAL and to create a listing and a bitmap is:

pal8 U.BN,RKB1:U.LS<RKA1:16KCPR.PA,12KFNS.PA,8XFIO.PA,8XFPP.PA,16KLIB.PA /K

I name the output files "U" because longer names make the line too long, and the OS/8 Keyboard monitor aborts the command.

The OS/8 Command decoder says I should be able to have 3 things before the greater than sign and nine things after the greater than sign, but that simply doesn't happen.

I have a state machine where I can interact with the command decoder to feed PAL8 multiple lines, but I haven't been able to craft the right set of lines.

To make my implementation cleaner, I'd like to add one more source file that consists of the definitions to enable/disable the in-line test routines, and stand-alone vs. modular utilization.

Q1: What is the proper way to specify a long set of input and output files to PAL8?

2. Detection of stand-alone vs. modular assembly.

My 8NFIO.PA has two modes of operation:  When compiled "stand-alone" you start at 0200, and it performs multiply and divides that are stored in a table, and compares the result of the emulation against what the EAE returns.

My current code to detect these two uses sorta kinda works, but I think is actually incorrect.

U/W FOCAL, in the module 16KCPR.PA fills in a bunch of page zero stuff, including the location I use for the virtual MQ:

FIELD 1 /PROCESSOR FIELD
PAGE 0

P134, "\&177 /SCOPE INPUT LIST
BELL, "G&277 /MODIFY " "
P337, "_ /COMMAND " "
CFF, FF
CLF, LF
CCR, CR
TRACE, RO /SEARCH CHAR & TRACE SWITCH
FPNT /ADDRESS OF F.P. INTERPRETER

/AUTO-INDEX REGISTERS

SAVMQ, 0 /INTERRUPT REGISTERS
SAVAC, 0

That module, as shown above, appears on my assembly line before 8NFIO.PA,
so I have this conditional to detect if 8NFIO.PA is being assembled as
part of U/W FOCAL:

IFNDEF SAVMQ <
*10
SAVMQ, 0

TESTME=1

IFNDEF EMTEST <
EMTEST=1 / WE USE EMTEST STAND ALONE
>
>

The idea is that, since SAVMQ hasn't been defined, we define it ourselves, and
turn on the assembler-conditional TESTME for stand-alone operation and
EMTEST to turn on the testing of the emulator against the EAE.

Note that the EMTEST code is used BOTH by stand-alone operation and runtime
testing when embedded in U/W FOCAL.

Here's my problem. I see that I define a constant 7764 (-14 octal) to count
the steps through emulation of MUY and DVI. U/W FOCAL already has such a
constant, M14 that it defines.

However whenever I add the definition of M14 in the above block that should
get assembled for stand-alone operation, the actual constant doesn't get
established.

In the source listing of stand-alone 8NFIO, I see this:

             IFNDEF SAVMQ <
                     *10
             SAVMQ,  0

             TESTME=1

             IFNDEF EMTEST <
             EMTEST=1        / WE USE EMTEST STAND ALONE
             >
             >

I would expect to see:

00010 0000 SAVMQ, 0

So I think there is something funky going on here. The only reason why
SAVMQ actually works is that I always DCA into location 10. But the code
I expect would define my stand-alone M14 never actually defines it.

I'd very much like to save a precious word, and reuse FOCAL's M14 if I could.

Q2: What's going on here? How do I most correctly conditionalize use of
SAVMQ and M14 inside FOCAL, but define it for myself stand-alone?

3. Hiding conditionally assembled code.

I would like to hide the stand-alone and run-time tests from the U/W FOCAL
assembly listing if they're inactive. But somehow I've not been able to
come up with the right placement of XLIST directives to do it.

Q3: Can someone help me figure out where XLIST goes to hide stuff that
is conditionalized out?

Thanks in advance for the help!

-Bill



8NFIO.PA

William Cattey

unread,
Oct 10, 2025, 10:02:48 PM (8 days ago) Oct 10
to PiDP-8
Clarification of issue #1:
Typing the PAL8 command into CCL with OS/8 V3D with KBM V3Q and CCL V1F, and all patches applied like this:

.PAL8 UWFTST.BN,RKB1:UWTST.LS<RKA1:16KCPR.PA,12KFNS.PA,8NFIO.PA,8NFPP.PA,1
1 NOT FOUND

as I start to type, "16KLIB.PA", when I type the "1", it executes the line and says, "1 NOT FOUND"

When I try to type the long line into KBM V3T and CCL V3A, I get to a point where the line is grabbed, executed and complained about:

.PAL8 UWFTST.BN,RKB1:UWFTST.LS<RKA1:16KCPR.PA,12KFNS.PA,8NFIO.PA,8NFPP.PA,
%CAN'T REMEMBER
IC  7400
...

And then a ton of IC errors as it tries to assemble the like it's jumped on.


William Cattey

unread,
Oct 10, 2025, 10:08:52 PM (8 days ago) Oct 10
to PiDP-8
Further clarification: If I do "R PAL8" and use the command decoder, I get a few more chars but it still blows out:

.R PAL8
*UWFTST.BN,RKB1:UWFTST.LS<RKA1:16KCPR.PA,12KFNS.PA,8NFIO.PA,8NFPP.PA,16KLIB.
ILLEGAL SYNTAX

William Cattey

unread,
Oct 10, 2025, 10:42:26 PM (8 days ago) Oct 10
to PiDP-8
I found an answer to my question #2. It was complicated by the presence of XLIST in 8NFIO already.  But once I found that
I got things tuned up a bit more cleanly.

The OS/8 Language Reference Manual AA-H609A-TA gave me the clue:

To prevent PAL8 from printing nonsatisfied condition assembly statements in the listing, use the following solution,employing complementary conditionals:

IFNDEF LTAPE <XLIST>
IFDEF LTAPE <
    HERE
    GOES
    THE
    CODE>
IFNDEF LTAPE <XLIST>
Reply all
Reply to author
Forward
0 new messages