[Info-vax] Possible VMS jobs - City of New York Fire Dept

John Reagan xyzzy1959 at gmail.com
Mon Oct 28 13:20:09 EDT 2019


On Monday, October 28, 2019 at 11:53:54 AM UTC-4, Dave Froble wrote:
> On 10/28/2019 12:27 PM, VAXman- at SendSpamHere.ORG wrote:
> > In article <qp5jln$4j2$1 at dont-email.me>, Dave Froble <davef at tsoft-inc.com> writes:
> >> On 10/27/2019 11:13 AM, VAXman- at SendSpamHere.ORG wrote:
> >>> In article <qp2ng8$ro7$1 at dont-email.me>, Dave Froble <davef at tsoft-inc.com> writes:
> >>>> On 10/26/2019 6:26 PM, Michael Moroney wrote:
> >>>>
> >>>>> Port VMS code from VAX to Itanium, just recompile and relink, right? HAHAHA,
> >>>>
> >>>> Well, for some it was just that simple, or at least not too bad.
> >>>>
> >>>> The biggest problem we ran into is that on VAX we were incrementing the
> >>>> AP as we read the arguments.  Macro-32 compiler didn't like that.  The
> >>>> fix was rather simple.
> >>>
> >>> Home the arguments.
> >>>
> >>
> >> Sorry, don't understand that ..
> >
> > Perhaps, an example...
> >
> > 	.TITLE	INCREMENT_AP_TEST
> >
> > 	.PSECT	DATA,WRT,NOEXE,5
> > ONE:	.ASCID	"ONE"
> > 	.ALIGN	QUAD
> > TWO:	.ASCID	"TWO"
> > 	.ALIGN	QUAD
> > THREE:	.ASCID	"THREE"
> > 	.ALIGN	QUAD
> > FOUR:	.ASCID	"FOUR"
> > 	.ALIGN	QUAD
> > FIVE:	.ASCID	"FIVE"
> > 	.ALIGN	QUAD
> > SIX:	.ASCID	"SIX"
> > 	.ALIGN	QUAD
> > SEVEN:	.ASCID	"SEVEN"
> > 	.ALIGN	QUAD
> > EIGHT:	.ASCID	"EIGHT"
> > 	.ALIGN	QUAD
> > NINE:	.ASCID	"NINE"
> > 	.ALIGN	QUAD
> > TEN:	.ASCID	"TEN"
> >
> > 	.PSECT	CODE,NOWRT,EXE,5
> > 	.ENTRY	GO,0
> >
> > 	PUSHAL	ONE
> > 	PUSHAL	TWO
> > 	PUSHAL	THREE
> > 	PUSHAL	FOUR
> > 	PUSHAL	FIVE
> > 	PUSHAL	SIX
> > 	PUSHAL	SEVEN
> > 	PUSHAL	EIGHT
> > 	PUSHAL	NINE
> > 	PUSHAL	TEN
> > 	CALLS	#10,OUTPUT
> > 	RET
> > 	.END	GO
> >
> > 	.TITLE	INCREMENT_AP_EXAMPLE
> >
> > 	.PSECT	CODE,NOWRT,EXE,5
> > 	.CALL_ENTRY	HOME_ARGS=TRUE,LABEL=OUTPUT,MAX_ARGS=15
> >
> > 	MOVAL	(AP),R12
> > 	JSB	100$
> > 	RET
> >
> > 100$:	.JSB_ENTRY	
> > 	PUSHL	R2
> > 	MOVL	(AP)+,R2
> > 200$:	PUSHL	(AP)+
> > 	CALLS	#1,G^LIB$PUT_OUTPUT
> > 	SOBGTR	R2,200$
> > 	POPL	R2
> > 	RSB
> > 	.END
> >
> 
> Ok, I see.
> 
> Please take no offense Brian, but it's "fancy" stuff like that I try to 
> avoid.
> 
> We had:
> 
>          TSTL    (AP)+                   ; Skip argument count
>          MOVL    @(AP)+,R2               ; Channel number
>          MOVL    (AP)+,R3                ; Address of desc. of file spec.
>          MOVL    @(AP)+,R4               ; MBC
>          MOVL    @(AP)+,R5               ; Open mode
> 
> And modified to:
> 
>          MOVL    @4(AP),R2               ; Channel number
>          MOVL    8(AP),R3                ; Address of desc. of file spec.
>          MOVL    @12(AP),R4              ; MBC
>          MOVL    @16(AP),R5              ; Open mode
> 
> My Macro-32 has always been as simple and straight forward as I could 
> keep it.  Might keep John happy.
> 
> KISS principal.
> 
> -- 
> David Froble                       Tel: 724-529-0450
> Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
> DFE Ultralights, Inc.
> 170 Grimplin Road
> Vanderbilt, PA  15486

Uh, the AMACRO/IMACRO compilers handles that code.  It does tell you that we really aren't incrementing the real AP register (since there really isn't one) but the generated code should work.  However, I do prefer the non-autoinc version

$ type incr_ap.mar
jrr::   .call_entry
         TSTL    (AP)+                   ; Skip argument count
         MOVL    @(AP)+,R2               ; Channel number
         MOVL    (AP)+,R3                ; Address of desc. of file spec.
         MOVL    @(AP)+,R4               ; MBC
         MOVL    @(AP)+,R5               ; Open mode
         ret
        .end
$ macro incr_ap.mar

         TSTL    (AP)+                   ; Skip argument count
^
%AMAC-I-APTEMPUSE, AP used as a temporary register is converted to R12 in routine JRR
at line number 2 in file WORK20:[JREAGAN.XMACRO]INCR_AP.MAR;1



More information about the Info-vax mailing list