Page namespace (page_namespace) | 0 |
Page title (without namespace) (page_title) | 'Asdf' |
Full page title (page_prefixedtitle) | 'Asdf' |
Old content model (old_content_model) | 'wikitext' |
New content model (new_content_model) | 'wikitext' |
Old page wikitext, before the edit (old_wikitext) | '{{lowercase}}
'''asdf''' is an [[esoteric programming language]] created by David Catt ([[user:David.werecat]]) which uses only 4 instructions: <code>a</code>, <code>s</code>, <code>d</code> and <code>f</code>.
== Instructions ==
The pointer begins at memory location 3. It can be moved left or right infinitely. IO is memory mapped. To read from the console, toggle the bit at location 0 twice without moving or hitting a loop; this will read one bit from the console into location 2. To write to the console, toggle the bit at location 1 twice without moving or hitting a loop; this will write one bit from location 2 to the console. Since all console IO is bytewise, all reads and writes to the console are buffered (8 bits).
{| class="wikitable"
! Instruction || Description
|-
| <code>a</code> || Toggles the bit at the current location and sets the toggle flag.
|-
| <code>s</code> || If the toggle flag is clear, move the pointer right. If the toggle flag is set, move the pointer left. Either way, clear the toggle flag.
|-
| <code>d</code> || If the bit at the current location is 1, jump forward to the matching <code>f</code>. Also, clear the toggle flag.
|-
| <code>f</code> || If the bit at the current location is 0, jump backward to the matching <code>d</code>. Also, clear the toggle flag.
|}
== Examples ==
=== [[Hello, world!]] ===
asaasaasssasaasssasaaaasssasaasssasaaaaaaaasssasaaaasssasaaaasssasaasssasaasssasaasssasaasssasaaaasssasaasssasaaaasssasaaaaaasssas
aaaasssasaasssasaaaasssasaaaaaasssasaaaasssasaasssasaaaaaaaasssasaaaasssasaasssasaasssasaaaasssasaaaaaaaasssasaasssasaaaaaaaaaaaas
ssasaaaaaasssasaasssasaaaaaasssasaasssasaaaasssasaasssasaaaaaaaasssasaasssasaaaaaasssasaaaasssasaasssasaaaasssasaaaasssasaasssasaa
aasssasaaaaaasssasaaaasssasaaaasssasaasssasaaaaaaaasssasaasssasaaaaaaaasssasaa
=== Move the pointer right, regardless of toggle bit (note: may perform I/O at low addresses) ===
aasss
=== Move the pointer left, regardless of toggle bit (note: may perform I/O at low addresses) ===
aas
== External resources ==
* [http://www.mediafire.com/?81a0ttqr830c218 Visual Basic .NET interpreter and sample programs]
[[Category:Languages]]
[[Category:2012]]
[[Category:Turing complete]]
[[Category:Turing tarpits]]
[[Category:Low-level]]
[[Category:Implemented]]
[[Category:Brainfuck derivatives]]
[[Category:Cell-based]]' |
New page wikitext, after the edit (new_wikitext) | '{{lowercase}}
'''asdf''' is an [[esoteric programming language]] created by David Catt ([[user:David.werecat]]) which uses only 4 instructions: <code>a</code>, <code>s</code>, <code>d</code> and <code>f</code>.
== Instructions ==
The pointer begins at memory location 3. It can be moved left or right infinitely. IO is memory mapped. To read from the console, toggle the bit at location 0 twice without moving or hitting a loop; this will read one bit from the console into location 2. To write to the console, toggle the bit at location 1 twice without moving or hitting a loop; this will write one bit from location 2 to the console. Since all console IO is bytewise, all reads and writes to the console are buffered (8 bits).
{| class="wikitable"
! Instruction || Description
|-
| <code>a</code> || Toggles the bit at the current location and sets the toggle flag.
|-
| <code>s</code> || If the toggle flag is clear, move the pointer right. If the toggle flag is set, move the pointer left. Either way, clear the toggle flag.
|-
| <code>d</code> || If the bit at the current location is 1, jump forward to the matching <code>f</code>. Also, clear the toggle flag.
|-
| <code>f</code> || If the bit at the current location is 0, jump backward to the matching <code>d</code>. Also, clear the toggle flag.
|}
== Examples ==
=== [[Hello, world!]] ===
asaasaasssasaasssasaaaasssasaasssasaaaaaaaasssasaaaasssasaaaasssasaasssasaasssasaasssasaasssasaaaasssasaasssasaaaasssasaaaaaasssas
aaaasssasaasssasaaaasssasaaaaaasssasaaaasssasaasssasaaaaaaaasssasaaaasssasaasssasaasssasaaaasssasaaaaaaaasssasaasssasaaaaaaaaaaaas
ssasaaaaaasssasaasssasaaaaaasssasaasssasaaaasssasaasssasaaaaaaaasssasaasssasaaaaaasssasaaaasssasaasssasaaaasssasaaaasssasaasssasaa
aasssasaaaaaasssasaaaasssasaaaasssasaasssasaaaaaaaasssasaasssasaaaaaaaasssasaa
=== Move the pointer right, regardless of toggle bit (note: may perform I/O at low addresses) ===
aasss
=== Move the pointer left, regardless of toggle bit (note: may perform I/O at low addresses) ===
aas
=== Toggle the bit at the current location and clear the toggle flag ===
ass
== External resources ==
* [http://www.mediafire.com/?81a0ttqr830c218 Visual Basic .NET interpreter and sample programs]
[[Category:Languages]]
[[Category:2012]]
[[Category:Turing complete]]
[[Category:Turing tarpits]]
[[Category:Low-level]]
[[Category:Implemented]]
[[Category:Brainfuck derivatives]]
[[Category:Cell-based]]' |
Unified diff of changes made by edit (edit_diff) | '@@ -31,4 +31,7 @@
=== Move the pointer left, regardless of toggle bit (note: may perform I/O at low addresses) ===
aas
+
+=== Toggle the bit at the current location and clear the toggle flag ===
+ ass
== External resources ==
' |