summaryrefslogtreecommitdiff
path: root/reboot.S
blob: bfab971c1aaf53308026ff10babaeb7d1bae5cca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* $Id$ */

	.file	"reboot.S"
	.text
	.code16
	.globl	start
start:
	push	%cs			/* go */
	pop	%ds
	mov	$0x13, %ax
	int	$0x10
	push	$0xa000
	pop	%es
	mov	$0x60, %dx
	mov	$64000, %cx

	xor	%di ,%di		/* clear screen */
	xor	%ax, %ax
	mov	$320*200/2, %cx
	rep
	stosw
	
	mov	$320*100, %di		/* reducing line */
	mov	$320/2, %dx
clear:	xor	%ax, %ax		/* left black dot */
	stosb
	mov	%dx, %cx
	dec	%cx
	mov	$0xf0f, %ax
	rep
	stosw
	xor	%ax, %ax		/* right black dot */
	stosb
	sub	%dx, %di
	sub	%dx, %di
	inc	%di
	mov	$15000, %cx
1:	loop	1b
	dec	%dx
	jne	clear

	mov	$32, %ax		/* blinking dot */
dot:	stosb
	dec	%di
1:	loop	1b
2:	loop	2b
3:	loop	3b
	dec	%ax
	cmp	$16, %ax
	jne	dot

	mov	$0x3, %ax
	int	$0x10
	ljmp	$0xffff, $0x0		/* reboot */