[Info-vax] Volatile, was: Re: yet another sys$qiow question
Johnny Billquist
bqt at softjar.se
Mon Aug 24 20:43:40 EDT 2015
On 2015-08-24 23:32, Simon Clubley wrote:
> On 2015-08-24, George Cornelius <cornelius at eisner.decus.org> wrote:
>> [VAXMAN wrote:]
>>
>>>> TSTL IOSB
>>>> BNEQ 10$
>>>> 20$: BRB 20$
>>>> 10$:
>>
>> Actually, to test just the status in VMS you would use TSTW. But
>> when testing for nonzero TSTL works as well and does not require
>> any extra word extraction code on the newer architectures.
>>
>
> BTW, on ARM you can conditionally execute the following instructions
> (not just jumps) based on the last test you did so no messy jumping
> such as the above is required if you are doing something a bit more
> more complicated than the above.
>
> However, I have a question about the above code. First off, it's been
> a couple of decades since I last wrote some MACRO-32 code so go easy
> if I've got this wrong. :-)
>
> Brian wrote:
> TSTL IOSB
> BNEQ 10$
> 20$: BRB 20$
> 10$:
>
> Couldn't you make that more efficient with:
>
> TSTL IOSB
> 10$:
> BEQ 10$ ; Or whatever branch if equal to zero is on VAX
>
> It's not important; I'm just curious as that style is something which
> works on ARM just fine. I was just wondering if there's something on
> VAX I've forgotten about which stops the above from being usable.
No, you are right. Your code would actually work just fine (ie. the
same). And it would work the same on a PDP-11 as well. Nice
optimization. :-)
> BTW, I wish the x86 was as elegant as ARM...
I sortof remember thinking "PDP-10" when I read up on the ARM
architecture many moons ago...
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
More information about the Info-vax
mailing list