One instruction set computer: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
LauBot (discussione | contributi)
m Bot: passaggio degli url da HTTP a HTTPS
Recupero di 1 fonte/i e segnalazione di 0 link interrotto/i.) #IABot (v2.0.9.5
 
(9 versioni intermedie di 6 utenti non mostrate)
Riga 1:
{{S|computer}}
Uno '''One Instruction Set Computer''' ('''OISC''') è una [[macchina di Turing]] che usa una sola istruzione, e non necessita quindi di [[opcode]]. Gli OISC sono solitamente utilizzati nell'insegnamento.
Un modello commerciale di calcolatore che utilizza un OISC è il MAXQ della Maxim<ref>{{cita web|url=http://www.maxim-ic.com/appnotes.cfm/appnote_number/3222|titolo=Introduction to the MAXQ Architecture|accesso=2009-07-20|lingua=en}}</ref>, che utilizza la sola istruzione ''MOVE''.
 
UnoCon '''One Instruction Set Computer''' ('''OISC''') èsi indica una [[macchina di Turing]] che usa una sola istruzione, e non necessita quindi di [[opcode]]. Gli OISC sono solitamente utilizzati nell'insegnamento.
==Tipologie di OISC==
Un modello commerciale di calcolatore che utilizza un OISC è il MAXQ della Maxim<ref>{{cita web|url=http://www.maxim-ic.com/appnotes.cfm/appnote_number/3222|titolo=Introduction to the MAXQ Architecture|accesso=2009-07-20 luglio 2009|lingua=en}}</ref>, che utilizza la sola istruzione ''MOVE''.
 
== Tipologie di OISC ==
Esistono varie possibilità di realizzare un OISC che sia [[Turing equivalenza|Turing-completo]].
 
=== Sottrai e salta se... ===
I più utilizzati a livello didattico sono gli OISC basati su [[SUBLEQ]] (sottrai e salta se ≤ 0 - SUB Less EQual) e [[SUBNEG]] o [[SBN]] (sottrai e salta se negativo - SUB NEG - ''Subtract and branch if negative''). Le implementazioni sono, in pseudo codice:
<sourcesyntaxhighlight lang=asm>
subleq ''a'', ''b'', ''c'' ; Mem[''b''] = Mem[''b''] - Mem[''a'']
; if (Mem[''b''] ≤ 0) goto ''c''
Line 14 ⟶ 15:
subneg ''a'', ''b'', ''c'' ; Mem[''b''] = Mem[''b''] - Mem[''a'']
; if (Mem[''b''] < 0) goto ''c''
</syntaxhighlight>
</source>
 
=== Sottrai e salta se c'è riporto ([[RSSB]]) ===
In inglese ''Reverse Subtract and Skip if Borrow'': l'[[accumulatore (informatica)|accumulatore]] è sottratto dalla locazione di memoria corrente. Se il valore è negativo, salta l'istruzione successiva. Il puntatore all'istruzione ([[program counter]]) è all'indirizzo 0, l'accumulatore all'1.
<sourcesyntaxhighlight lang=asm>
RSSB ''a'' ; Mem[''a''] = Mem[''a''] - Mem[''1'']
; Mem[''1''] = Mem[''a'']
; if (Mem[''1''] < 0) Mem[''1'']= = Mem[''1''] + 1
</sourcesyntaxhighlight>
 
=== Move ===
Una "move machine", detta anche CPU a ''[[transport triggered architecture]]''<ref>[http://www.hawaga.org.uk/ben/tech/oisc1.html One Instruction Set Computers<!-- Titolo generato automaticamente -->]</ref> usa la sola istruzione Move, che opera direttamente sulla memoria.
<sourcesyntaxhighlight lang=asm>
move ''a'' to ''b'' ; Mem[''b''] := Mem[''a'']
</syntaxhighlight>
</source>
A volte viene scritto come
<sourcesyntaxhighlight lang=asm>
''a'' -> ''b'' ; Mem[''b''] := Mem[''a'']
</syntaxhighlight>
</source>
Le operazioni aritmetiche sono effettuate tramite una [[unità aritmetica e logica|ALU]], che per indirizzi di più [[word]] può essere rimpiazzata da tabelle di lookup<ref>{{Cita web |url=http://www.cs.eku.edu/faculty/styer/oisc.html |titolo=Copia archiviata |accesso=20 luglio 2009 |dataarchivio=26 maggio 2007 |urlarchivio=https://web.archive.org/web/20070526050104/http://www.cs.eku.edu/faculty/styer/oisc.html |urlmorto=sì }}</ref>, mentre i salti sono effettuati mappando il program counter in memoria. Un esempio è stato costruito a partire dall'[[automa cellulare]] [[Wireworld]]<ref>[http://www.quinapalus.com/wi-index.html The Wireworld computer<!-- Titolo generato automaticamente -->]</ref>. Un saggio su tale architettura e sul funzionamento è stato scritto da [[Douglas W. Jones]]<ref>[http://www.cs.uiowa.edu/~jones/arch/risc/ The Ultimate RISC]</ref><ref>[https://portal.acm.org/citation.cfm?id=48683 ''ACM SIGARCH Computer Architecture News 16,'' 3 (June 1988) 48-55]</ref>.
Anche il MAXQ della Maxim utilizza tale design.
 
== BitBitJump ==
Il BitBitJump è simile al sottrai e salta, solo che opera copiando singoli bit, invece che sottraendo [[indirizzi di memoria]]: ad esempio il codice
<sourcesyntaxhighlight lang=asm>
19 20 8
0 0 -1
</syntaxhighlight>
</source>
è rappresentato ad 8 bit (MSBF) come
<sourcesyntaxhighlight lang=asm>
[00010011] [00010100] [00001000]
[00000000] [00000000] [11111111]
</syntaxhighlight>
</source>
La prima istruzione copia il 19° bit nel 20°, quindi
<sourcesyntaxhighlight lang=asm>
[00010011] [00010100] [00011000]
[00000000] [00000000] [11111111]
</syntaxhighlight>
</source>
la memoria diventa ora
<sourcesyntaxhighlight lang=asm>
19 20 24
0 0 -1
</syntaxhighlight>
</source>
Viene eseguito il salto al 24 bit, ossia la seconda riga, che copia il bit 0 su se stesso e termina (il salto ad indirizzi negativi termina l'esecuzione).
 
== Note ==
<references/>
 
== Bibliografia ==
* {{cita web|http://catb.org/~esr/retro/|The Retrocomputing Museum}}
* {{cita web | 1 = http://www.maxim-ic.com/products/microcontrollers/maxq/ | 2 = MAXQ product line homepage | accesso = 20 luglio 2009 | urlarchivio = https://web.archive.org/web/20090728041600/http://www.maxim-ic.com/products/microcontrollers/maxq/ | dataarchivio = 28 luglio 2009 | urlmorto = sì }}
* {{cita web | 1 = http://www.sccs.swarthmore.edu/users/06/adem/engin/e25/finale/ | 2 = OISC Implementation with subleq | accesso = 20 luglio 2009 | urlarchivio = https://web.archive.org/web/20151121172708/http://www.sccs.swarthmore.edu/users/06/adem/engin/e25/finale/ | dataarchivio = 21 novembre 2015 | urlmorto = sì }}
*Univ. of Waterloo URISC: F. Mavaddat and B. Parhami, [http://www.ece.ucsb.edu/~parhami/pubs_folder/parh88-ijeee-ultimate-risc.pdf URISC: The Ultimate Reduced Instruction Set Computer], ''Int'l J. Electrical Engineering Education'', Vol. 25, No. 4, pp.&nbsp;327–334, October 1988.
*Univ. of Iowa Ultimate RISC: http://www.cs.uiowa.edu/~jones/arch/risc/
 
== Voci correlate ==
* [[Linguaggio assembly]]
*[[Assembly]]
* [[minimalMinimal instruction set computer]]
* [[zeroReduced instruction set computer]]
*[[RISC]]
* [[Zero instruction set computer]]
*[[URISC]]
*[[zero instruction set computer]]
 
== Collegamenti esterni ==
* {{cita web|https://eigenratios.blogspot.com/2006/09/mark-ii-oisc-self-interpreter.html|Mark II OISC Self-Interpreter}}
* {{cita web|https://impomatic.blogspot.com/2009/01/redcode-interpretter-for-rssb-single.html|Redcode interpreter per RSSB}}
* {{cita web|https://retrocode.blogspot.com/2009/01/ultimate-risc-one-instruction-set.html|The Ultimate RISC One Instruction Computing}}
* {{cita web|https://bitstuff.blogspot.com/2007/02/subtract-and-branch-if-negative.html|SBN Computer}}
* {{cita web | 1 = http://mazonka.com/subleq/ | 2 = SUBLEQ compilatore ed emulatore | accesso = 20 luglio 2009 | dataarchivio = 24 febbraio 2009 | urlarchivio = https://web.archive.org/web/20090224180810/http://mazonka.com/subleq/ | urlmorto = sì }}
* [https://esolangs.org/wiki/Subleq Subleq] su [[Esoteric Programming Language Wiki]]
* [https://esolangs.org/wiki/RSSB RSSB] su [[Esoteric Programming Language Wiki]]
* {{cita web |1=http://www.caamp.info |2=Computer Architecture: A Minimalist Perspective (CAAMP) |accesso=5 novembre 2018 |urlarchivio=https://web.archive.org/web/20090613042342/http://www.caamp.info/ |dataarchivio=13 giugno 2009 |urlmorto=sì }}
* [https://www.esolangs.org/wiki/BitBitJump BitBitJump] OISC con istruzione che copia un solo nit.
* BitBitJump [http://mazonka.com/bbj/ implementazione] {{Webarchive|url=https://web.archive.org/web/20110820202004/http://mazonka.com/bbj/ |date=20 agosto 2011 }} - assembler ed emulatore.
 
{{Controllo di autorità}}