The Modcomp II was a 16-bit minicomputer circa 1970. As well as in FORTRAN IV, the Modcomp family could be programmed in assembly language, with syntax like this excerpt from Kermit for Modcomp:

          HZS,POSIT                      *
          STM,2       $+5               NO - ATTACHED FILE
          LDI,2       POSUFT            ASSIGN TO THE ATTACHED FILE
          REX,#A                         *
          DFC         $$                 *

I am unsure of the meaning of the symbols $ and $$ in this excerpt. I think that $ most likely means "address of the instruction being assembled"; I will present my reasoning below. However, other than that $$ is 16-bits (one word) long, I have no idea what it means.

Q: What are the meanings of the symbols $ and $$ in Modcomp assembly language, especially as used for the Modcomp II minicomputer?

Why I think that $ probably means "Address of current instruction":

      STM,2       $+5               NO - ATTACHED FILE

This two-word STM instruction stores a register into a memory location that will be an argument to a system call.


This two-word LDI instruction loads a constant into a register.

      REX,#A                         *

This one word instruction performs a system call.

      DFC         $$                 *

This "define constant(s)" assembler directive reserves (and possibly initializes--I don't know) one word that I presume is used as an argument to the system call.

In order for the STM instruction to store a register into the word reserved by the DFC, $ would have to mean "the address of the beginning of the STM instruction, so that $+5 would refer to the address of the DFC itself.

  • I concur on $ (and it means that in other assemblers). My wild guess is that $$ means -1. If you're near the Computer History Museum they seem to have a copy of the assembler manual: computerhistory.org/collections/catalog/102664736 – George Phillips Sep 15 '16 at 4:46
  • Alas, that manual and more were on the internet at one point. They are no longer. – Wayne Conrad Sep 15 '16 at 5:18
  • 1
    Yes, $ is definitely the current instruction. In the code, all three usages of $$ are overwritten before there are used, so it's difficult to guess what it's supposed to mean (maybe just a "don't care" value). If you really want to know (and not just understand the kermit code), you need the manual. Email the Computer History Museum and ask? (I suppose you have already seen the two manuals on bitsavers). – dirkt Sep 15 '16 at 7:29
  • Wild guess: if "$" is the current address, "$$" could be the load (ORG) address. Is atm the only thing that comes to mind that might actually be useful – tofro Sep 15 '16 at 8:04
  • 2
    Welcome to Retrocomputing, great first question! – JAL Sep 15 '16 at 14:35

I programmed in Modcomp assembly for over 15 years.

DFC is "DeFine Constant". For instance, DFC 1234 would result in the 16-bit decimal value 1234 being generated next output location.

$$ is simply a placeholder in the Modcomp assembler. It equates to zero. Modcomp's program and data space were the same, and the program space was not protected, so it was common to store things on the fly into the code space. $$ was a programmer's way of indicating that the contents of a location were unknown at assembly time, but would be set at runtime by previously executed code.

In the original code snippet, register 2 contains the CAN-code (Compressed AlphaNumeric) name for a file or device. The code stores it inline after the REX,#A instruction.

Then, it loads the address of a UFT (User File Table) into register 2 and executes the REX,#A instruction.

REX #A is a Request EXecutive instruction, causing a file assignment to be made for a UFT referenced by register 2, and making the assignment to the device or file named by the CAN-code constant following the instruction.

| improve this answer | |
  • 1
    This is an excellent first answer. Welcome to rc, and thanks! – Wayne Conrad Jan 22 '19 at 21:20
  • MODCOMP machines should not be confused with the Computer Technology Limited Modular One, which appeared a couple of years earlier on the other side of the Atlantic. – John Dallman Jan 22 '19 at 22:45

According to the paper MODC2 Procedures for Assembly of MODCOMP-ll. Programs Using the Sigma 5 Assembler, from J.W. Layiand, special symbols $ and $$ refers to the values of the location couonters. The text uses the plural, inferring that there may be more than one location counter.

On the other hand, another paper, An INTEL 8080 cross assembler for the MODCOMP 2 minicomputer clarifies the role of $: it's the program counter. The text refers to "program counter + 1" but this is due to program counter being incremented during a macro expansion to allow 8080 nmemonics to be written in MODCOMP assembler.

I can assume that one of them ( $ ) may refer to the program counter, as we all know, and the other one ( $$ ) to the location counter, which doesn't have to be the same as the program counter. The location counter could be the address in memory where the program is first assembled. The GENS-3 assembler, for instance, allowed an assembler program to have an ORG directive that might collide with the assembler itself, or even ROM. All you had to do is to add assembler directives to store the generated machine code in the spare RAM area. In such circunstances, the final address for a instruction ( $ ) could be different from the address it is initially stored in ( $$ ). This makes sense for programs that allow relocation, so a part of them copies a block of code from the initially stored RAM area to its execution destination.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.