From 8c0b7ea39d57cb6c80cf66207291837d95c71940 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Mon, 5 Apr 2021 13:32:41 -0700 Subject: Change the null byte from no-op to halt. --- asm.rb | 2 +- hdl/top.sv | 2 +- mem/mem.hex | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/asm.rb b/asm.rb index 686f9c1..c94ecf7 100755 --- a/asm.rb +++ b/asm.rb @@ -12,7 +12,7 @@ OPCODES = { "++acc" => 0x002, "--acc" => 0x004, "tx" => 0x040, - "halt" => 0x080, + "halt" => 0x000, } Line = Struct.new(:opcode, :refs, :code) diff --git a/hdl/top.sv b/hdl/top.sv index 54cfdc5..a1cdbf7 100644 --- a/hdl/top.sv +++ b/hdl/top.sv @@ -133,7 +133,7 @@ always_ff @(posedge clk) begin if (operand[1]) ++acc; if (operand[2]) --acc; if (operand[6]) state = MEMORY; - if (operand[7]) state = HALT; + if (operand == 0) state = HALT; end 'h1: acc = sign_extended_operand; 'h2, 'h3: begin diff --git a/mem/mem.hex b/mem/mem.hex index a0c98e5..84caf6d 100644 --- a/mem/mem.hex +++ b/mem/mem.hex @@ -84,7 +84,7 @@ 548 // jmp fibloop 121 // fullydone: acc= 0x21 040 // tx -080 // halt +000 // halt @70 -- cgit v1.2.3