Last change
on this file since 4 was 2, checked in by Mattia Monga, 14 years ago |
Importazione sorgenti
|
File size:
1.4 KB
|
Line | |
---|
1 | /* set to 16 bit mode (80x86 begin in real mode) text section to 0 */
|
---|
2 | .code16
|
---|
3 | .text
|
---|
4 | .org 0x00
|
---|
5 |
|
---|
6 | .global _start
|
---|
7 | _start:
|
---|
8 | mov $0x07C0,%ax
|
---|
9 | mov %ax,%ds
|
---|
10 |
|
---|
11 | call booting
|
---|
12 | xor %dx,%dx /* test if dx == 0 */
|
---|
13 | call working
|
---|
14 | call idleloop
|
---|
15 | ret
|
---|
16 |
|
---|
17 | booting:
|
---|
18 | mov $boot,%si
|
---|
19 | call message
|
---|
20 | call nl
|
---|
21 | ret
|
---|
22 |
|
---|
23 | message:
|
---|
24 | cld /* set direction to increment */
|
---|
25 | lodsb
|
---|
26 | or %al,%al
|
---|
27 | jz done
|
---|
28 | mov $0xE,%ah
|
---|
29 | mov $7,%bx
|
---|
30 | int $0x10
|
---|
31 | jmp message
|
---|
32 |
|
---|
33 | done:
|
---|
34 | ret
|
---|
35 |
|
---|
36 | nl:
|
---|
37 | mov $newline,%si
|
---|
38 | call message
|
---|
39 | ret
|
---|
40 |
|
---|
41 | working:
|
---|
42 | call nl
|
---|
43 | call nl
|
---|
44 | mov $device,%si
|
---|
45 | call message
|
---|
46 | call waitenter
|
---|
47 | inc %dx
|
---|
48 | cmp $3,%dx
|
---|
49 | je keyboard
|
---|
50 | jmp working
|
---|
51 |
|
---|
52 | waitenter:
|
---|
53 | call nl
|
---|
54 | movw $cont,%si
|
---|
55 | call message
|
---|
56 | xor %ax,%ax /* Sets AH=0 and AL=0 */
|
---|
57 | int $0x16 /* Wait for keypress */
|
---|
58 | cmp 'T',%al
|
---|
59 | jz taz
|
---|
60 | cmp 't',%al
|
---|
61 | jz taz
|
---|
62 | cmp $13,%al
|
---|
63 | jnz waitenter
|
---|
64 | ret
|
---|
65 |
|
---|
66 | keyboard:
|
---|
67 | call nl
|
---|
68 | call nl
|
---|
69 | movw $kbd,%si
|
---|
70 | call message
|
---|
71 | call nl
|
---|
72 | movw cont,%si
|
---|
73 | call message
|
---|
74 | ret
|
---|
75 |
|
---|
76 | taz:
|
---|
77 | call nl
|
---|
78 | call nl
|
---|
79 | movw tazq,%si
|
---|
80 | call message
|
---|
81 | jmp waitenter
|
---|
82 |
|
---|
83 | idleloop:
|
---|
84 | hlt
|
---|
85 | jmp idleloop
|
---|
86 |
|
---|
87 | boot:
|
---|
88 | .ascii "Loading UniOS 1.1 Beta..."
|
---|
89 | newline:
|
---|
90 | .byte 10, 13, 0
|
---|
91 | device:
|
---|
92 | .ascii "Device not responding to SCSI command."
|
---|
93 | cont:
|
---|
94 | .ascii "Hit ENTER to continue..."
|
---|
95 | kbd:
|
---|
96 | .ascii "Keyboard not responding to SCSI command."
|
---|
97 | tazq:
|
---|
98 | .ascii "Yes, TazQ is an Internet crack monkey on wheels."
|
---|
99 |
|
---|
100 | /* Fill with zero until boottag */
|
---|
101 | padlen:
|
---|
102 | .byte boottag - .
|
---|
103 |
|
---|
104 | .fill 10,1,0
|
---|
105 | /* times 510-($-$$) db 0 */
|
---|
106 |
|
---|
107 | .org 510
|
---|
108 | boottag:
|
---|
109 | .word 0xAA55
|
---|
Note:
See
TracBrowser
for help on using the repository browser.