Examine individual changes
Jump to navigation
Jump to search
This page allows you to examine the variables generated by the Abuse Filter for an individual change.
Variables generated for this change
Variable | Value |
---|---|
Edit count of the user (user_editcount) | 0 |
Name of the user account (user_name) | 'TheCoderPro' |
Age of the user account (user_age) | 6478323 |
Page ID (page_id) | 11528 |
Page namespace (page_namespace) | 0 |
Page title (without namespace) (page_title) | 'NoRAL' |
Full page title (page_prefixedtitle) | 'NoRAL' |
Action (action) | 'edit' |
Edit summary/reason (summary) | '/* The Instruction set */ ' |
Old content model (old_content_model) | 'wikitext' |
New content model (new_content_model) | 'wikitext' |
Old page wikitext, before the edit (old_wikitext) | ''''No-Register Assembly Language'''
- A simple assembly-style language based on a hypothetical processor that has no internal registers. Created by [[User:DMC]]
==General Concept==
* All volatile memory is external to the processor
* Addresses are 16 bit, stored big endian
* Memory is 8 bits
* Instructions use 0, 1, or 2 memory references
* m1 - first memory reference
* m2 - second memory reference
* xxx m1 m2 - 3 letter mnemonic, arguments separated with spaces
* Program listings are in hex
* It’s okay to write self-modifying code (maybe even necessary)
* # comment with ‘#’ as first character in a line
* Turing complete: No, only 64k addressable memory
==Addressing modes==
* Implied: (brk, nop, ret)
* Absolute: 2 byte address
* Immediate: 1 byte (sto)
* Indirect: mvi
==The Virtual machine==
{| class="wikitable"
!Description
!Memory
|-
|Total memory
|0000 - ffff
|-
|Program counter
|0000 - 0001 (initialized to 0200)
|-
|carry flag
|0002
|-
|zero flag
|0003
|-
|Top of stack
|0004
|-
|Stack
|0005 - 00ff
|-
|Display memory
|0100 - 01ff, 32 x 8, 256 bytes
|-
|Start of program memory
|0200
|}
==The Instruction set==
{| class="wikitable"
!Instruction
!Op Code
!Description
!Flags
|-
|add
|01
|m1 = m1 + m2 + carry
|<center>CZ</center>
|-
|and
|02
|m1 = m1 & m2
|<center>Z</center>
|-
|jmp
|03
|pc = m1
|<center>–</center>
|-
|jpc
|04
|if C = 1: PC = m1
|<center>–</center>
|-
|jpz
|05
|if Z = 1: PC = m1
|<center>–</center>
|-
|jsr
|06
|push PC, PC = m1
|<center>–</center>
|-
|mov
|07
|m1 = m2
|<center>Z</center>
|-
|nop
|08
|place holder
|<center>–</center>
|-
|not
|09
|m1 = not(m1)
|<center>Z</center>
|-
|orr
|0a
|m1 = m1 or m2
|<center>Z</center>
|-
|pop
|0b
|pop m1
|<center>Z</center>
|-
|psh
|0c
|psh m1
|<center>–</center>
|-
|ret
|0d
|pop PC
|<center>–</center>
|-
|shl
|0e
|shl m1
|<center>CZ</center>
|-
|shr
|0f
|shr m1
|<center>CZ</center>
|-
|sto
|10
|m1 = m2(immediate byte)
|<center>Z</center>
|-
|sub
|11
|m1 = m1 - m2 - carry
|<center>CZ</center>
|-
|inc
|12
|m1 += 1
|<center>CZ</center>
|-
|dec
|13
|m1 -= 1
|<center>CZ</center>
|-
|mvi
|14
|m1(absolute) = m2(indirect)
|<center>Z</center>
|-
|get
|15
|input decimal number mod 256
|<center>Z</center>
|-
|dsp
|16
|display program state during execution
|<center>–</center>
|-
|brk
|00
|Halt program
|<center>–</center>
|}
==Example programs==
===Hello World!\n===
# just store all the ascii values in screen memory
sto 0100 48
sto 0101 65
sto 0102 6c
sto 0103 6c
sto 0104 6f
sto 0105 2c
sto 0106 20
sto 0107 57
sto 0108 6f
sto 0109 72
sto 010a 6c
sto 010b 64
sto 010c 21
brk
# brk only necessary if the next memory location is not zero
Output:
Program Counter: 0234
Zero Flag: 00
Carry Flag: 00
Stack Pointer: 00
+---------Screen Display---------+
|Hello, World! |
| |
| |
| |
| |
| |
| |
| |
+--------------------------------+
===Clear screen===
sto 1000 20
mov 0100 1000
inc 0206
jpz 0212
jmp 0204
brk
Output:
Program Counter: 0213
Zero Flag: 01
Carry Flag: 01
Stack Pointer: 00
===Truth Machine===
get 0100
jpz 0211
sto 0100 31
inc 0208
dsp
jmp 0206
sto 0100 30
dsp
brk
==External resources==
*[https://pastebin.com/mxq3kVx3 NoRAL] – Interpreter in Python 3
[[Category:Languages]]
[[Category:Implemented]]
[[Category:Low-level]]
[[Category:2017]]' |
New page wikitext, after the edit (new_wikitext) | ''''No-Register Assembly Language'''
- A simple assembly-style language based on a hypothetical processor that has no internal registers. Created by [[User:DMC]]
==General Concept==
* All volatile memory is external to the processor
* Addresses are 16 bit, stored big endian
* Memory is 8 bits
* Instructions use 0, 1, or 2 memory references
* m1 - first memory reference
* m2 - second memory reference
* xxx m1 m2 - 3 letter mnemonic, arguments separated with spaces
* Program listings are in hex
* It’s okay to write self-modifying code (maybe even necessary)
* # comment with ‘#’ as first character in a line
* Turing complete: No, only 64k addressable memory
==Addressing modes==
* Implied: (brk, nop, ret)
* Absolute: 2 byte address
* Immediate: 1 byte (sto)
* Indirect: mvi
==The Virtual machine==
{| class="wikitable"
!Description
!Memory
|-
|Total memory
|0000 - ffff
|-
|Program counter
|0000 - 0001 (initialized to 0200)
|-
|carry flag
|0002
|-
|zero flag
|0003
|-
|Top of stack
|0004
|-
|Stack
|0005 - 00ff
|-
|Display memory
|0100 - 01ff, 32 x 8, 256 bytes
|-
|Start of program memory
|0200
|}
==The Instruction set==
{| class="wikitable"
!Instruction
!Op Code
!Description
!Flags
|-
|add
|01
|m1 = m1 + m2 + carry
|<center>CZ</center>
|-
|and
|02
|m1 = m1 & m2
|<center>Z</center>
|-
|jmp
|03
|pc = m1
|<center>–</center>
|-
|jpc
|04
|if C = 1: PC = m1
|<center>–</center>
|-
|jpz
|05
|if Z = 1: PC = m1
|<center>–</center>
|-
|jsr
|06
|push PC, PC = m1
|<center>–</center>
|-
|mov
|07
|m1 = m2
|<center>Z</center>
|-
|nop
|08
|place holder
|<center>–</center>
|-
|not
|09
|m1 = not(m1)
|<center>Z</center>
|-
|orr
|0a
|m1 = m1 or m2
|<center>Z</center>
|-
|pop
|0b
|pop m1
|<center>Z</center>
|-
|psh
|0c
|psh m1
|<center>–</center>
|-
|ret
|0d
|pop PC
|<center>–</center>
|-
|shl
|0e
|shl m1
|<center>CZ</center>
|-
|shr
|0f
|shr m1
|<center>CZ</center>
|-
|sto
|10
|m1 = m2(immediate byte)
|<center>Z</center>
|-
|sub
|11
|m1 = m1 - m2 - carry
|<center>CZ</center>
|-
|inc
|12
|m1 += 1
|<center>CZ</center>
|-
|dec
|13
|m1 -= 1
|<center>CZ</center>
|-
|mvi
|14
|m1(absolute) = m2(indirect)
|<center>Z</center>
|-
|get
|15
|input decimal number mod 256
|<center>Z</center>
|-
|dsp
|16
|display program state during execution
|<center>–</center>
|-
|brk
|00
|Halt program
|<center>–</center>
|}
The command dat means to have the byte after the opcode to be placed in memory instead of a command.
==Example programs==
===Hello World!\n===
# just store all the ascii values in screen memory
sto 0100 48
sto 0101 65
sto 0102 6c
sto 0103 6c
sto 0104 6f
sto 0105 2c
sto 0106 20
sto 0107 57
sto 0108 6f
sto 0109 72
sto 010a 6c
sto 010b 64
sto 010c 21
brk
# brk only necessary if the next memory location is not zero
Output:
Program Counter: 0234
Zero Flag: 00
Carry Flag: 00
Stack Pointer: 00
+---------Screen Display---------+
|Hello, World! |
| |
| |
| |
| |
| |
| |
| |
+--------------------------------+
===Clear screen===
sto 1000 20
mov 0100 1000
inc 0206
jpz 0212
jmp 0204
brk
Output:
Program Counter: 0213
Zero Flag: 01
Carry Flag: 01
Stack Pointer: 00
===Truth Machine===
get 0100
jpz 0211
sto 0100 31
inc 0208
dsp
jmp 0206
sto 0100 30
dsp
brk
==External resources==
*[https://pastebin.com/mxq3kVx3 NoRAL] – Interpreter in Python 3
[[Category:Languages]]
[[Category:Implemented]]
[[Category:Low-level]]
[[Category:2017]]' |
Unified diff of changes made by edit (edit_diff) | '@@ -173,4 +173,5 @@
|<center>–</center>
|}
+The command dat means to have the byte after the opcode to be placed in memory instead of a command.
==Example programs==
' |
New page size (new_size) | 3881 |
Old page size (old_size) | 3780 |
Lines added in edit (added_lines) | [
0 => 'The command dat means to have the byte after the opcode to be placed in memory instead of a command.'
] |
Unix timestamp of change (timestamp) | 1596411954 |