Undâr Programming Language

A statically-typed permacomputing-oriented language for the purpose of creating 1st generation style 3D games and graphical user interfaces that work on constrained systems, microcontrollers, retro consoles, and the web using emscripten. It runs on the Reality Engine a 32 bit register-based VM written in C89.

Install

git clone https://git.alfrescocavern.com/zongor/undar-lang.git
cd undar-lang && make
./build/linux/undar-linux-debug ./test/hello.asm.lisp

Hello World

/**
 * High level C-like syntax (WIP)
 */
function main(int argc, str[] argv) {
  str name = "World";
  if (argc > 1) {
      name = argv[1];
  }
  print("Hello, {name}!");
  return 0;
}
((code 
  (label main  
    (load-immediate $1 &hello-str) ; load hello string ptr
    (call &pln ($1) nil)
    (halt)) ; done
  (label pln 
    (load-immediate $1 &terminal-namespace) ; get terminal device
    (load-immediate $11 0)
    (syscall OPEN $1 $1 $11)  
    (load-immediate $3 &new-line)
    (load-offset-32 $7 $1 4) ; load handle
    (string-length $2 $0)
    (syscall WRITE $7 $0 $2)
    (string-length $4 $3)
    (syscall WRITE $7 $3 $4)
    (return nil)))
(data 
  (label terminal-namespace "/dev/term/0")
  (label new-line "\n")
    (label hello-str "nuqneH 'u'?")))

Philosophy


Development Timeline

Milestone Feature Status
Pre Alpha Primitive Types Done
Q16.16 fixed point Reals Done
Arithmetic Operations Done
Alpha S-Expression Assembler Done
Touch Device Done
Webassembly Arch Done
Paint program Done
Beta Display Device Done
Mouse Device Done
Terminal Device Done
Keyboard Device Done
8bit, 16bit numbers Done
Memory allocation refactor Done
Compiler In progress
Static Arrays Hardcoded implementation
Plex Implementation Hardcoded implementation
String Opcodes Todo
Fonts Todo
File Device Todo
Local Tunnel Implementation Todo
Minimal Standard Library Todo
Immediate mode UI Todo
Trigonometry Operations Todo
Unit of measure Todo
3D Graphics Math/Primitives Todo
Gamepad/Joystick Device Todo
3D Collision/Physics Todo
Proof of concept 3D platformer Todo
Version 1.0 Sound Device Todo
Network Device Todo
Actor implementation Todo
Networked Tunnel Implementation Todo
Multiplayer Proof of concept 3D platformer Todo
Actor system Todo
Localization Todo
Arch without FPU (Maybe PS1?) Todo
MMO Proof of concept Todo
Post Version 1.0 Code Editor Todo
Self hosted assembler Todo
Self hosted compiler Todo
Multithreaded actors Todo

Inspired by

Uxn, Plan 9, Dusk OS, Dis VM Forth, Lisp, Fortran, C, Zig, Lua, Lox,