nkeck720 / nos

A command-line based OS written in FASM syntax for i386 and above.
GNU General Public License v2.0
9 stars 5 forks source link

API save function #46

Closed nkeck720 closed 7 years ago

nkeck720 commented 7 years ago

Any development on the new save function needs to go here and my approval is needed before anything gets merged.

Things the function needs to do:

  1. Get the address of the file (ES:BX)
  2. Get the file name to save it under (DS:DX)
  3. Check to see if file exists: if no, jmp 3a. If yes, jmp 3b. 3a. Find a place to store file contiguously and update FSB with new entry 3b. Find old entry and see if file exceeds its old bounds. If it does, find a new place for it. If not, smply rewrite it in its place.
  4. Save the FSB.
  5. Exit, with carry set if there was an error in any of the above steps.
nkeck720 commented 7 years ago

For some reason, it wants me to merge these, although they already exist in the master branch. Will commit now, but may have to revert if they cause damage.