Start working on disk write to write files to disk, and remove diskwrite binary from repository

This commit is contained in:
notsomeidiot123 2024-09-18 13:27:51 -04:00
parent 85bf36c2d1
commit d42d640667
4 changed files with 20 additions and 3 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
bin
mount
image.bin
dump.img
dump.img
diskwrite

BIN
diskwrite

Binary file not shown.

View File

@ -396,7 +396,7 @@ open_file:
pop ds
push 0
pop es
;sector start now contains the sector number of the first data sector of the root directory
mov ah, 0x42
mov dl, byte [data.boot_disc]
mov si, DAP

View File

@ -3,6 +3,22 @@
#include <string.h>
int main(int argc, char **argv){
printf("Hello, World!\n");
char **files = malloc(512);
int filec = 0;
printf("write files to virtual disk\n");
if(argc == 1 || !strcmp(argv[1], "help")){
printf("Usage:\ndiskwrite <input files> -o <output file>");
printf("\n-h: Help");
printf("\n-o: Specify output file\n");
}
for(int i = 1; i < argc; i++){
if(!strcmp(argv[i], "-o")){
i++;
if(i >= argc){
printf("Error: No output file specified!\n");
}
}
files[filec++] = argv[i];
}
return 0;
}