scale up the visualization
This commit is contained in:
parent
0a76ca7a00
commit
baf573a710
21
boot.s
21
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
|
||||
|
|
Loading…
Reference in New Issue