1/* 2** Copyright 2001, Travis Geiselbrecht. All rights reserved. 3** Distributed under the terms of the NewOS License. 4*/ 5 6 7#define FUNCTION(x) .global x; .type x,@function; x 8 9 10FUNCTION(execute_n_instructions): 11 movl 4(%esp), %ecx 12 shrl $4, %ecx 13.again: 14 xorl %eax, %eax 15 xorl %eax, %eax 16 xorl %eax, %eax 17 xorl %eax, %eax 18 xorl %eax, %eax 19 xorl %eax, %eax 20 xorl %eax, %eax 21 xorl %eax, %eax 22 xorl %eax, %eax 23 xorl %eax, %eax 24 xorl %eax, %eax 25 xorl %eax, %eax 26 xorl %eax, %eax 27 xorl %eax, %eax 28 xorl %eax, %eax 29 xorl %eax, %eax 30 loop .again 31 ret 32 33null_idt_descr: 34 .word 0 35 .word 0,0 36 37FUNCTION(reboot): 38 lidt null_idt_descr 39 int $0 40done: 41 jmp done 42 43