Skip to content

Commit

Permalink
Make sure createDirectory sets Z on success
Browse files Browse the repository at this point in the history
  • Loading branch information
unlimitedbacon committed Oct 27, 2015
1 parent 63eef26 commit cdd4876
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/00/filesystem.asm
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ _: ; Move DE to end of file entry
ei
_: pop af
pop ix
cp a
ret
.exitError:
pop hl
Expand Down Expand Up @@ -699,12 +700,14 @@ _: push de
ld de, 0
.createEntry:
call createDirectoryEntry
jr nz, .error2
inc sp \ inc sp ; pop hl
pop de
pop af
jp po, _
ei
_: pop af
cp a
ret
.error:
pop hl
Expand All @@ -718,6 +721,16 @@ _: pop af
or 1
ld a, errFileNotFound
ret
.error2:
inc sp \ inc sp ; pop hl
pop de
pop af
jp po, _
ei
_: pop af
or 1
ld a, errFilesystemFull
ret

; findNode
; Finds a node in the FAT.
Expand Down

0 comments on commit cdd4876

Please sign in to comment.