Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.sys.pdp10 > #9966

Re: Command line parsing and MACRO-20

From Rich Alderson <news@alderson.users.panix.com>
Newsgroups alt.sys.pdp10
Subject Re: Command line parsing and MACRO-20
Date 2026-08-28 20:59 -0400
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <mdd33vxaghq.fsf@panix5.panix.com> (permalink)
References <87fqzyjexe.fsf@atr2.ath.cx>

Show all headers | View raw


Besides the RSCAN% and COMND% JSYi, you also need to take a look at PRARG%,
which is how programs pass commands and data down a chain (as in the COMPILE,
LOAD, DEBUG, and EXECUTE commands).

jayjwa <jayjwa@atr2.ath.cx.invalid> writes:

> In MACRO-20, how do I get at the command line? I know it's possible because
> DIRECT and TYPE parse the command line. I've completed one of the two texts
> on assembly (the Longo one) and I haven't seen how to do it. In the Gorin
> text, there's something about COMND but it's buried under piles of macros.
> The explaination for COMND in the Monitor Ref Call Manual made me physically
> ill (it's over 20 pages, give or take). Maybe that's how to do it; maybe it's
> not. It can't believe it's that insanely complex. I only need to parse what
> would be *argv[] in C (and maybe argc). I don't want to head down a rabbit
> hole if there's no rabbit to be found.

To quote from Ralph's example chapter on the COMND% JSYS:

    The prologue that we have just been through is representative of the
    complexity of the COMND JSYS itself; [MCRM] takes more than twenty pages to
    describe all the features of the COMND JSYS.  The complexity of the COMND
    JSYS is due to its wide range of function.  We strive to perfect the
    interface that a program presents to its users.  Interactions between
    programs and people are quite complex:  the general mechanism by which
    these interactions take place is implemented by a large and complex program
    that needs more than a superficial explanation.

> Can someone show a simple example of parsing the command line? Something like:

> @echo hello
> hello

The text of the ECHO command in EXEC.EXE reads

    ;ECHO ...LINE TO BE ECHOED BACK...
    .ECHO:: NOISE (TO THE TERMINAL)
            LINEX <Text to be echoed>
             CMERRX			;ERROR
            CONFIRM
            HRROI A,ATMBUF		;GET BUFFER POINTER BACK
            ETYPE <%1M%%>
            RET

but that's a bunch of hairy macros, isn't it?

You keep wanting TOPS-20 to be Unix.  It isn't.

-- 
Rich Alderson					  news@alderson.users.panix.com
      Audendum est, et veritas investiganda; quam etiamsi non assequamur,
	  omnino tamen proprius, quam nunc sumus, ad eam perveniemus.
									--Galen

Back to alt.sys.pdp10 | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Command line parsing and MACRO-20 jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-08-28 14:08 -0400
  Re: Command line parsing and MACRO-20 scott@slp53.sl.home (Scott Lurndal) - 2026-08-28 18:35 +0000
    Re: Command line parsing and MACRO-20 jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-08-29 12:19 -0400
      Re: Command line parsing and MACRO-20 Rich Alderson <news@alderson.users.panix.com> - 2026-08-29 17:51 -0400
  Re: Command line parsing and MACRO-20 Rich Alderson <news@alderson.users.panix.com> - 2026-08-28 20:59 -0400
    Re: Command line parsing and MACRO-20 jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-08-29 12:37 -0400
      Re: Command line parsing and MACRO-20 Rich Alderson <news@alderson.users.panix.com> - 2026-08-29 18:04 -0400
        Re: Command line parsing and MACRO-20 jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-08-30 11:38 -0400
          Re: Command line parsing and MACRO-20 Rich Alderson <news@alderson.users.panix.com> - 2026-08-30 22:18 -0400

csiph-web