X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fstartup.s;h=0a36b67c67623d79ad8294191e7679c42396da4d;hb=91fc6b749ad3a64c9a2686952eb30be517c6beb9;hp=82f548e5ae7261405f6c89390bcdb93e6fb1539b;hpb=53c886d3298b58a7859d3141e95b7a0e6fc6c9e8;p=bootcensus diff --git a/src/startup.s b/src/startup.s index 82f548e..0a36b67 100644 --- a/src/startup.s +++ b/src/startup.s @@ -20,6 +20,11 @@ .extern _bss_start .extern _bss_end .extern pcboot_main + .extern wait_vsync + .extern kb_getkey + + # move the stack to the top of the conventional memory + movl $0x80000, %esp # zero the BSS section xor %eax, %eax @@ -39,6 +44,8 @@ skip_bss_zero: .global logohack logohack: + pusha + # copy palette mov $logo_pal, %esi xor %cl, %cl @@ -128,16 +135,18 @@ xloop: incl frameno - # wait vsync - mov $0x3da, %dx -0: in %dx, %al - and $8, %al - jnz 0b -0: in %dx, %al - and $8, %al - jz 0b + call wait_vsync + + # check for escape keypress + call kb_getkey + cmp $27, %eax + jz 0f + jmp frameloop +0: popa + ret + xval: .long 0 yval: .long 0 frameno: .long 0