[Info-vax] Listeners in VMS Basic, was: Re: Integrity iLO Configuration?

John Reagan xyzzy1959 at gmail.com
Tue Jul 13 15:23:35 EDT 2021


On Monday, July 12, 2021 at 7:39:16 PM UTC-4, abrsvc wrote:
> On Monday, July 12, 2021 at 7:02:15 PM UTC-4, Arne Vajhøj wrote: 
> > On 7/12/2021 1:11 PM, abrsvc wrote: 
> > > On Monday, July 12, 2021 at 12:46:27 PM UTC-4, abrsvc wrote: 
> > >> On Monday, July 12, 2021 at 12:43:13 PM UTC-4, abrsvc wrote: 
> > >>> On Monday, July 12, 2021 at 12:28:37 PM UTC-4, Arne Vajhøj wrote: 
> > >>>> On 7/12/2021 12:17 PM, abrsvc wrote: 
> > >>>>> On Monday, July 12, 2021 at 11:02:35 AM UTC-4, Arne Vajhøj wrote: 
> > >>>>>> On 7/12/2021 1:34 AM, Simon Clubley wrote: 
> > >>>>>>> On 2021-07-10, abrsvc <dansabr... at yahoo.com> wrote: 
> > >>>>>>>>> But I wonder why MOVZWL and not just MOVL! 
> > >>>>>>>> 
> > >>>>>>>> IRRC, the MOVZWL will take less memory since the immediate value will be smaller. 
> > >>>>>>> 
> > >>>>>>> It would be amusing if the more efficient sequences get translated 
> > >>>>>>> to less efficient sequences on Alpha and above when using the Macro-32 
> > >>>>>>> compiler and if a less efficient sequence on VAX actually translates 
> > >>>>>>> to a more efficient sequence on Alpha and above. :-) 
> > >>>>>> On Alpha both end up as: 
> > >>>>>> 
> > >>>>>> MOV 1, R0 
> > >>>>> 
> > >>>>> There is no "mov" on Alpha. What you will end up with is a load/store combination. 
> > >>>> .entry z1,^m<r2,r3,r4,r5> 
> > >>>> movl #1,r0 
> > >>>> ret 
> > >>>> .entry z2,^m<r2,r3,r4,r5> 
> > >>>> movzwl #1,r0 
> > >>>> gave me: 
> > >>>> 
> > >>>> .PSECT $CODE, QUAD, PIC, CON, REL, 
> > >>>> LCL, SHR, EXE, RD, NOWRT 
> > >>>> 0000 Z1:: 
> > >>>> 47E03400 0024 MOV 1, R0 
> > >>>> 0050 Z2:: 
> > >>>> 47E03400 0074 MOV 1, R0 
> > >>> I stand corrected, but not in the way you think. The MOV FP,SP is actually a BIS FP,FP,SP instruction. 
> > >>> While I can't recall what the Immediate sequence would be for MOV 1,RO, it too would be another instruction. 
> > >>> The MOV is for the human reader and is a pseudo instruction. 
> > >> Replying to myself because the memory cell recovered... 
> > >> 
> > >> The immediate load for the value 1 is likely LDA R0, 1(R31) ! recall that R31 = 0 
> > > 
> > > OK. Create a main program that does a JSB into the routines you have listed above and use the debugger showing the instructions. 
> > > I was again wrong. The MOV 1,R0 is actually also a BIS instruction as follows: BIS R31,#X01,R0 
> > R0 = always zero R31 OR 1 
> > 
> > does the job. 
> > > Note that the same BIS instruction is created in both cases (MOVL and MOVSWL) on Alpha. 
> > Yes. 
> > > If I get time, I will boot up the VAX and show the code generated there as well. 
> > But aren't both MOVL and MOVZWL real instructions on VAX? 
> > 
> > Arne
> Yes they are two different instructions on VAX. However, the first operand for an immediate mode value would be a different size. For the movl, the size would be a longword, for the movzwl, it would be a word in size. Here the difference would be the total size of the instruction stream including the operands. For Alpha either translated instruction would generate an instruction of the same size (same exact instruction in this particular case).

Don't forget the byte-sized short literals that can be used (ie, literal-mode vs immediate-mode).  Don't hurt your brain with floating-point short literals.



More information about the Info-vax mailing list