logoalt Hacker News

tatskaariyesterday at 4:22 PM2 repliesview on HN

You don't need a JS bootloader to write an OS in JS. The bootloader just drops the machine into some memory address for it to start executing your OS init script. that bit could be a Javascript interpreter. You can't do much with the architecture in Javascript though, because it doesn't allow you to map memory directly to your types (unless there's some ungodly nonesense I'm not aware of) so you'll have to drop into C/asm to e.g. interact with the ports/registers/tables to set up userspace.


Replies

Zambyteyesterday at 4:57 PM

An OS doesn't need to have a user space :)

monocasayesterday at 8:10 PM

You should be able to write a meta circular VM in JavaScript that targets bare metal without any C or asm.