Editing Varvara

Jump to navigation Jump to search

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.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 6: Line 6:


=== Memory ===
=== Memory ===
Memory in a uxn computer consists in four separate areas: Main RAM with 64kb, 256 bytes each of: I/O memory, working stack, and return stack. Programs can move stacks into addressable range to allow reading and writing directly into stack memory. In this way, peripherals such as a controller, mouse, and keyboard can be addressed.
The Uxn virtual CPU can address 64kb of memory; programs can move stacks into addressable range to allow reading and writing directly into stack memory. In this way, peripherals such as a controller, mouse, and keyboard can be addressed.


{| class="wikitable"  
{| class="wikitable"  
Line 41: Line 41:
| 256 bytes
| 256 bytes
|}
|}
 
Uxn is a single-page virtual machine with 32 opcodes. This system has no registers, and instead uses a 127-level stack.
Each byte in main memory has an address of 16 bits (2 bytes) in size, while each byte in the i/o memory has an address of 8 bits (1 byte) in size. Both can be accessed randomly.
 
The first 256 bytes of the main memory constitute a section called the "zero page". this section can be addressed by a single byte and it is meant for data storage during runtime. The main memory stores the program to be executed starting at the 257th byte, or 0x100. This byte is the 0100 starting memory address for a Uxntal program.


== Devices ==
== Devices ==
Line 162: Line 159:
| a b>>c8l<<c8h
| a b>>c8l<<c8h
|}
|}
The Uxn CPU reads one byte at a time from the main memory starting at 0100. The program counter is a 16-bit word that indicates the address of the byte to read next. Each byte read corresponds to an opcode which  may cause a change in the stack(s) or the normal flow of the program counter; instead of pointing to the next byte in memory, it can be made to point elsewhere, "jumping" from one place in memory to another.


[[Category: Fantasy computers]]
[[Category: Fantasy computers]]
Please note that all contributions to Fantasy Console Wiki are considered to be released under the Creative Commons Zero (Public Domain) (see FCWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, 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. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Template used on this page: