Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
One-instruction set computer
(section)
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>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)