From 441bcbf40f663266ba0784e092b75f5176684423 Mon Sep 17 00:00:00 2001 From: Nero <41307858+nero@users.noreply.github.com> Date: Sun, 1 Jan 2023 21:42:02 +0000 Subject: [PATCH] chartab: migrate to com format and awk assembler --- host/asm.awk | 2 +- {boot => src}/chartab.asm | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) rename {boot => src}/chartab.asm (84%) diff --git a/host/asm.awk b/host/asm.awk index 0ac87e3..8c9b842 100644 --- a/host/asm.awk +++ b/host/asm.awk @@ -368,7 +368,7 @@ op in alu { op=="test" { push_op_modrm(132) # 84 if (!hex) { - size=push_op_fixed_spare(246, 7) + size=push_op_fixed_spare(246, 0) if (size==1) { push_byte(getsym(op2)) } else if (size==2) { diff --git a/boot/chartab.asm b/src/chartab.asm similarity index 84% rename from boot/chartab.asm rename to src/chartab.asm index d587cca..17e737c 100644 --- a/boot/chartab.asm +++ b/src/chartab.asm @@ -1,8 +1,4 @@ - org 0x7C00 - -init xor ax, ax - mov ss, ax - mov sp, ax + org 0x100 mov ax, 0x0e20 xor bx, bx @@ -53,14 +49,10 @@ init xor ax, ax cmp cx, 0x100 jc .line -halt hlt - jmp halt + ret btoa add al, 0x30 cmp al, 0x3A jc .ret add al, 7 .ret ret - - times (0x1FE - ($-$$)) db 0 - dw 0xAA55