Skip to content

Commit

Permalink
Raise host filesystem errors as BRK
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanizag committed Aug 6, 2021
1 parent d9eadb3 commit 871f08a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osFile.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func execOSFILE(env *environment) {
data := env.getMemSlice(startAddress, filesize)
err := ioutil.WriteFile(filename, data, 0644)
if err != nil {
panic(err)
env.raiseError(1, err.Error())
}
case 0xff: // Load file into memory
/*
Expand All @@ -45,7 +45,7 @@ func execOSFILE(env *environment) {
}
data, err := ioutil.ReadFile(filename)
if err != nil {
panic(err)
env.raiseError(1, err.Error())
}
// NOTE: There is no maxLength?
env.storeSliceinMem(loadAddress, uint16(len(data)), data)
Expand Down

0 comments on commit 871f08a

Please sign in to comment.