-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
100 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
;; File: macro.inc | ||
|
||
;; Macro: defn name | ||
macro defn name | ||
{ | ||
virtual at 0 | ||
name name | ||
end virtual | ||
;; Macro: DEFN name | ||
macro DEFN x { | ||
virtual at 0 | ||
x x | ||
sizeof.#x: | ||
end virtual | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,6 @@ struc Partition | |
.lba dd ? | ||
.sectors dd ? | ||
} | ||
defn Partition | ||
DEFN Partition | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
STPDFS_NAME_MAX = 28 | ||
|
||
;; Struct: inode | ||
struc inode { | ||
.inode dw ? | ||
.nlink dw ? | ||
.uid dw ? | ||
.gid dw ? | ||
.flags dw ? | ||
.size dd ? | ||
.zones dd 10 dup(?) | ||
.actime dq ? | ||
.modtime dq ? | ||
} | ||
DEFN inode | ||
|
||
;; Struct: dirent | ||
struc dirent { | ||
.inum dd ? | ||
.name db STPDFS_NAME_MAX dup(?) | ||
} | ||
DEFN dirent | ||
|
||
;; Function: stpdfs_load_rootdir | ||
;; | ||
;; Out: | ||
stpdfs_load_rootdir: | ||
; read first inode | ||
mov ax, DISK_BUFFER/0x10 | ||
mov es, ax | ||
mov ax, 2 | ||
mov cx, 1 | ||
xor bx, bx | ||
call disk_read_sectors | ||
; root dir is inode 1 | ||
mov dword eax, [DISK_BUFFER + sizeof.inode * 2 + inode.size] | ||
|
||
|
||
|
||
ret | ||
|
||
;; Function: stpdfs_search | ||
;; | ||
;; In: | ||
;; SI - filename | ||
;; | ||
stpdfs_search: | ||
clc ; clear carry flag | ||
|
||
|
||
ret | ||
|
||
stpdfs_copy_data: | ||
ret |