Implement RYFS write support in the VFS

This commit is contained in:
Ry 2023-01-20 18:53:16 -08:00
parent e577446e55
commit c043316fa1

View File

@ -90,7 +90,6 @@ stream_read:
ret ret
; write specified number of bytes into the specified file ; write specified number of bytes into the specified file
; this only supports writing to streams, RYFS is currently read-only
; inputs: ; inputs:
; r0: number of bytes to write (ignored if file struct is a stream) ; r0: number of bytes to write (ignored if file struct is a stream)
; r1: pointer to file struct ; r1: pointer to file struct
@ -105,7 +104,7 @@ write:
pop r1 pop r1
cmp.8 r3, 0x00 cmp.8 r3, 0x00
ifz pop r3 ifz pop r3
ifz ret ifz jmp ryfs_write
cmp.8 r3, 0x01 cmp.8 r3, 0x01
ifz pop r3 ifz pop r3
ifz jmp stream_write ifz jmp stream_write