link to nchrs notes, small formatting
This commit is contained in:
parent
09ea42025d
commit
f7783b9e0e
|
@ -105,6 +105,9 @@ we'll come back to postfix notation and the stack very soon!
|
|||
|
||||
one of the perks of programming a computer at a low-level of abstraction, as we will be doing with uxn, is that we have to know and be aware of its internal workings.
|
||||
|
||||
for this section of the tutorial, i recommend you to follow along with the great illustrations and notes by Rostiger:
|
||||
=> https://nchrs.xyz/uxn_notes.html nchrs: uxn notes
|
||||
|
||||
## 8-bits and hexadecimal
|
||||
|
||||
binary words of 8-bits, also known as bytes, are the basic elements of data encoding and manipulation in uxn.
|
||||
|
@ -117,26 +120,26 @@ a byte needs two hexadecimal digits (nibbles) to be expressed, and a short needs
|
|||
|
||||
## the uxn cpu
|
||||
|
||||
it is said that the uxn cpu is a beet, capable of performing 32 different instructions with three different mode flags.
|
||||
it is said that the uxn cpu is a beet, capable of performing 36 different instructions with three different mode flags.
|
||||
|
||||
each instruction along with its mode flags can be encoded in a single word of 8-bits.
|
||||
|
||||
all of these instructions operate with elements in the stack, either to get from it their operands and/or to push down onto it their results.
|
||||
|
||||
we'll be covering these instructions slowly over this tutorial.
|
||||
we'll be covering these instructions very calmly over this tutorial.
|
||||
|
||||
## memory
|
||||
|
||||
memory in a uxn computer consists in four separate spaces:
|
||||
|
||||
* main memory, with 65536 bytes
|
||||
* i/o memory, with 256 bytes divided in 16 sections (or devices) of 16 bytes each
|
||||
* working stack, with 256 bytes
|
||||
* return stack, with 256 bytes
|
||||
* a main memory, with 65536 bytes.
|
||||
* i/o memory, with 256 bytes divided in 16 sections (or devices) of 16 bytes each.
|
||||
* a working stack, with 256 bytes.
|
||||
* a return stack, with 256 bytes.
|
||||
|
||||
each byte in the 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 of them 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 8-bits (1 byte), and it is meant for data storage during runtime of the machine.
|
||||
the first 256 bytes of the main memory constitute a section called the zero-page. this section can be addressed by 8-bits (1 byte), and it is meant for data storage during the runtime of the machine.
|
||||
|
||||
there are different instructions for interacting with each of these memory spaces.
|
||||
|
||||
|
|
Loading…
Reference in New Issue