--- Net2/arch/i386/stand/srt0.c 2018/04/24 18:04:01 1.1.1.1 +++ Net2/arch/i386/stand/srt0.c 2018/04/24 18:05:10 1.1.1.2 @@ -58,7 +58,8 @@ _disklabel: .space 512 #endif -entry: .globl entry + .globl entry + .set entry,0 .globl start #if defined(REL) && !defined(SMALL) @@ -133,14 +134,12 @@ start: pushl %esp call _bzero #endif - movl %esi,%esp + /*movl %esi,%esp*/ - pushl $0 - popf + /*pushl $0 + popf*/ -#ifndef SMALL call _kbdreset /* resets keyboard and gatea20 brain damage */ -#endif call _main jmp 1f @@ -150,26 +149,19 @@ _bootdev: .long 0 _cyloffset: .long 0 savearea: .long 0,0 # sp & bp to return to .text -#ifndef SMALL - .globl _getchar -#endif .globl _wait __rtt: -#ifndef SMALL - call _getchar -#else -_exit: pushl $1000000 call _wait popl %eax -#endif movl $-7,%eax jmp 1f -#ifndef SMALL + _exit: - call _getchar -#endif + pushl $1000000 + call _wait + popl %eax movl 4(%esp),%eax 1: #ifdef REL @@ -189,13 +181,17 @@ _exit: .globl _inb _inb: movl 4(%esp),%edx subl %eax,%eax # clr eax + jmp 7f ; nop ; 7: jmp 7f ; nop ; 7: ; inb %dx,%al + jmp 7f ; nop ; 7: jmp 7f ; nop ; 7: ; ret .globl _outb _outb: movl 4(%esp),%edx movl 8(%esp),%eax + jmp 7f ; nop ; 7: jmp 7f ; nop ; 7: ; outb %al,%dx + jmp 7f ; nop ; 7: jmp 7f ; nop ; 7: ; ret .globl ___udivsi3 @@ -278,3 +274,8 @@ _outsw: popl %esi ret + .globl _scream +_scream: inb $0x61,%al + orb $3,%al + outb %al, $0x61 + ret