commit cfd89506b99e9b005ee7788275101cce8d8f25ad
parent b2adb7210eb83d2dc8df63a675ac7303084d85a4
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Sat, 21 Jan 2023 13:57:05 -0500
home: new root dir
see doc/dirs
Diffstat:
3 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/fs/home/init.fs b/fs/home/init.fs
@@ -0,0 +1,45 @@
+\ Initialization for PC
+: ARCH S" i386" ;
+
+f<< /drv/pc/acpi.fs
+\ Serial communication
+f<< /drv/pc/com.fs
+f<< /sys/grid.fs
+f<< /drv/pc/vga.fs
+VgaGrid :new ' grid rebind
+grid :self dup to console writeio to stdio writeio
+
+f<< /drv/pc/pci.fs
+\ IDE boot drive
+f<< /drv/pc/ata.fs
+ATA0:0 ATADrive :reset drop ATA0:0 bootfs to Filesystem drv
+
+f<< /drv/pc/pic.fs
+pic$ idt$
+
+f<< /sys/kbd.fs
+f<< /sys/mouse.fs
+f<< /drv/pc/ps28042.fs
+f<< /sys/ps2.fs
+
+8042ps2$
+' 8042kbd@? ' (ps2@?) realias
+' ps2keyset1? ' key? realias
+'X' emit key 'a' = [if] f<< /init2.fs \s [then]
+
+f<< fs/fat.fs
+8042mouse$
+PS2Mouse :new ' mouse rebind
+640 480 4 mouse :configure
+
+f<< /sys/loop.fs
+f<< /drv/pc/a20.fs
+a20$
+f<< /sys/scratch.fs
+f<< /sys/screen.fs
+?f<< /sys/scratch.fs
+f<< /lib/fmt.fs
+f<< /lib/diag.fs
+f<< /sys/rdln.fs
+f<< /text/pager.fs
+: init S" Dusk OS\n" stype .free rdln$ stdio$ spager$ quit ;
diff --git a/fs/home/init2.fs b/fs/home/init2.fs
@@ -0,0 +1,34 @@
+." alternate!\n"
+f<< fs/fat2.fs
+
+8042mouse$
+PS2Mouse :new ' mouse rebind
+640 480 4 mouse :configure
+
+f<< /sys/loop.fs
+f<< /drv/pc/a20.fs
+a20$
+f<< /sys/scratch.fs
+f<< /sys/screen.fs
+f<< /drv/pc/vesa.fs
+VESA1Screen :new ' screen rebind
+
+?f<< /gr/cursor.fs
+screen :self Cursor :new structbind Cursor cursor
+
+0 value hidemousecursor
+: mousemove ( -- )
+ mouseupdate screen :activated? if
+ hidemousecursor not if mouse :x mouse :y cursor :move then
+ else
+ mouse :x 16 lshift mouse :y or grid :dbgnum1!
+ mouse buttons grid :dbgnum2! then ;
+\ Common part of init.fs. Machine-independent
+\ As a user, you'll want to adapt this to your needs.
+?f<< /sys/scratch.fs
+f<< /lib/fmt.fs
+f<< /lib/diag.fs
+f<< /sys/rdln2.fs
+f<< /text/pager.fs
+\ we don't automatically call spager$ in init because of automated tests,
+: init S" Dusk OS\n" stype .free rdln$ stdio$ quit ;
diff --git a/fs/home/u.fs b/fs/home/u.fs
@@ -0,0 +1,2 @@
+: filesz" [compile] p" Path :info FSInfo size ;
+: spitcom com1 :self file :spit ;
+\ No newline at end of file