X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fboot%2Fboot2.s;h=59918b8358341f30d99edc122c1514e789651329;hb=d1e8a437c1fab4535f82c4c214ec3330ac32e48d;hp=6372557ee2e3be08783404529b2713fbcfc354d5;hpb=559dd7c3c836a69eac46bd12c7ef61bb5de8882c;p=bootcensus diff --git a/src/boot/boot2.s b/src/boot/boot2.s index 6372557..59918b8 100644 --- a/src/boot/boot2.s +++ b/src/boot/boot2.s @@ -37,8 +37,8 @@ # load the whole program into memory starting at 1MB call load_main - mov $0x13, %ax - int $0x10 + #mov $0x13, %ax + #int $0x10 # load initial GDT lgdt (gdt_lim) @@ -196,10 +196,11 @@ ldloop: push %ecx call read_track - mov buffer, %eax - call print_num - mov $10, %al - call putchar + # debug: print the first 32bits of the track + #mov buffer, %eax + #call print_num + #mov $10, %al + #call putchar # copy to high memory mov $buffer, %esi @@ -348,14 +349,15 @@ abort_read: jmp 0b - # better print routines, since we're not constrainted by the 512b of # the boot sector. + .global cursor_x + .global cursor_y cursor_x: .long 0 cursor_y: .long 0 putchar: - pusha + pushal call ser_putchar cmp $10, %al @@ -381,7 +383,7 @@ putchar: jnz 1f call video_newline -1: popa +1: popal ret # expects string pointer in esi @@ -397,7 +399,7 @@ putstr: # expects number in eax print_num: # save registers - pusha + pushal mov $numbuf + 16, %esi movb $0, (%esi) @@ -414,7 +416,7 @@ convloop: call putstr # restore regs - popa + popal ret @@ -428,7 +430,7 @@ video_newline: 0: ret scrollup: - pusha + pushal # move 80 * 24 lines from b80a0 -> b8000 mov $0xb8000, %edi mov $0xb80a0, %esi @@ -439,7 +441,7 @@ scrollup: xor %eax, %eax mov $40, %ecx addr32 rep stosl - popa + popal ret clearscr: