Can someone please explain the difference between these two instructions:
ORI (Logical OR with immediate)
and
SBR (set bit in register)? :?:
Have stared at the instruction set till my eyes hurt. :(
Can someone please explain the difference between these two instructions:
ORI (Logical OR with immediate)
and
SBR (set bit in register)? :?:
Have stared at the instruction set till my eyes hurt. :(
They are synonyms. If you look at the manual they both have EXACTLY the same opcode:
0110 KKKK dddd KKKKK
This is not the only example where the same opcode appears under two different names - it's just a convenience so you can use whatever seems more appropriate and self-documenting at the time.
For example all the SEC, SEH, SEI, etc. are just individually named variants of BSET
Cliff
Oh boy. The world is really stochastic! We've seen none of these for months, and now three in a week or so... Anybody into statisrtics, probability and stuff that can shed a light? Is this the negexp distribution I learned about 30 years ago, and have forgotten about many times since? IIRC the laymans interpretation went "negexp distributed things come in stochastic bursts".
We've seen none of these for months, and now three in a week or so...
Gah! Wish they had mentioned that somewhere in the listing.
Anyway, thanks for the prompt reply.
Gah! Wish they had mentioned that somewhere in the listing.
CLR – Clear Register
Description:
...
16-bit Opcode: (see EOR Rd,Rd)
0010 01dd dddd dddd
and LSL says to (see ADD Rd, Rd).
ROL says to (see ADC Rd, Rd).
TST says to (see AND Rd, Rd).
CBR says to (see ANDI with K complemented).
So someone was on the right track, but it certainly is not comprehensive.
What I was really moaning about was the fact that the name SBR leads one to think that it is the register equivalent of the SBI used for I/O but it works in a completely different manner. :shock:
Maybe that's what the developers intended initially, but then decided to go the ORI way.
The way it stands now, it is just another pitfall for the unwary. :(
the name SBR leads one to think that it is the register equivalent of the SBI used for I/O but it works in a completely different manner.