uxn tutorial outline

This commit is contained in:
sejo 2021-07-21 19:22:54 -05:00
parent 727b3c2094
commit b95a4e795d
2 changed files with 108 additions and 0 deletions

View File

@ -8,6 +8,9 @@ it uses the {postfix} notation.
our projects and sketches are hosted in the {uxnería}
# tutorial
there's a {uxn tutorial} in the making :)
# common code structures

105
src/uxn_tutorial.gmo Normal file
View File

@ -0,0 +1,105 @@
# uxn tutorial
a beginner's guide for programming the {uxn} computer.
(work in progress)
a slow-paced companion to the official documentation.
=> https://wiki.xxiivv.com/site/uxntal.html uxntal
=> https://wiki.xxiivv.com/site/uxnemu.html uxnemu
# outline
the tutorial is divided in 8 days (or sections), as it could be followed along with a workshop.
## day 1: the basics
* why uxn?
* {postfix} notation
* uxn computer architecture
* installation and toolchain
* a very basic hello world
* labels, macros, and runes
* an improved hello world
* print a digit
new instructions: LIT, DEO, ADD, SUB
=> https://git.sr.ht/~rabbits/uxn/ uxn repo
## day 2: the screen
* short mode
* system colors
* draw pixels
* sprites: chr format, nasu
* draw sprites
* stack operations
* practice: manual repetition of sprite
new instructions: DEI, MUL, DIV, SWP, OVR, ROT, DUP, POP
new mode: short mode
=> https://wiki.xxiivv.com/site/nasu.html nasu
## day 3: interactivity with the keyboard
* controller vector
* flow control: conditionals, relative and absolute jumps
* runes for addresses
* button and key
* bitwise masks
* practice: move/change sprite with keyboard
new instructions: EQU, NEQ, JCN, JMP, AND, ORA, EOR, SFT
## day 4: loops and animation
* flow control: repetition of a sprite
* screen vector
* variables: zero page, relative, absolute
* offsets in addresses
* animation timing
* practice: animated sprite
new instructions: LTH, GTH, STZ, STR, STA, LDZ, LDR, LDA
## day 5: interactivity with mouse
* mouse device and vector
* return stack and mode
* subroutines: parameters, calling, returning
* practice: sprite as pointer
* practice: simple drawing tool
new instructions: STH, JSR
new mode: return mode
## day 6: audio
* the audio device
* samples as audio sprites
* adsr
* pitch
* practice: small music instrument
## day 7: keep mode and other devices
* keep mode
* re-writing code with keep mode
* file device: saving and loading a simple state
* datetime device: reading the date and time
* practice: visualization of time
new mode: keep mode
## day 8: demo time
* share what you created :)
# support
if you found this tutorial to be helpful, consider sharing it and {support} it :)