Public Access
1
0

Remove unneccessary checks

This commit is contained in:
2025-09-26 10:23:54 +03:00
parent 34f1254a85
commit 497d0715da
14 changed files with 692 additions and 8565 deletions

View File

@@ -1,10 +1,6 @@
// Package disasm provides a Z80 disassembler implementation
package disasm
import (
"fmt"
)
// Instruction represents a decoded Z80 instruction
type Instruction struct {
Mnemonic string // Human-readable instruction mnemonic
@@ -23,10 +19,6 @@ func New() *Disassembler {
// Decode decodes a single Z80 instruction from a byte slice
// It returns the decoded instruction and any error encountered
func (d *Disassembler) Decode(data []byte) (*Instruction, error) {
if len(data) == 0 {
return nil, fmt.Errorf("no data to decode")
}
// Get the first opcode byte
opcode := data[0]