OISC
OISC(One-instruction set computer)は、命令が唯一のコンピュータである。 唯一の命令の一例としてSubleq(subtract and branch if less…
この記事は英語版の対応するページを翻訳することにより充実させることができます。(2021年2月) 翻訳前に重要な指示を読むには右にある[表示]をクリックしてください。
|
OISC(One-instruction set computer)は、命令が唯一のコンピュータである。 唯一の命令の一例としてSubleq(subtract and branch if less or equal to zero、減算して0以下なら分岐)がある。 いくつかのOISCは、チューリング完全である。URISC(Ultimate RISC、究極のRISC)とも[1]。
利用
OISCは、実用には向いていないといえる。 いくつかの難解プログラミング言語としても実装されている。
OISCを使用しプログラミングを行う際は、初期の設定やメモリマッピングも重要である。自己書き換えが必要になることも多い。
Subleq
Subleq命令は、3つのパラメータを持つ。Subleq(a,b,c)と表現する。Subleqはアドレスbの内容からアドレスaの内容を減算し、その結果をアドレスbに格納し、結果が0以下ならばcに制御を移す。
命令がひとつしかないのでオペコードは必要ない(0ビット)。パラメータ a, b, c を3個の連続したワードであらわす。以下に一例を示す。
ADDRESS a b c
ADDRESS 00: 3 4 6
ADDRESS 03: 7 7 7
ADDRESS 06: 3 4 0
このコードの場合、以下の処理が行われる。
- 0から実行する
- アドレス4の内容(7) − アドレス3の内容(7)を計算し、結果の0をアドレス4に格納
- 結果が0以下なので、6に移動
- アドレス4の内容(0) − アドレス3の内容(7)を計算し、結果の-7をアドレス4に格納
- 結果が0以下なので、0に移動
- 最初から繰り返し
また、Subleqのソースコードを書く際に、ソースコードを見やすくするために構文を少し変える場合もある。
例
その他のOISCの例である。
- BitBitJump
- ByteByteJump
- Blues Machine
- DJN
注
- ^ URISC: The Ultimate Reduced Instruction Set Computer doi:10.1177/002072098802500408
関連項目
外部リンク
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.