From baf573a710aed8e81f9d8773ce5b2102de4a44a7 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 19 Aug 2021 15:48:41 +0200 Subject: [PATCH] scale up the visualization --- boot.s | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/boot.s b/boot.s index 381af55..539c1f2 100644 --- a/boot.s +++ b/boot.s @@ -66,27 +66,42 @@ palette_loop: # TODO first 16 + grayscale before_loop: +.set SCALE, 6 + mov $0xA000, %ax # ES = vga memory mov %ax, %es mov $0x7c0, %ax # DS = the bootsector mov %ax, %ds + # %bl/h - scale iterators + # %cl - current byte # %si - position in sector # %di - position in vga mem mov $0, %si - mov $0, %di + mov $320*4+4, %di loop: movb %ds:(%si), %cl + mov $SCALE, %bh +y_loop: + mov $SCALE, %bl +x_loop: movb %cl, %es:(%di) + inc %di + dec %bl # loop ctr + jnz x_loop + + add $320-SCALE, %di + dec %bh + jnz y_loop + sub $(320-1)*SCALE, %di inc %si - inc %di mov $15, %cl # check if %si is a multiple of 16 and %si, %cx jnz not_eol # if it is - add $304, %di # go down + add $(320-16)*SCALE, %di # go down not_eol: cmp $512, %si