Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-06 Thread Johnny Billquist
Ah! I obviously didn't pay enough attention. Looking now at your 
original post, you did indeed define the macro without the dot, so 
obviously you would not find a macro that started with a dot.


Doh!

Johnny

On 2016-02-05 23:38, Will Senn wrote:

I should have been more clear. I was inconsistent in my use of the dot.
If I had used it everywhere, it would have been fine, to Timothe's point
about it being a symbol. I didn't, so instead of fixing it in that
direction, I chose the recommended path of not using dot for
user-defined symbols.

You're right that the macro expansion didn't show anything because the
symbol was undefined. I'll have to try the other list options later. I
was able to get my textbook example (pascal like macros) working, so I'm
good for the time being.

By the way, other than it's reliance on macros for I/O in the first 7
chapters, the book, "The Digital Way: Macro-11 Assembly Language
Programming (PDP-11", by J. F. Peters, III, is pretty awesome. it covers
PDP-11 architecture and includes information on how to work with
assembly language using RT11, RSTS, and RSX-11 tools.

At the end of the day, my issues are a bit of pilot error combined with
a huge helping of ignorance about the underlying systems that is only
slowly being overcome. One day, I'm using RT11 (cuz it's simpler,
generally), the next I'm using RSX-11 cuz it's got more software),
slowly, it's all beginning to make sense ( which is slightly ironic,
because really, I'm only trying to learn the PDP-11 well enough to
understand Unix internals :), talk about the long way 'round, but fun,
if sometimes a bit exasperating! ).

Thanks,

Will

On 2/5/16 3:59 PM, Johnny Billquist wrote:

He provided the listing in the original post.
He had one error on .MCALL line, and one on the .TIN line

U on .MCALL, and UQ on .TIN, if I remember right.

I also find it extremely strange that it would not be possible to
start a user defined macro with '.', but if it works without, that's a
strong indication that the dot was the problem.

Or else Will was not actually using a dot, but only something that
looked like one, or something else funny...?

As for listing the macro expansions in the list file, that can be
interesting, but if the symbol is considered undefined, you're not
going to see anything more.

Johnny

On 2016-02-05 22:41, Timothe Litt wrote:

Too many loose ends to declare victory.

The RT-11 librarian doesn't have a list command for macros; they were
second class citizens.  It's available on other DEC OS's librians, so I
must have crossed a memory.

Names with a '.'  or '$' are reserved to DEC.  But I don't think this
should impact how the search is conducted.  I'm pretty sure I had
private libraries with .foo names (legal, as I was in DEC :-)

In .FOO, '.' is part of the symbol name.

See
http://bitsavers.informatik.uni-stuttgart.de/www.computer.museum.uq.edu.au/RT-11/AA-5075A-TC%20PDP-11%20MACRO-11%20Language%20Reference%20Manual.pdf

Page 3-6; also chapter 7, section 7.8.

http://bitsavers.trailing-edge.com/pdf/dec/pdp11/rt11/v5.6_Aug91/AA-PDU0A-TC_RT-11_Commands_Manual_Aug91.pdf


describes the DCL:
e.g. EXECUTE MYLIB/LIBRARY+C.MAC/LIST/OBJECT

I don't suppose that you got it trouble for explicitly specifying .MLB?
That would be strange.  But DCL for RT11 came after I stopped using
RT11.

You didn't provide the .LST file, which is where the real error should
turn up.
Also,  .list MD, MC and ME will often shed some light on these sorts of
issues.  (Of these, ME is the only one not defaulted on)



On 05-Feb-16 16:05, Will Senn wrote:

I got it working :).

However, It doesn't look like macro files can be listed - from the
system utilities manual:
The .MACRO directive produces the entries in the library directory
(macro names). LIBR does not maintain a directory listing file for
macro libraries; you can print the ASCII input file to list the macros
in the library.

I did a bunch more reading and figured out that the issue was around
inconsistent/improper use of the leading dot. Interestingly, no
diagnostic I could find was helpful in tracking this down. Y'alls tips
and hints were much more useful.

So, here's how it went down (don't use a leading dot for user-defined
macros, but if you do use them, use them everywhere):

.type et2.mac
.TITLE  ETTYIN
.MCALL.TTYOUT,TIN

START:MOV#BUFFER,R1
CLRR2
INLOOP:TIN(R1)+
INCR2
CMPB#12,R0
BNEINLOOP
MOV#BUFFER,R1
OUTLOOP:.TTYOUT(R1)+
DECR2
BEQSTART
BROUTLOOP
BUFFER:.BLKW64.
.ENDSTART
.

.type tin.mac
.MACROTINCHAR
EMT^O340
BCS.-2.
.IF NB 
.IF DIF ,R0
MOVBR0,CHAR
.ENDC
.ENDC
.ENDM

.lib/mac/c tin tin

.macro et2/list/cross+tin.mlb/lib

.link et2

.run et2
THIS IS A TEST
THIS IS A TEST
^C

.

I really appreciate y'alls assistance.

Thanks,

Will

On 2/5/16 12:19 PM, Timothe Litt wrote:

Try the obvious:

lib/mac/list tin.mlb

I don't remem

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Rhialto
On Fri 05 Feb 2016 at 19:18:58 +0100, Johnny Billquist wrote:
> I'm sure there is a way to list what macros exist in the library file. Could
> you check that your macro really exists there. Also extract it, to see that
> it indeed looks correct.

Note that there is the Unix version of Macro-11 that I worked on.
So you could transfer some library files and let it extract them.

My main goal was to make it more fully correspond to the RSX version
where the original was more RT-11 oriented (but probably also had some
outright bugs). But I added an option to extract object libraries; it
could do macro libraries already.

See https://github.com/Rhialto/macro11 .

While working on this I noticed that the file format had some subtle
differences between RT11 and RSX. You can find the differences by
looking at the mlb.c file versus mlb-rsx.c. The main difference was I
think that RSX version has length indicators in the directory blocks
were the RT11 version seemingly has not.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl-- 'this bath is too hot.'


signature.asc
Description: PGP signature
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Will Senn
I should have been more clear. I was inconsistent in my use of the dot. 
If I had used it everywhere, it would have been fine, to Timothe's point 
about it being a symbol. I didn't, so instead of fixing it in that 
direction, I chose the recommended path of not using dot for 
user-defined symbols.


You're right that the macro expansion didn't show anything because the 
symbol was undefined. I'll have to try the other list options later. I 
was able to get my textbook example (pascal like macros) working, so I'm 
good for the time being.


By the way, other than it's reliance on macros for I/O in the first 7 
chapters, the book, "The Digital Way: Macro-11 Assembly Language 
Programming (PDP-11", by J. F. Peters, III, is pretty awesome. it covers 
PDP-11 architecture and includes information on how to work with 
assembly language using RT11, RSTS, and RSX-11 tools.


At the end of the day, my issues are a bit of pilot error combined with 
a huge helping of ignorance about the underlying systems that is only 
slowly being overcome. One day, I'm using RT11 (cuz it's simpler, 
generally), the next I'm using RSX-11 cuz it's got more software), 
slowly, it's all beginning to make sense ( which is slightly ironic, 
because really, I'm only trying to learn the PDP-11 well enough to 
understand Unix internals :), talk about the long way 'round, but fun, 
if sometimes a bit exasperating! ).


Thanks,

Will

On 2/5/16 3:59 PM, Johnny Billquist wrote:

He provided the listing in the original post.
He had one error on .MCALL line, and one on the .TIN line

U on .MCALL, and UQ on .TIN, if I remember right.

I also find it extremely strange that it would not be possible to 
start a user defined macro with '.', but if it works without, that's a 
strong indication that the dot was the problem.


Or else Will was not actually using a dot, but only something that 
looked like one, or something else funny...?


As for listing the macro expansions in the list file, that can be 
interesting, but if the symbol is considered undefined, you're not 
going to see anything more.


Johnny

On 2016-02-05 22:41, Timothe Litt wrote:

Too many loose ends to declare victory.

The RT-11 librarian doesn't have a list command for macros; they were
second class citizens.  It's available on other DEC OS's librians, so I
must have crossed a memory.

Names with a '.'  or '$' are reserved to DEC.  But I don't think this
should impact how the search is conducted.  I'm pretty sure I had
private libraries with .foo names (legal, as I was in DEC :-)

In .FOO, '.' is part of the symbol name.

See
http://bitsavers.informatik.uni-stuttgart.de/www.computer.museum.uq.edu.au/RT-11/AA-5075A-TC%20PDP-11%20MACRO-11%20Language%20Reference%20Manual.pdf 


Page 3-6; also chapter 7, section 7.8.

http://bitsavers.trailing-edge.com/pdf/dec/pdp11/rt11/v5.6_Aug91/AA-PDU0A-TC_RT-11_Commands_Manual_Aug91.pdf 



describes the DCL:
e.g. EXECUTE MYLIB/LIBRARY+C.MAC/LIST/OBJECT

I don't suppose that you got it trouble for explicitly specifying .MLB?
That would be strange.  But DCL for RT11 came after I stopped using 
RT11.


You didn't provide the .LST file, which is where the real error should
turn up.
Also,  .list MD, MC and ME will often shed some light on these sorts of
issues.  (Of these, ME is the only one not defaulted on)



On 05-Feb-16 16:05, Will Senn wrote:

I got it working :).

However, It doesn't look like macro files can be listed - from the
system utilities manual:
The .MACRO directive produces the entries in the library directory
(macro names). LIBR does not maintain a directory listing file for
macro libraries; you can print the ASCII input file to list the macros
in the library.

I did a bunch more reading and figured out that the issue was around
inconsistent/improper use of the leading dot. Interestingly, no
diagnostic I could find was helpful in tracking this down. Y'alls tips
and hints were much more useful.

So, here's how it went down (don't use a leading dot for user-defined
macros, but if you do use them, use them everywhere):

.type et2.mac
.TITLE  ETTYIN
.MCALL.TTYOUT,TIN

START:MOV#BUFFER,R1
CLRR2
INLOOP:TIN(R1)+
INCR2
CMPB#12,R0
BNEINLOOP
MOV#BUFFER,R1
OUTLOOP:.TTYOUT(R1)+
DECR2
BEQSTART
BROUTLOOP
BUFFER:.BLKW64.
.ENDSTART
.

.type tin.mac
.MACROTINCHAR
EMT^O340
BCS.-2.
.IF NB 
.IF DIF ,R0
MOVBR0,CHAR
.ENDC
.ENDC
.ENDM

.lib/mac/c tin tin

.macro et2/list/cross+tin.mlb/lib

.link et2

.run et2
THIS IS A TEST
THIS IS A TEST
^C

.

I really appreciate y'alls assistance.

Thanks,

Will

On 2/5/16 12:19 PM, Timothe Litt wrote:

Try the obvious:

lib/mac/list tin.mlb

I don't remember exactly, but I think there's a /detail or /names or
/list=names that will list the macro names in the library.

That will at least determine if MAC *should* find the macro.

On 05-Feb-16 13:05, Will Senn wrote:

On 2/5/

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Johnny Billquist

He provided the listing in the original post.
He had one error on .MCALL line, and one on the .TIN line

U on .MCALL, and UQ on .TIN, if I remember right.

I also find it extremely strange that it would not be possible to start 
a user defined macro with '.', but if it works without, that's a strong 
indication that the dot was the problem.


Or else Will was not actually using a dot, but only something that 
looked like one, or something else funny...?


As for listing the macro expansions in the list file, that can be 
interesting, but if the symbol is considered undefined, you're not going 
to see anything more.


Johnny

On 2016-02-05 22:41, Timothe Litt wrote:

Too many loose ends to declare victory.

The RT-11 librarian doesn't have a list command for macros; they were
second class citizens.  It's available on other DEC OS's librians, so I
must have crossed a memory.

Names with a '.'  or '$' are reserved to DEC.  But I don't think this
should impact how the search is conducted.  I'm pretty sure I had
private libraries with .foo names (legal, as I was in DEC :-)

In .FOO, '.' is part of the symbol name.

See
http://bitsavers.informatik.uni-stuttgart.de/www.computer.museum.uq.edu.au/RT-11/AA-5075A-TC%20PDP-11%20MACRO-11%20Language%20Reference%20Manual.pdf
Page 3-6; also chapter 7, section 7.8.

http://bitsavers.trailing-edge.com/pdf/dec/pdp11/rt11/v5.6_Aug91/AA-PDU0A-TC_RT-11_Commands_Manual_Aug91.pdf

describes the DCL:
e.g. EXECUTE MYLIB/LIBRARY+C.MAC/LIST/OBJECT

I don't suppose that you got it trouble for explicitly specifying .MLB?
That would be strange.  But DCL for RT11 came after I stopped using RT11.

You didn't provide the .LST file, which is where the real error should
turn up.
Also,  .list MD, MC and ME will often shed some light on these sorts of
issues.  (Of these, ME is the only one not defaulted on)



On 05-Feb-16 16:05, Will Senn wrote:

I got it working :).

However, It doesn't look like macro files can be listed - from the
system utilities manual:
The .MACRO directive produces the entries in the library directory
(macro names). LIBR does not maintain a directory listing file for
macro libraries; you can print the ASCII input file to list the macros
in the library.

I did a bunch more reading and figured out that the issue was around
inconsistent/improper use of the leading dot. Interestingly, no
diagnostic I could find was helpful in tracking this down. Y'alls tips
and hints were much more useful.

So, here's how it went down (don't use a leading dot for user-defined
macros, but if you do use them, use them everywhere):

.type et2.mac
.TITLE  ETTYIN
.MCALL.TTYOUT,TIN

START:MOV#BUFFER,R1
CLRR2
INLOOP:TIN(R1)+
INCR2
CMPB#12,R0
BNEINLOOP
MOV#BUFFER,R1
OUTLOOP:.TTYOUT(R1)+
DECR2
BEQSTART
BROUTLOOP
BUFFER:.BLKW64.
.ENDSTART
.

.type tin.mac
.MACROTINCHAR
EMT^O340
BCS.-2.
.IF NB 
.IF DIF ,R0
MOVBR0,CHAR
.ENDC
.ENDC
.ENDM

.lib/mac/c tin tin

.macro et2/list/cross+tin.mlb/lib

.link et2

.run et2
THIS IS A TEST
THIS IS A TEST
^C

.

I really appreciate y'alls assistance.

Thanks,

Will

On 2/5/16 12:19 PM, Timothe Litt wrote:

Try the obvious:

lib/mac/list tin.mlb

I don't remember exactly, but I think there's a /detail or /names or
/list=names that will list the macro names in the library.

That will at least determine if MAC *should* find the macro.

On 05-Feb-16 13:05, Will Senn wrote:

On 2/5/16 10:20 AM, Paul Koning wrote:

On Feb 5, 2016, at 10:48 AM, Will Senn  wrote:

All,

A couple of questions:

...
lib/mac/c tin tin
macro et2/list/cross+tin.mlb/lib
?MACRO-E-Errors detected:  2
DK:ET2,DK:ET2/C=DK:ET2,DK:TIN.SML

Try putting the macro library earlier in the command line.  I believe
MACRO processes command arguments as it encounters them, so here
you're asking it to assemble ET2 before you've given it the macro
library it needs to understand the .MCALL.

 paul


I tried the command with the filespecs switched with the same result:
.macro tin.MLB/lib+et2/list/cross
?MACRO-E-Errors detected:  2
DK:TIN,DK:ET2/C=DK:TIN.MLB/M,DK:ET2

And then I ran it via run macro:
.run macro
*ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
?MACRO-E-Errors detected:  2
ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
*

And then I edited the macro file to include a LIBRARY directive:
 .TITLE  ETTYIN
 .LIBRARY /TIN.MLB/
 .MCALL.TTYOUT,.TIN

START:MOV#BUFFER,R1
 CLRR2
INLOOP:.TIN(R1)+
 INCR2
 CMPB#12,R0
 BNEINLOOP
 MOV#BUFFER,R1
OUTLOOP:.TTYOUT(R1)+
 DECR2
 BEQSTART
 BROUTLOOP
BUFFER:.BLKW64.
 .ENDSTART

and recompiled:
.macro et2/list/cross
?MACRO-E-Errors detected:  2
DK:ET2,DK:ET2/C=DK:ET2

It looks to me like it is finding the file, but not "seeing" the macro
definition?

Thanks,

Will

___
Simh mailing lis

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Timothe Litt
Too many loose ends to declare victory.

The RT-11 librarian doesn't have a list command for macros; they were
second class citizens.  It's available on other DEC OS's librians, so I
must have crossed a memory.

Names with a '.'  or '$' are reserved to DEC.  But I don't think this
should impact how the search is conducted.  I'm pretty sure I had
private libraries with .foo names (legal, as I was in DEC :-)

In .FOO, '.' is part of the symbol name.

See
http://bitsavers.informatik.uni-stuttgart.de/www.computer.museum.uq.edu.au/RT-11/AA-5075A-TC%20PDP-11%20MACRO-11%20Language%20Reference%20Manual.pdf
 
Page 3-6; also chapter 7, section 7.8.

http://bitsavers.trailing-edge.com/pdf/dec/pdp11/rt11/v5.6_Aug91/AA-PDU0A-TC_RT-11_Commands_Manual_Aug91.pdf

describes the DCL:
e.g. EXECUTE MYLIB/LIBRARY+C.MAC/LIST/OBJECT

I don't suppose that you got it trouble for explicitly specifying .MLB? 
That would be strange.  But DCL for RT11 came after I stopped using RT11.

You didn't provide the .LST file, which is where the real error should
turn up.
Also,  .list MD, MC and ME will often shed some light on these sorts of
issues.  (Of these, ME is the only one not defaulted on)



On 05-Feb-16 16:05, Will Senn wrote:
> I got it working :).
>
> However, It doesn't look like macro files can be listed - from the
> system utilities manual:
> The .MACRO directive produces the entries in the library directory
> (macro names). LIBR does not maintain a directory listing file for
> macro libraries; you can print the ASCII input file to list the macros
> in the library.
>
> I did a bunch more reading and figured out that the issue was around
> inconsistent/improper use of the leading dot. Interestingly, no
> diagnostic I could find was helpful in tracking this down. Y'alls tips
> and hints were much more useful.
>
> So, here's how it went down (don't use a leading dot for user-defined
> macros, but if you do use them, use them everywhere):
>
> .type et2.mac
> .TITLE  ETTYIN
> .MCALL.TTYOUT,TIN
>
> START:MOV#BUFFER,R1
> CLRR2
> INLOOP:TIN(R1)+
> INCR2
> CMPB#12,R0
> BNEINLOOP
> MOV#BUFFER,R1
> OUTLOOP:.TTYOUT(R1)+
> DECR2
> BEQSTART
> BROUTLOOP
> BUFFER:.BLKW64.
> .ENDSTART
> .
>
> .type tin.mac
> .MACROTINCHAR
> EMT^O340
> BCS.-2.
> .IF NB 
> .IF DIF ,R0
> MOVBR0,CHAR
> .ENDC
> .ENDC
> .ENDM
>
> .lib/mac/c tin tin
>
> .macro et2/list/cross+tin.mlb/lib
>
> .link et2
>
> .run et2
> THIS IS A TEST
> THIS IS A TEST
> ^C
>
> .
>
> I really appreciate y'alls assistance.
>
> Thanks,
>
> Will
>
> On 2/5/16 12:19 PM, Timothe Litt wrote:
>> Try the obvious:
>>
>> lib/mac/list tin.mlb
>>
>> I don't remember exactly, but I think there's a /detail or /names or
>> /list=names that will list the macro names in the library.
>>
>> That will at least determine if MAC *should* find the macro.
>>
>> On 05-Feb-16 13:05, Will Senn wrote:
>>> On 2/5/16 10:20 AM, Paul Koning wrote:
> On Feb 5, 2016, at 10:48 AM, Will Senn  wrote:
>
> All,
>
> A couple of questions:
>
> ...
> lib/mac/c tin tin
> macro et2/list/cross+tin.mlb/lib
> ?MACRO-E-Errors detected:  2
> DK:ET2,DK:ET2/C=DK:ET2,DK:TIN.SML
 Try putting the macro library earlier in the command line.  I believe
 MACRO processes command arguments as it encounters them, so here
 you're asking it to assemble ET2 before you've given it the macro
 library it needs to understand the .MCALL.

 paul

>>> I tried the command with the filespecs switched with the same result:
>>> .macro tin.MLB/lib+et2/list/cross
>>> ?MACRO-E-Errors detected:  2
>>> DK:TIN,DK:ET2/C=DK:TIN.MLB/M,DK:ET2
>>>
>>> And then I ran it via run macro:
>>> .run macro
>>> *ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
>>> ?MACRO-E-Errors detected:  2
>>> ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
>>> *
>>>
>>> And then I edited the macro file to include a LIBRARY directive:
>>> .TITLE  ETTYIN
>>> .LIBRARY /TIN.MLB/
>>> .MCALL.TTYOUT,.TIN
>>>
>>> START:MOV#BUFFER,R1
>>> CLRR2
>>> INLOOP:.TIN(R1)+
>>> INCR2
>>> CMPB#12,R0
>>> BNEINLOOP
>>> MOV#BUFFER,R1
>>> OUTLOOP:.TTYOUT(R1)+
>>> DECR2
>>> BEQSTART
>>> BROUTLOOP
>>> BUFFER:.BLKW64.
>>> .ENDSTART
>>>
>>> and recompiled:
>>> .macro et2/list/cross
>>> ?MACRO-E-Errors detected:  2
>>> DK:ET2,DK:ET2/C=DK:ET2
>>>
>>> It looks to me like it is finding the file, but not "seeing" the macro
>>> definition?
>>>
>>> Thanks,
>>>
>>> Will
>>>
>>> ___
>>> Simh mailing list
>>> Simh@trailing-edge.com
>>> http://mailman.trailing-edge.com/mailman/listinfo/simh
>>
>>
>> ___
>> Simh mailing list
>> Simh@trailing-edge.com
>> http://mailman.trailing-edge.com/mailman/listinfo/simh
>
>
>
> _

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Johnny Billquist

On 2016-02-05 22:05, Will Senn wrote:

I got it working :).


Excellent.


However, It doesn't look like macro files can be listed - from the
system utilities manual:
The .MACRO directive produces the entries in the library directory
(macro names). LIBR does not maintain a directory listing file for macro
libraries; you can print the ASCII input file to list the macros in the
library.


What? That sounds just weird. And that would be very different from the 
librarian utility in RSX, which definitely can list such things.

Oh well.


I did a bunch more reading and figured out that the issue was around
inconsistent/improper use of the leading dot. Interestingly, no
diagnostic I could find was helpful in tracking this down. Y'alls tips
and hints were much more useful.


That is even more weird, and also very different from in RSX, where you 
can definitely do exactly what you tried here.


I guess there is a reason I'm not using RT-11... :-)

Johnny



So, here's how it went down (don't use a leading dot for user-defined
macros, but if you do use them, use them everywhere):

.type et2.mac
 .TITLE  ETTYIN
 .MCALL.TTYOUT,TIN

START:MOV#BUFFER,R1
 CLRR2
INLOOP:TIN(R1)+
 INCR2
 CMPB#12,R0
 BNEINLOOP
 MOV#BUFFER,R1
OUTLOOP:.TTYOUT(R1)+
 DECR2
 BEQSTART
 BROUTLOOP
BUFFER:.BLKW64.
 .ENDSTART
.

.type tin.mac
.MACROTINCHAR
 EMT^O340
 BCS.-2.
.IF NB 
.IF DIF ,R0
 MOVBR0,CHAR
.ENDC
.ENDC
.ENDM

.lib/mac/c tin tin

.macro et2/list/cross+tin.mlb/lib

.link et2

.run et2
THIS IS A TEST
THIS IS A TEST
^C

.

I really appreciate y'alls assistance.

Thanks,

Will

On 2/5/16 12:19 PM, Timothe Litt wrote:

Try the obvious:

lib/mac/list tin.mlb

I don't remember exactly, but I think there's a /detail or /names or
/list=names that will list the macro names in the library.

That will at least determine if MAC *should* find the macro.

On 05-Feb-16 13:05, Will Senn wrote:


On 2/5/16 10:20 AM, Paul Koning wrote:

On Feb 5, 2016, at 10:48 AM, Will Senn  wrote:

All,

A couple of questions:

...
lib/mac/c tin tin
macro et2/list/cross+tin.mlb/lib
?MACRO-E-Errors detected:  2
DK:ET2,DK:ET2/C=DK:ET2,DK:TIN.SML

Try putting the macro library earlier in the command line.  I believe
MACRO processes command arguments as it encounters them, so here
you're asking it to assemble ET2 before you've given it the macro
library it needs to understand the .MCALL.

 paul


I tried the command with the filespecs switched with the same result:
.macro tin.MLB/lib+et2/list/cross
?MACRO-E-Errors detected:  2
DK:TIN,DK:ET2/C=DK:TIN.MLB/M,DK:ET2

And then I ran it via run macro:
.run macro
*ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
?MACRO-E-Errors detected:  2
ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
*

And then I edited the macro file to include a LIBRARY directive:
 .TITLE  ETTYIN
 .LIBRARY /TIN.MLB/
 .MCALL.TTYOUT,.TIN

START:MOV#BUFFER,R1
 CLRR2
INLOOP:.TIN(R1)+
 INCR2
 CMPB#12,R0
 BNEINLOOP
 MOV#BUFFER,R1
OUTLOOP:.TTYOUT(R1)+
 DECR2
 BEQSTART
 BROUTLOOP
BUFFER:.BLKW64.
 .ENDSTART

and recompiled:
.macro et2/list/cross
?MACRO-E-Errors detected:  2
DK:ET2,DK:ET2/C=DK:ET2

It looks to me like it is finding the file, but not "seeing" the macro
definition?

Thanks,

Will

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh




___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh




___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh



--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Will Senn

I got it working :).

However, It doesn't look like macro files can be listed - from the 
system utilities manual:
The .MACRO directive produces the entries in the library directory 
(macro names). LIBR does not maintain a directory listing file for macro 
libraries; you can print the ASCII input file to list the macros in the 
library.


I did a bunch more reading and figured out that the issue was around 
inconsistent/improper use of the leading dot. Interestingly, no 
diagnostic I could find was helpful in tracking this down. Y'alls tips 
and hints were much more useful.


So, here's how it went down (don't use a leading dot for user-defined 
macros, but if you do use them, use them everywhere):


.type et2.mac
.TITLE  ETTYIN
.MCALL.TTYOUT,TIN

START:MOV#BUFFER,R1
CLRR2
INLOOP:TIN(R1)+
INCR2
CMPB#12,R0
BNEINLOOP
MOV#BUFFER,R1
OUTLOOP:.TTYOUT(R1)+
DECR2
BEQSTART
BROUTLOOP
BUFFER:.BLKW64.
.ENDSTART
.

.type tin.mac
.MACROTINCHAR
EMT^O340
BCS.-2.
.IF NB 
.IF DIF ,R0
MOVBR0,CHAR
.ENDC
.ENDC
.ENDM

.lib/mac/c tin tin

.macro et2/list/cross+tin.mlb/lib

.link et2

.run et2
THIS IS A TEST
THIS IS A TEST
^C

.

I really appreciate y'alls assistance.

Thanks,

Will

On 2/5/16 12:19 PM, Timothe Litt wrote:

Try the obvious:

lib/mac/list tin.mlb

I don't remember exactly, but I think there's a /detail or /names or
/list=names that will list the macro names in the library.

That will at least determine if MAC *should* find the macro.

On 05-Feb-16 13:05, Will Senn wrote:


On 2/5/16 10:20 AM, Paul Koning wrote:

On Feb 5, 2016, at 10:48 AM, Will Senn  wrote:

All,

A couple of questions:

...
lib/mac/c tin tin
macro et2/list/cross+tin.mlb/lib
?MACRO-E-Errors detected:  2
DK:ET2,DK:ET2/C=DK:ET2,DK:TIN.SML

Try putting the macro library earlier in the command line.  I believe
MACRO processes command arguments as it encounters them, so here
you're asking it to assemble ET2 before you've given it the macro
library it needs to understand the .MCALL.

 paul


I tried the command with the filespecs switched with the same result:
.macro tin.MLB/lib+et2/list/cross
?MACRO-E-Errors detected:  2
DK:TIN,DK:ET2/C=DK:TIN.MLB/M,DK:ET2

And then I ran it via run macro:
.run macro
*ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
?MACRO-E-Errors detected:  2
ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
*

And then I edited the macro file to include a LIBRARY directive:
 .TITLE  ETTYIN
 .LIBRARY /TIN.MLB/
 .MCALL.TTYOUT,.TIN

START:MOV#BUFFER,R1
 CLRR2
INLOOP:.TIN(R1)+
 INCR2
 CMPB#12,R0
 BNEINLOOP
 MOV#BUFFER,R1
OUTLOOP:.TTYOUT(R1)+
 DECR2
 BEQSTART
 BROUTLOOP
BUFFER:.BLKW64.
 .ENDSTART

and recompiled:
.macro et2/list/cross
?MACRO-E-Errors detected:  2
DK:ET2,DK:ET2/C=DK:ET2

It looks to me like it is finding the file, but not "seeing" the macro
definition?

Thanks,

Will

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh




___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh


___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Johnny Billquist

On 2016-02-05 19:33, Johnny Billquist wrote:

On 2016-02-05 19:28, Paul Koning wrote:



On Feb 5, 2016, at 1:18 PM, Johnny Billquist  wrote:

...
Also, there might be some issues (possibly) since you use + to
provide several files. I *think* that the '+' operator in general
would imply that the files are concatenated together, and a comma
might be a better separator to use.


No, in the DCL command, + is correct.  The meaning of + is that you're
listing several files that contribute to a single output, while comma
means you're doing several separate operations.

I believe the following are both legal:

macro a,b,c
macro a+b+c

The first does three assemblies: a, then b, then c, producing three
separate outputs; the second does a single assembly using files a, b,
and c as the inputs.


Thanks for the clarification. I think that I said something that ends up
meaning the same thing, but my wording was probably totally confusing.
Either way, in this case that cannot be the problem anyway, but using
'+' with a library file seems somewhat "odd", but that might just be me.

Right now I'm curious to just get confirmed if the library file indeed
holds the macro.


Interesting detail for those curios. In DCL under RSX, "," and "+" are 
equivalent for MACRO-11, and the name of the output will actually be the 
last file in the list.


PDP-11 C on the other hand do handle "," and "+" the way you describe 
it, Paul. (In RSX)


Johnny

--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Johnny Billquist

On 2016-02-05 19:28, Paul Koning wrote:



On Feb 5, 2016, at 1:18 PM, Johnny Billquist  wrote:

...
Also, there might be some issues (possibly) since you use + to provide several 
files. I *think* that the '+' operator in general would imply that the files 
are concatenated together, and a comma might be a better separator to use.


No, in the DCL command, + is correct.  The meaning of + is that you're listing 
several files that contribute to a single output, while comma means you're 
doing several separate operations.

I believe the following are both legal:

macro a,b,c
macro a+b+c

The first does three assemblies: a, then b, then c, producing three separate 
outputs; the second does a single assembly using files a, b, and c as the 
inputs.


Thanks for the clarification. I think that I said something that ends up 
meaning the same thing, but my wording was probably totally confusing. 
Either way, in this case that cannot be the problem anyway, but using 
'+' with a library file seems somewhat "odd", but that might just be me.


Right now I'm curious to just get confirmed if the library file indeed 
holds the macro.


Johnny

--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Paul Koning

> On Feb 5, 2016, at 1:18 PM, Johnny Billquist  wrote:
> 
> ...
> Also, there might be some issues (possibly) since you use + to provide 
> several files. I *think* that the '+' operator in general would imply that 
> the files are concatenated together, and a comma might be a better separator 
> to use.

No, in the DCL command, + is correct.  The meaning of + is that you're listing 
several files that contribute to a single output, while comma means you're 
doing several separate operations.

I believe the following are both legal:

macro a,b,c
macro a+b+c

The first does three assemblies: a, then b, then c, producing three separate 
outputs; the second does a single assembly using files a, b, and c as the 
inputs.

paul


___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Timothe Litt
Try the obvious:

lib/mac/list tin.mlb

I don't remember exactly, but I think there's a /detail or /names or
/list=names that will list the macro names in the library.

That will at least determine if MAC *should* find the macro.

On 05-Feb-16 13:05, Will Senn wrote:
>
>
> On 2/5/16 10:20 AM, Paul Koning wrote:
>>> On Feb 5, 2016, at 10:48 AM, Will Senn  wrote:
>>>
>>> All,
>>>
>>> A couple of questions:
>>>
>>> ...
>>> lib/mac/c tin tin
>>> macro et2/list/cross+tin.mlb/lib
>>> ?MACRO-E-Errors detected:  2
>>> DK:ET2,DK:ET2/C=DK:ET2,DK:TIN.SML
>> Try putting the macro library earlier in the command line.  I believe
>> MACRO processes command arguments as it encounters them, so here
>> you're asking it to assemble ET2 before you've given it the macro
>> library it needs to understand the .MCALL.
>>
>> paul
>>
> I tried the command with the filespecs switched with the same result:
> .macro tin.MLB/lib+et2/list/cross
> ?MACRO-E-Errors detected:  2
> DK:TIN,DK:ET2/C=DK:TIN.MLB/M,DK:ET2
>
> And then I ran it via run macro:
> .run macro
> *ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
> ?MACRO-E-Errors detected:  2
> ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
> *
>
> And then I edited the macro file to include a LIBRARY directive:
> .TITLE  ETTYIN
> .LIBRARY /TIN.MLB/
> .MCALL.TTYOUT,.TIN
>
> START:MOV#BUFFER,R1
> CLRR2
> INLOOP:.TIN(R1)+
> INCR2
> CMPB#12,R0
> BNEINLOOP
> MOV#BUFFER,R1
> OUTLOOP:.TTYOUT(R1)+
> DECR2
> BEQSTART
> BROUTLOOP
> BUFFER:.BLKW64.
> .ENDSTART
>
> and recompiled:
> .macro et2/list/cross
> ?MACRO-E-Errors detected:  2
> DK:ET2,DK:ET2/C=DK:ET2
>
> It looks to me like it is finding the file, but not "seeing" the macro
> definition?
>
> Thanks,
>
> Will
>
> ___
> Simh mailing list
> Simh@trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh




smime.p7s
Description: S/MIME Cryptographic Signature
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Johnny Billquist

On 2016-02-05 19:05, Will Senn wrote:



On 2/5/16 10:20 AM, Paul Koning wrote:

On Feb 5, 2016, at 10:48 AM, Will Senn  wrote:

All,

A couple of questions:

...
lib/mac/c tin tin
macro et2/list/cross+tin.mlb/lib
?MACRO-E-Errors detected:  2
DK:ET2,DK:ET2/C=DK:ET2,DK:TIN.SML

Try putting the macro library earlier in the command line.  I believe
MACRO processes command arguments as it encounters them, so here
you're asking it to assemble ET2 before you've given it the macro
library it needs to understand the .MCALL.

paul


I tried the command with the filespecs switched with the same result:


[...]

I have some problems helping, as this is RT-11. I would definitely know 
better how to troubleshoot this in RSX. :-/



It looks to me like it is finding the file, but not "seeing" the macro
definition?


I'm sure there is a way to list what macros exist in the library file. 
Could you check that your macro really exists there. Also extract it, to 
see that it indeed looks correct.


Also, there might be some issues (possibly) since you use + to provide 
several files. I *think* that the '+' operator in general would imply 
that the files are concatenated together, and a comma might be a better 
separator to use. However, since .LIBRARY also fails, this cannot really 
be the problem. So I'm a bit lost why it fails for you. Starting by 
checking your library would be good.


Johnny

--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Will Senn



On 2/5/16 10:20 AM, Paul Koning wrote:

On Feb 5, 2016, at 10:48 AM, Will Senn  wrote:

All,

A couple of questions:

...
lib/mac/c tin tin
macro et2/list/cross+tin.mlb/lib
?MACRO-E-Errors detected:  2
DK:ET2,DK:ET2/C=DK:ET2,DK:TIN.SML

Try putting the macro library earlier in the command line.  I believe MACRO 
processes command arguments as it encounters them, so here you're asking it to 
assemble ET2 before you've given it the macro library it needs to understand 
the .MCALL.

paul


I tried the command with the filespecs switched with the same result:
.macro tin.MLB/lib+et2/list/cross
?MACRO-E-Errors detected:  2
DK:TIN,DK:ET2/C=DK:TIN.MLB/M,DK:ET2

And then I ran it via run macro:
.run macro
*ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
?MACRO-E-Errors detected:  2
ET2.OBJ,ET2.LST,ET2.LST=TIN.MLB/M,ET2
*

And then I edited the macro file to include a LIBRARY directive:
.TITLE  ETTYIN
.LIBRARY /TIN.MLB/
.MCALL.TTYOUT,.TIN

START:MOV#BUFFER,R1
CLRR2
INLOOP:.TIN(R1)+
INCR2
CMPB#12,R0
BNEINLOOP
MOV#BUFFER,R1
OUTLOOP:.TTYOUT(R1)+
DECR2
BEQSTART
BROUTLOOP
BUFFER:.BLKW64.
.ENDSTART

and recompiled:
.macro et2/list/cross
?MACRO-E-Errors detected:  2
DK:ET2,DK:ET2/C=DK:ET2

It looks to me like it is finding the file, but not "seeing" the macro 
definition?


Thanks,

Will

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Joe Ambrose


-Original Message-
From: Simh [mailto:simh-boun...@trailing-edge.com] On Behalf Of Nelson H. F. 
Beebe
Sent: Friday, February 05, 2016 10:55 AM
To: simh@trailing-edge.com
Cc: be...@math.utah.edu
Subject: Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

Will Senn  asks on Fri, 5 Feb 2016 09:48:14 -0600 about 
macros in RT11.  

I have a copy of this book on my shelf

@String{pub-PH  = "Pren{\-}tice-Hall"}
@String{pub-PH:adr  = "Upper Saddle River, NJ 07458, USA"}

@Book{Eckhouse:1979:MSO,
  author =   "Richard H. {Eckhouse, Jr.} and L. Robert Morris",
  title ="Minicomputer systems: organization, programming, and
 applications ({PDP-11})",
  publisher =pub-PH,
  address =  pub-PH:adr,
  pages ="xix + 491",
  year = "1979",
  ISBN = "0-13-583914-9",
  ISBN-13 =  "978-0-13-583914-0",
  LCCN = "QA76.8.P2E26 1979",
  bibdate =  "Fri Aug 07 17:22:02 1998",
  bibsource ="http://www.math.utah.edu/pub/tex/bib/master.bib";,
  acknowledgement = ack-nhfb,
}

and find that it has a lot of assembly code examples, and about a dozen pages 
on user-defined macros.

---
- Nelson H. F. BeebeTel: +1 801 581 5254  -
- University of UtahFAX: +1 801 581 4148  -
- Department of Mathematics, 110 LCBInternet e-mail: be...@math.utah.edu  -
- 155 S 1400 E RM 233   be...@acm.org  be...@computer.org -
- Salt Lake City, UT 84112-0090, USAURL: http://www.math.utah.edu/~beebe/ -
---

Just pulled my well-worn copy of Eckhouse/Morris... 

Great book. I used it extensively when I was writing real-time code for a 
company I worked for way-back-when. 

Really great examples of Macro-11 coding techniques. Especially coroutines.

=
Joseph Ambrose
172 Ketcham Avenue
Amityville, NY 11701
Primary: 631-598-0528
  Mobile: 516-380-6047
   Email: joe11...@verizon.net
  Profile: http://www.linkedin.com/in/jambrose0321
 Blog: http://houseofdoejoegetsbigger.blogspot.com/ 

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Johnny Billquist

On 2016-02-05 17:20, Paul Koning wrote:



On Feb 5, 2016, at 10:48 AM, Will Senn  wrote:

All,

A couple of questions:

...
lib/mac/c tin tin
macro et2/list/cross+tin.mlb/lib
?MACRO-E-Errors detected:  2
DK:ET2,DK:ET2/C=DK:ET2,DK:TIN.SML


Try putting the macro library earlier in the command line.  I believe MACRO 
processes command arguments as it encounters them, so here you're asking it to 
assemble ET2 before you've given it the macro library it needs to understand 
the .MCALL.


I think Paul is right here. It's a question of ordering. MACRO-11 will 
only search through the libraries it knows about when hitting the 
.MCALL. A file that comes after on the command line will not be searched 
in files before.


You can also use .LIBRARY in the macro file itself, to add additional 
macro library files to be searched.


Johnny

--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Paul Koning

> On Feb 5, 2016, at 10:48 AM, Will Senn  wrote:
> 
> All,
> 
> A couple of questions:
> 
> ...
> lib/mac/c tin tin
> macro et2/list/cross+tin.mlb/lib
> ?MACRO-E-Errors detected:  2
> DK:ET2,DK:ET2/C=DK:ET2,DK:TIN.SML

Try putting the macro library earlier in the command line.  I believe MACRO 
processes command arguments as it encounters them, so here you're asking it to 
assemble ET2 before you've given it the macro library it needs to understand 
the .MCALL.

paul

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] Macro-11 Macro library question (RT11 running in SimH PDP11)

2016-02-05 Thread Nelson H. F. Beebe
Will Senn  asks on Fri, 5 Feb 2016 09:48:14 -0600 about
macros in RT11.  

I have a copy of this book on my shelf

@String{pub-PH  = "Pren{\-}tice-Hall"}
@String{pub-PH:adr  = "Upper Saddle River, NJ 07458, USA"}

@Book{Eckhouse:1979:MSO,
  author =   "Richard H. {Eckhouse, Jr.} and L. Robert Morris",
  title ="Minicomputer systems: organization, programming, and
 applications ({PDP-11})",
  publisher =pub-PH,
  address =  pub-PH:adr,
  pages ="xix + 491",
  year = "1979",
  ISBN = "0-13-583914-9",
  ISBN-13 =  "978-0-13-583914-0",
  LCCN = "QA76.8.P2E26 1979",
  bibdate =  "Fri Aug 07 17:22:02 1998",
  bibsource ="http://www.math.utah.edu/pub/tex/bib/master.bib";,
  acknowledgement = ack-nhfb,
}

and find that it has a lot of assembly code examples, and about a dozen
pages on user-defined macros.

---
- Nelson H. F. BeebeTel: +1 801 581 5254  -
- University of UtahFAX: +1 801 581 4148  -
- Department of Mathematics, 110 LCBInternet e-mail: be...@math.utah.edu  -
- 155 S 1400 E RM 233   be...@acm.org  be...@computer.org -
- Salt Lake City, UT 84112-0090, USAURL: http://www.math.utah.edu/~beebe/ -
---
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh