[Info-vax] Listeners in VMS Basic, was: Re: Integrity iLO Configuration?
Chris Townley
news at cct-net.co.uk
Mon Jul 12 16:37:00 EDT 2021
On 12/07/2021 21:16, Stephen Hoffman wrote:
> On 2021-07-09 23:45:31 +0000, Dave Froble said:
>
>> Just because some agree, doesn't make them right.
>>
>> But, Ok, a practical example, tell me, too many comments, not enough
>> comments, what?
>>
>> ;+
>> ; Base block must be > 0
>> ; # of blocks must be > 0 & < 128
>> ; End block must be <= EOF block
>> ; Grant lock if caller has exclusive access to the file
>> ;-
>>
>> MOVZWL #SS$_ABORT,R0 ; Assume failure
>> TSTL R3 ; Base block zero?
>> BNEQU 020$ ; No, continue
>> 010$: BRW RETURN ; Yes, return
>> 020$: TSTL R4 ; Block count zero?
>> BEQLU 010$ ; Yes, return
>> CMPL #127,R4 ; Block count <= 127
>> BLSSU 010$ ; No, return
>> MOVAB -1(R3)[R4],R5 ; Last block to lock
>> CMPL CIB_L_FILSIZ(R7),R5 ; LE filesize?
>> BGEQU 030$ ; Yes, continue
>> MOVL CIB_L_FILSIZ(R7),R5 ; Else lock only to EOF
>
>
> BLEQU, not BLSSU? Or BLSSU with 128?
>
> I'd suggest using a string constant for 127 (or 128) rather than a magic
> number, too.
>
>
This is quite enlightening to me, and confirms an earlier decision.
When I joined out development team in 1997 (after years running an
operational unit using the software) I stated that I was fine with a
high level language, but I would refuse to use or learn macro -my only
experience of a low level language was Z80, and I failed then,and did
not want to go through that again. This was accepted.
Only twice did I come across issues with the macro - the first time I
got someone from the original software house to correct some language
translation issue when we moved Germany onto Alpha - two of them spent
about 4 hours and change two characters, which worked.
Next time was during my IA64 port, where 2 bits of macro didn't work, so
I recoded one in C, and one in Basic - both based on the function
documentation. Both worked.
Excepting low level stuff, why does anyone use macro?
--
Chris
More information about the Info-vax
mailing list