4 ms·
You'd also need to load the source code from disk. At the point where you're doing that, the 512-byte limit isn't really relevant anymore, and adding "loading c
by ColonelPhantom 3y ago
You'd also need to load the source code from disk. At the point where you're doing that, the 512-byte limit isn't really relevant anymore, and adding "loading code from disk" within the 512 bytes isn't exactly realistic.
- benj111 3y agoMovsb can move the data in one instruction so I don't see why it's 'unrealistic' I don't really get your objection. 512bytes is rather arbitrary, yes. But I don't see why it becomes less relevant when it's ram.
- londons_explore 3y agoBIOS systems can load a page from disk in just a couple of bytes (since you are calling into the BIOS to do the actual work for you). Obviously, if you want to read from a file, you have all the overhead of understanding a filesystem.
- WaitWaitWha 3y ago> you have all the overhead of understanding a filesystem. No need. Read & write cluster/sector or block/page directly; BIOS already does that.
- DougN7 3y agoDon’t you need to read a directory structure to know where the file’s sectors are, how many there are, etc, and thus need to understand the file system?
- masklinn 3y agoYou’d put the file contents at a static offset, or a location pointed to by the MBR or something.
- EvanAnderson 3y agoYou could do something really quick-and-dirty. Write the code into sequential sectors, put a sentinel value in the last sector to indicate the code ends. It wouldn't be at all good for in-place editing but it would be easy to load and parse the code.