Skip to content

Commit

Permalink
kernel: delete syscall, bump required fox32rom API version to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ry755 committed May 4, 2024
1 parent 8ce608f commit a6e1109
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions fox32os.def
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ read: jmp [0x00000D1C]
write: jmp [0x00000D20]
get_size: jmp [0x00000D24]
create: jmp [0x00000D28]
delete: jmp [0x00000D2C]

; widget jump table
draw_widgets_to_window: jmp [0x00000E10]
Expand Down
3 changes: 2 additions & 1 deletion kernel/main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const FOX32OS_VERSION_PATCH: 0

const FOX32OS_API_VERSION: 1

const REQUIRED_FOX32ROM_API_VERSION: 1
const REQUIRED_FOX32ROM_API_VERSION: 2

const SYSTEM_STACK: 0x01FFF800
const BACKGROUND_COLOR: 0xFF674764
Expand Down Expand Up @@ -73,6 +73,7 @@ jump_table:
data.32 write
data.32 get_size
data.32 create
data.32 delete

; widget jump table
org.pad 0x00000610
Expand Down
11 changes: 11 additions & 0 deletions kernel/vfs/vfs.asm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ open_stream:
ret

; create a file on a RYFS-formatted disk, or open a named stream
; if target file already exists, it will be deleted and then re-created as a blank file
; inputs:
; r0: pointer to file name string (8.3 format if file, for example "testfile.txt" or "test.txt")
; r1: disk ID (ignored if stream)
Expand All @@ -118,6 +119,16 @@ create:
ifz ret
jmp ryfs_create

; delete a file on a RYFS-formatted disk
; inputs:
; r0: file struct: pointer to a filled file struct
; outputs:
; none
delete:
cmp r0, 0
ifz ret
jmp ryfs_delete

; seek specified file to the specified offset
; inputs:
; r0: byte offset
Expand Down

0 comments on commit a6e1109

Please sign in to comment.