From 569e11aceb4b775d446de200b27354b5b870eb51 Mon Sep 17 00:00:00 2001 From: Ain <41307858+nero@users.noreply.github.com> Date: Fri, 4 Oct 2019 21:54:10 +0000 Subject: [PATCH] Advance work on emulator/assembler combo --- programs/{lst2bin.asm => asm86.asm} | 13 ++++++++----- utils/emul.c | 4 ++++ 2 files changed, 12 insertions(+), 5 deletions(-) rename programs/{lst2bin.asm => asm86.asm} (54%) diff --git a/programs/lst2bin.asm b/programs/asm86.asm similarity index 54% rename from programs/lst2bin.asm rename to programs/asm86.asm index f0d32b5..cfb0da9 100644 --- a/programs/lst2bin.asm +++ b/programs/asm86.asm @@ -4,15 +4,18 @@ jmp start %include "fcbparse.asm" -fcb_in: - times 20 db 0 +fcb_asm: + times 36 db 0 -fcb_out: - times 20 db 0 +fcb_bin: + times 36 db 0 + +fcb_lst: + times 36 db 0 start: mov si, 0x81 - mov bx, fcb_in + mov bx, fcb_asm mov ax, 0x1234 call fcb_parse ret diff --git a/utils/emul.c b/utils/emul.c index 35dc2cd..f076cd4 100644 --- a/utils/emul.c +++ b/utils/emul.c @@ -350,6 +350,10 @@ void step() { ip = reg; } break; + case 0xE9: + reg = imm16(); + ip += (int16_t)reg; + break; case 0xEB: // JMP rb ip = ip + (int8_t)imm8(); break;