Thursday, 15 January 2009

The Ultimate RISC, One Instruction Set Computers

A One Instruction Set Computer is a virtual computer designed to use only one instruction. There are two common methods to implement a OISC:

Reverse Subtract and Skip if Borrow

The instruction has one operand which points to a memory location. The program counter is stored at location 0 and the accumulator at location 1. Location 2 always contains zero, location 3 is used for input and location 4 for output.

RSSB subtracts the accumulator from the contents of a memory location, storing the result in both.  If the accumulator was greater than the memory location, the next instruction will be skipped. Jumps can be implemented by manipulating location 0.

Subtract and Branch if Negative

SBN requires three operands, a, b and c.  The contents of memory location a is subtracted from the contents of b and the result is stored in b. If the value originally stored in a was greater than the value in b, SBN will jump to c. A variation on the theme is Subtract and Branch unless Positive.

I'll publish my implementation in Redcode shortly. In the meantime, why not take a look at projects listed below. If you're aware of any other implementations, please leave a comment with the details.

5 comments:

  1. Strictly speaking those are not RISC as are both accessing memory and performing data operations.

    ReplyDelete
  2. Check out http://www.caamp.info -- the website for the book “Computer Architecture: A Minimalist Perspective.” The book focuses on one instruction set computing.

    ReplyDelete
  3. The Esoteric Programming Languages Wiki has a new page about RSSB.

    ReplyDelete
  4. For this reason many of the used computer buyers develop basic computer repair skills because of which they face no big problem trouble shooting them but so do buyers of new computers in order to upgrade their PC handily when in need.
    http://www.showboxdownloadsapp.com/

    ReplyDelete
  5. In this world of ever growing technology, we can easily watch the latest movies or tv shows by streaming on different websites.
    Now we can even watch the movies and TV shows on our Android or Windows smartphones. One such app for watching movies is the ShowBox App.
    It's one of the best when it comes to watching movies or TV shows. To know more about the app and also get the apk link just visit my site here
    ShowBox Apk

    ReplyDelete