Skip to content

Commit

Permalink
Resolved linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
skx committed Apr 15, 2024
1 parent 53b6362 commit 7dcf441
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cpm/cpm.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package CPM is the main package for our emulator, it uses memory to
// Package cpm is the main package for our emulator, it uses memory to
// emulate execution of things at the bios level
package cpm

Expand Down
14 changes: 3 additions & 11 deletions cpm/cpm_syscalls.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func SysCallFileOpen(cpm *CPM) error {
// Get file size, in bytes
fi, err := cpm.file.Stat()
if err != nil {
return fmt.Errorf("Failed to get file size of %s: %s", fileName, err)
return fmt.Errorf("failed to get file size of %s: %s", fileName, err)
}

// Get file size, in bytes
Expand Down Expand Up @@ -311,7 +311,7 @@ func SysCallFindNext(cpm *CPM) error {
return nil
}

// SyscallDeleteFile deletes the filename specified by the FCB in DE.
// SysCallDeleteFile deletes the filename specified by the FCB in DE.
func SysCallDeleteFile(cpm *CPM) error {

// The pointer to the FCB
Expand Down Expand Up @@ -449,10 +449,7 @@ func SysCallReadRand(cpm *CPM) error {
}

// Get the record to read
var record int

// Damn
record = int(int(fcbPtr.R2)<<16) | int(int(fcbPtr.R1)<<8) | int(fcbPtr.R0)
record := int(int(fcbPtr.R2)<<16) | int(int(fcbPtr.R1)<<8) | int(fcbPtr.R0)

if record > 65535 {
cpm.CPU.States.AF.Hi = 0x06
Expand Down Expand Up @@ -480,8 +477,3 @@ func SysCallReadRand(cpm *CPM) error {
cpm.CPU.States.AF.Hi = uint8(res)
return nil
}

// SysCallUnimplemented is a placeholder for functions we don't implement
func SysCallUnimplemented(cpm *CPM) error {
return nil
}
2 changes: 1 addition & 1 deletion fcb/fcb.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package FCB contains helpers for reading, writing, and working with the CP/M FCB structure.
// Package fcb contains helpers for reading, writing, and working with the CP/M FCB structure.
package fcb

import (
Expand Down
2 changes: 1 addition & 1 deletion memory/memory.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Memory is a package that provides the 64k of RAM
// Package memory is a package that provides the 64k of RAM
// within which the emulator executes its programs.
package memory

Expand Down

0 comments on commit 7dcf441

Please sign in to comment.