From 5c56bb4136ac5158d6d31440121e8bae44d2b5d8 Mon Sep 17 00:00:00 2001 From: Chris Mountford Date: Thu, 26 Dec 2024 09:39:13 +1100 Subject: [PATCH] move InstructionSet and Op to asm package --- client/src/machine/Thread.ts | 2 +- client/src/machine/asm/Assembler.ts | 2 +- client/src/machine/asm/Disassembler.ts | 4 ++-- client/src/machine/{ => asm}/InstructionSet.ts | 4 ++-- client/src/machine/{ => asm}/Op.ts | 0 client/src/machine/mos6502.ts | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) rename client/src/machine/{ => asm}/InstructionSet.ts (97%) rename client/src/machine/{ => asm}/Op.ts (100%) diff --git a/client/src/machine/Thread.ts b/client/src/machine/Thread.ts index ecaa09c..0f68ada 100644 --- a/client/src/machine/Thread.ts +++ b/client/src/machine/Thread.ts @@ -1,6 +1,6 @@ import {Disassembler} from "./asm/Disassembler"; import {Addr, Endian} from "./core.ts"; -import {OpSemantics} from "./Op.ts"; +import {OpSemantics} from "./asm/Op.ts"; import {Memory} from "./Memory.ts"; /** diff --git a/client/src/machine/asm/Assembler.ts b/client/src/machine/asm/Assembler.ts index eb0e9df..a5ecf20 100644 --- a/client/src/machine/asm/Assembler.ts +++ b/client/src/machine/asm/Assembler.ts @@ -2,7 +2,7 @@ import {Addr} from "../core.ts"; import {Dialect} from "./Dialect.ts"; import {InstructionLike} from "./instructions.ts"; import {ParserState} from "./DefaultDialect.ts"; -import {InstructionSet} from "../InstructionSet.ts"; +import {InstructionSet} from "./InstructionSet.ts"; /** * Syntax-independent stateful assembler, parametised by {@link InstructionSet} diff --git a/client/src/machine/asm/Disassembler.ts b/client/src/machine/asm/Disassembler.ts index 1c6bc73..76b1c7c 100644 --- a/client/src/machine/asm/Disassembler.ts +++ b/client/src/machine/asm/Disassembler.ts @@ -5,9 +5,9 @@ import {ByteDeclaration, Edict, FullInstructionLine, InstructionLike, SymDef} fr import * as R from "ramda"; import {LabelsComments} from "./asm.ts"; import {DisassemblyMeta} from "./DisassemblyMeta.ts"; -import {InstructionSet} from "../InstructionSet.ts"; +import {InstructionSet} from "./InstructionSet.ts"; import {Memory} from "../Memory.ts"; -import {OpSemantics} from "../Op.ts"; +import {OpSemantics} from "./Op.ts"; /** diff --git a/client/src/machine/InstructionSet.ts b/client/src/machine/asm/InstructionSet.ts similarity index 97% rename from client/src/machine/InstructionSet.ts rename to client/src/machine/asm/InstructionSet.ts index 3dc8ae6..5f7ea3b 100644 --- a/client/src/machine/InstructionSet.ts +++ b/client/src/machine/asm/InstructionSet.ts @@ -1,5 +1,5 @@ -import {assertByte} from "./core.ts"; -import {AddressingMode, Cycles, Instruction, InstructionCall} from "./mos6502.ts"; +import {assertByte} from "../core.ts"; +import {AddressingMode, Cycles, Instruction, InstructionCall} from "../mos6502.ts"; import {Op} from "./Op.ts"; /** diff --git a/client/src/machine/Op.ts b/client/src/machine/asm/Op.ts similarity index 100% rename from client/src/machine/Op.ts rename to client/src/machine/asm/Op.ts diff --git a/client/src/machine/mos6502.ts b/client/src/machine/mos6502.ts index 3473434..2f72389 100644 --- a/client/src/machine/mos6502.ts +++ b/client/src/machine/mos6502.ts @@ -10,8 +10,8 @@ */ import {Addr, assertByte, Byteable, unToSigned} from "./core.ts"; -import {InstructionSet} from "./InstructionSet.ts"; -import {Op, OpSemantics} from "./Op.ts"; +import {InstructionSet} from "./asm/InstructionSet.ts"; +import {Op, OpSemantics} from "./asm/Op.ts"; type M6502OperandLength = 0 | 1 | 2;