Difference between ORI and SBR?

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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. :(

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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".

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
We've seen none of these for months, and now three in a week or so...

There might be one possibility: homework assignment :)

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gah! Wish they had mentioned that somewhere in the listing.

Anyway, thanks for the prompt reply.

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Gah! Wish they had mentioned that somewhere in the listing.

Hmmm--

Quote:
CLR – Clear Register
Description:
...
16-bit Opcode: (see EOR Rd,Rd)
0010 01dd dddd dddd

so it is marked for that one.

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.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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. :(

If you think education is expensive, try ignorance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

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.

The documentation leads you to know. Be wary.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]