Menu

Disk Images

Brian Ruthven

The disk_images subdirectory contains disk image suitable for an emulator. "fuse" is definitely OK, other emulators, YMMV. They could be written out to a real +3 disk, but I've not tried that yet.

Note the shell currently only tries to exec() exactly what was typed, so be sure to include the ".com" extension too.

These images represent some significant milestones:

476:092d61465fba.dsk: Backspace now works. Random number generator implemented in kernel. forkexec() is renamed to spawn(), as I discovered I've effectively re-invented posix_spawn(). Some limited test suites have been created.

446:4fc2779f5f54-init.dsk: A better init program. This now reads from a text file "inittab", and contains (limited) support for SVR4-style inittab lines. Only "once" and "wait" are properly supported (as there is no child process monitoring for respawn to work currently).

ROM calls are now wrapped with mutex locks rather than disabling preemption. This allows for keystrokes to be processed more smoothly, at the expense of lengthening the head load time delay when starting up the disk. Alternate registers are also now saved during context switch, making preemption of ROM3 code safe as well (again, protected by a mutex lock to avoid concurrency).

375:5f3d507ef3f1-kernelmove.dsk: Various. DOS CATALOG syscall, simplify RAM paging (especially during dos calls), debugger overhaul (now similar to Solaris' mdb), basic shell implemented, kernel moved lower down RAM.

286:d1cc710292bd-newboot.dsk: Rework the boot sector. Moved the DOS INIT and GET/SET1346 calls into the boot sector.

256:29113a5d5ad6-reloc.dsk: Relocatable executable support added. Userland executables now don't need to load at a fixed address which was defined at compile time.

205:9a66674edbb0-proc.dsk: Added malloc/free interface, along with exit(). Simple test-program runs to check memory can be malloc'd and freed from userland.

145:e8eef52f7d39-userland.dsk: Userland support. The kernel can now load fixed-address executables from disk and run them. A system call interface allows userland calls to open/close/read/write/seek/printf/forkexec.

112_bf04157b6a58-dos.dsk: DOS support added. Multi-thread testing. 3 counter threads sharing 1 mutex lock, 1 counter thread which exits when 0xffff reached, 1 DOS test thread (open/create/read/write/close), 1 delay thread (printing 10 '.' characters, 1 per sec), 1 border flashing thread.

The counter threads increment a 16-bit value directly in the screen memory (look in the bottom right corner of the screen). The 3 counters acquire the mutex lock, update the value, then drop the loop in a tight loop. Only the 50Hz preemption tick will evict the thread, and one of the other counters can only execute if the preemption happened when the mutex lock was not held.

Pressing keys can disturb the timing of the mutex lock acquisition and border effect, as the length of the interrupt codepath during context switch varies according to what keys (if any) are pressed).


Related

Wiki: Home

MongoDB Logo MongoDB