I’m sure Lars or someone else will jump in here with many more details, but I thought it might be good to point out a few things about your message:
These are not “PDP-10 Midas assembler system calls”, really. The .open, .lose, and .logout you see there are called UUOs. These are undefined processor opcodes that, when executed, cause a trap to a UUO handler, and are executed by it. See the file SYSDOC;UUOS > for a list of all of these and their function and parameters. Some of these UUOs are actually handled by ITS as system calls. The .call UUO, for example, will make a system call to ITS. See the file SYSDOC;.CALLS > for a list of all system calls and their function and parameters.
MIDAS is an assembler. There could be other assemblers. And there are compilers (lisp, muddle, C, etc.). All of these produce programs in machine code, which can make these calls. So these UUOs are not really related to MIDAS — EXCEPT that MIDAS, as a convenience knows how to translate symbolic UUOs (e.g. .logout) to a processor opcode — a UUO opcode, so that a trap will be taken upon executing them.
Note also that a UUO need not be implemented in ITS or DDT. Any program can set up a UUO handler and can handle UUOs as well. This allows you to define your own “opcodes” and “handlers”.
It doesn’t “run” .lose (nor any of the other UUOs). It executes the “undefined” opcode (the UUO opcode), which invokes the UUO handler, which performs the function associated with the mnemonic. The documentation on the .lose UUO starts out this way (see SYSDOC;UUOS >):
.LOSE lossage-code report lossage
The job's Program Counter is set to the address of the
.LOSE minus one, the job's .VAL user variable is set
to the new PC,,the magic bits, and the
job is given a %PILOS interrupt. If the job does not
enable this interrupt, and it's superior is DDT, a
helpful error message will be printed.
The magic bits are documented in DDT ORDER.
The most useful ones are 0 for a random error,
1000 to ask DDT to type the error message corresponding
to the most recent system call error return, and
1400 if DDT should attempt to print the names of
the file that the call was opening/referring to.
You asked about the parameter to the .lose UUO. That is the lossage-code (above). Read the further documentation in SYSDOC;UUOS > for details on lossage codes, such as %LSFIL.
You asked about the parameter to the .logout UUO. Here is the doc (again from SYSDOC;UUOS >):
.LOGOUT log out
The executing job and all direct inferiors are killed,
providing that it is the top-level job of its job tree.
All resources used by such jobs are freed. If the job
tree was console-controlled, the system job will print
a "console free" message on the freed console.
If the executing job is not top-level, .LOGOUT with zero
in the AC field merely returns without skipping.
(An inferior job may not commit suicide without the consent
of its superior.) .LOGOUT with a nonzero AC field will
cause a fatal %PIBRK interrupt which will inform the superior
that the job wants to be killed. If the superior is DDT,
it will kill the job. Here is how a program should exit:
SKIPE DEBUG ;optional debugging aid:
.VALUE ; job hangs if being debugged
.LOGOUT 1, ;log out or be killed.
Note the discussion about the UUO parameter (which is really just the accumulator (AC) field of the instruction. 0 means don’t skip if it fails. Non-zero means that it will cause the job to get an interrupt that will let the superior, DDT, kill it.
If you say “.logout”, it is the same as “.logout 0,”. In general, if you don’t specify an accumulator value in a PDP-10 machine instruction, it will be set to 0.
You asked about 7-bit ascii versus 6-bit. Both ASCII and SIXBIT are supported. The byte pointer (loaded by moving 440700 into the LF or A (which becomes the byte pointer to the string starting at the HELLO label) basically specifies a mask and size for “bytes”. The 07 there is specifying 7-bit (I think). Other byte sizes are possible depending on the byte pointer. See the LDB and ILDB instructions in the processor manual.
And yes, there are many way to code this. Using the .logout UUO, for example, can be replaced by making a .call to the SIXBIT/LOGOUT/ ITS system call. In general, UUOs that invoke system calls are “deprecated” (although still very much in use), and use of .CALL is recommended.
To see how you might change this program to open a file, look at the OPEN system call (preferred over the .open UUO) and read about how to specify files.