From 7f6495f74430c5e1caf7b12405b8029b7c946005 Mon Sep 17 00:00:00 2001 From: mothcompute <94941435+mothcompute@users.noreply.github.com> Date: Fri, 10 Jun 2022 04:57:46 -0700 Subject: [PATCH] i dare you to make this code smaller --- boot.s | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/boot.s b/boot.s index 7b02c2a..a2d40ca 100644 --- a/boot.s +++ b/boot.s @@ -7,30 +7,25 @@ NUMSEG equ (1993/512)+1 ; filesize is 1993 bytes mov ax, 0x100 mov ss, ax -mov ds, ax mov es, ax mov gs, ax mov fs, ax -mov bp, 0xF000 +xor bp, bp mov sp, bp - -mov bx, 0x100 +push ax +push ax +push ax +mov bx, ax mov al, NUMSEG inc ah -mov cl, ah -xor ch, ch -xor dh, dh -int 13h - xor cx, cx mov ds, cx mov word [ds:0x21*4], int21 -mov word [ds:0x21*4+2], 0 - -inc ch -mov ds, cx -push 0x100 -push 0x100 +mov word [ds:0x21*4+2], cx +mov cl, ah +xor dh, dh +int 13h +pop ds retf int21: