diff --git a/src/fs.c b/src/fs.c
new file mode 100644
index 0000000..271662a
--- /dev/null
+++ b/src/fs.c
@@ -0,0 +1,62 @@
+
+#include <stdio.h>
+
+#include "fs.h"
+
+FILE* block_device = NULL
+size_t device_size = 0;
+
+
+int devopen(const char* name, int* reopen)
+{
+	block_device = fopen(name, "rwb");
+	if (!block_device) {
+		return 0;
+	}
+	fseek(block_device, 0, SEEK_END)
+	return 1;
+}
+
+
+void devclose(void)
+{
+	if (block_device)
+		fclose(block_device);
+	block_device = NULL;
+	device_size = 0;
+}
+
+int devread(unsigned long sector, unsigned long byte_offset, unsigned long byte_len, void *buf)
+{
+	if (!block_device) {
+		fprintf(stdcerr, "devread: Device not open.\n");
+		return 0;
+	}
+
+	const unsigned long offset = sector * 512 + byte_offset;
+	if (offset + byte_len > device_size)
+		fprintf(stdcerr, "devread: Attempt to read beyond device.\n");
+		return 0;
+	}
+
+	if fseek(block_device, sector * 512 + byte_offset, SEEK_SET);
+	if (fread(buf, byte_len, 1, block_device) != byte_len) {
+		fprintf(stdcerr, "devread: Failed to read from device.\n");
+		return 0;
+	}
+	return 1;
+}
+
+
+
+//void dev_set_partition(unsigned long start, unsigned long size);
+//void dev_get_partition(unsigned long *start, unsigned long *size);
+
+//int file_open(const char *filename);
+//int file_read(void *buf, unsigned long len);
+//unsigned long file_seek(unsigned long offset);
+//unsigned long file_size(void);
+//void file_set_size(unsigned long size);
+//void file_close(void);
+
+#endif /* FS_H */
