████████╗███████╗███╗ ███╗██████╗ ██████╗ ╚══██╔══╝██╔════╝████╗ ████║██╔══██╗██╔═══██╗ ██║ █████╗ ██╔████╔██║██████╔╝██║ ██║ ██║ ██╔══╝ ██║╚██╔╝██║██╔═══╝ ██║ ██║ ██║ ███████╗██║ ╚═╝ ██║██║ ╚██████╔╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝
Tempo v1.3.0 brings assignment expressions, automatic struct field offsets, enhanced type system, and everything you need to write a complete OS without C!
Full support for assignment as an expression. Assign to variables, struct fields, and array elements.
Write natural code like x = y = 0
or point.x = 100
.
Struct fields now have automatically calculated offsets with proper alignment. Support for @packed structs to eliminate padding. The compiler handles all offset calculations.
Better type propagation throughout parsing. Variables carry type information for validation. Improved error messages for type mismatches and invalid operations.
Define complex data structures with precise memory layout. Support for @packed and @align attributes for hardware-level programming. Perfect for kernel data structures, device drivers, and network protocols.
Bounded pointers ptr<T, N> with compile-time bounds checking prevent buffer overflows. Raw pointers raw_ptr<T> available for hardware access. No null pointer exceptions!
Direct hardware control with inline assembly blocks. Support for input/output operands and clobber lists. Write interrupt handlers, context switches, and port I/O directly in Tempo.
All integer sizes (int8, int16, int32, int64), arrays with compile-time bounds, strings, characters, and boolean types. Type inference reduces boilerplate.
Every Tempo abstraction compiles to optimal assembly. No hidden allocations, no runtime, no garbage collector. You get exactly what you write, nothing more.
Built-in worst-case execution time analysis ensures deterministic behavior. Perfect for real-time systems where timing guarantees are critical.
struct Process @packed { pid: int32, state: int32, priority: int32, stack_ptr: raw_ptr<int32>, name: [16]int8 } function create_process(name: ptr<int8>) -> ptr<Process> { let proc = alloc<Process>(); proc->pid = next_pid(); proc->state = READY; proc->priority = NORMAL; copy_string(name, &proc->name); return proc; }
function outb(port: int16, value: int8) {
asm("outb %b0, %w1" :: "a"(value), "d"(port));
}
function inb(port: int16) -> int8 {
let result: int8;
asm("inb %w1, %b0" : "=a"(result) : "d"(port));
return result;
}
@interrupt
function timer_handler() {
// Handle timer interrupt
send_eoi(0x20);
}
function memcpy( dst: ptr<int8, N>, src: ptr<int8, N>, size: int32 ) @wcet(N) { let i: int32 = 0; while @wcet(N) i < size { dst[i] = src[i]; i = i + 1; } } // Compile-time bounds checking! let buffer: [256]int8; let data: [512]int8; memcpy(&buffer, &data, 256); // OK memcpy(&buffer, &data, 512); // Compile error!
@realtime(period: 1000, wcet: 100) function sensor_task() { let data = read_sensor(); process_data(data); update_control(data); } @constant_time function crypto_compare(a: ptr<int8, 32>, b: ptr<int8, 32>) -> bool { let diff: int32 = 0; for i in 0..32 { diff = diff | (a[i] ^ b[i]); } return diff == 0; }
Feature | Tempo v1.0 | C | Rust | Zig |
---|---|---|---|---|
Memory Safety | ✅ Compile-time | ❌ Manual | ✅ Borrow checker | ⚠️ Manual + debug |
Zero Overhead | ✅ Guaranteed | ✅ Yes | ✅ Yes | ✅ Yes |
WCET Analysis | ✅ Built-in | ❌ External tools | ❌ No | ❌ No |
Inline Assembly | ✅ First-class | ✅ Compiler-specific | ⚠️ Unsafe block | ✅ Yes |
Deterministic | ✅ By design | ⚠️ Depends on usage | ⚠️ Depends on usage | ⚠️ Mostly |
Learning Curve | ✅ Simple | ✅ Simple | ❌ Steep | ⚠️ Moderate |
Compile Speed | ✅ Fast | ✅ Fast | ❌ Slow | ✅ Fast |
git clone https://github.com/ipenas-cl/AtomicOS.git cd AtomicOS make build/tempo_compiler # Compile your first Tempo program ./build/tempo_compiler hello.tempo hello.s nasm -f elf32 hello.s -o hello.o ld -m elf_i386 hello.o -o hello # Or build AtomicOS entirely in Tempo! make all
Join us in building the next generation of systems software with Tempo!
Get Tempo Compiler