Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You've got all the BIOS calls you need to actually shunt sectors on and off disk, read keystrokes, and display characters, right?

So with some code simple enough to hand-assemble you could write the bare bones of a Forth "inner interpreter", and from there the Forth compiler, which necessarily has a command line interpreter (or at least, a thing that breaks a text buffer down into words).

Then a simple "DOS" would have a command like "dir" which would read the directory sector into a block, format it, and print it, and so on.

Using a normal Forth-style "block editor" on a system with files wouldn't have to be complicated, you'd just be working on a 1kB (two sectors) block at a time, starting from the first block referenced by the filename.

You'd get to a point where you could read, edit, and compile Forth definitions or even just cope with text files in MS-DOS formatted disks pretty quickly.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: