Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
One-instruction set computer
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Emulation ==== The following program (written in [[pseudocode]]) emulates the execution of a {{mono|subleq}}-based OISC: <syntaxhighlight lang="c"> int memory[], program_counter, a, b, c program_counter = 0 while (program_counter >= 0): a = memory[program_counter] b = memory[program_counter+1] c = memory[program_counter+2] if (a < 0 or b < 0): program_counter = -1 else: memory[b] = memory[b] - memory[a] if (memory[b] > 0): program_counter += 3 else: program_counter = c </syntaxhighlight> This program assumes that {{mono|memory[]}} is indexed by ''nonnegative'' integers. Consequently, for a {{mono|subleq}} instruction ({{mono|a}}, {{mono|b}}, {{mono|c}}), the program interprets {{mono|a < 0}}, {{mono|b < 0}}, or an executed branch to {{mono|c < 0}} as a halting condition. Similar interpreters written in a {{mono|subleq}}-based language (i.e., [[self-interpreter]]s, which may use [[self-modifying code]] as allowed by the nature of the {{mono|subleq}} instruction) can be found in the external links below. A general purpose [[Symmetric multiprocessing|SMP]]-capable 64-bit [[operating system]] called '''Dawn OS''' has been implemented in an emulated Subleq machine. The OS contains a [[C language|C]]-like compiler. Some memory areas in the virtual machine are used for peripherals like the keyboard, mouse, hard drives, network card, etc. Basic applications written for it include a media player, painting tool, document reader and scientific calculator.<ref>{{cite web | url=http://users.atw.hu/gerigeri/DawnOS/index.html | title=Dawn for SUBLEQ }}</ref> A 32-bit Subleq computer with a graphic display and a keyboard called '''Izhora''' has been constructed by [[Yoel Matveyev]] as a large [[cellular automaton]] pattern.<ref>https://www.gazetaeao.ru/zanimatelnaya-nauka-vchera-segodnya-zavtra/ A Russian article on popular science in [[Birobidzhaner Shtern]] with a brief discussion of Yoel Matveyev's Izhora computer</ref><ref>https://habr.com/ru/post/584596/ A description of the virtual computer Izhora on [[Habr]] (in Russian)</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
One-instruction set computer
(section)
Add topic