source: trunk/install/floppy/kernel.asm@ 57

Last change on this file since 57 was 57, checked in by Ben Rietbroek, 10 years ago

All source-files lowercased [v1.1.1-testing]

Some standard files like 'COPYING', 'LICENSE', etc. have not been
converted to lower case because they are usually distributed uppercased.

File size: 4.4 KB
Line 
1; AiR-BOOT (c) Copyright 1998-2009 M. Kiewitz
2;
3; This file is part of AiR-BOOT
4;
5; AiR-BOOT is free software: you can redistribute it and/or modify it under
6; the terms of the GNU General Public License as published by the Free
7; Software Foundation, either version 3 of the License, or (at your option)
8; any later version.
9;
10; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
11; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
12; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13; details.
14;
15; You should have received a copy of the GNU General Public License along with
16; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
17;
18
19; If ReleaseCode is not defined, it will produce debug-able code...
20ReleaseCode equ -1
21
22JUMPS
23
24; First all Equs
25
26IFDEF ReleaseCode
27 ExecBaseSeg equ 00060h
28 ExecBasePtr equ 00000h ; FreeDOS BR starts us at 0060:0000
29 ELSE
30 ExecBaseSeg equ 00BFBh
31 ExecBasePtr equ 00100h
32ENDIF
33StackSeg equ 7000h
34
35Include ../../INCLUDE/ASM.INC
36
37 .386p
38 model large, basic
39
40code_seg segment public use16
41 assume cs:code_seg, ds:nothing, es:nothing, ss:nothing
42;---------------------------------------------------------------------------
43 org ExecBasePtr
44AiRBOOT_Installer:
45KernelStart: jmp KernelRealStart
46
47;---------------------------------------------------------------------------
48TXT_START_Copyright db 13, 10
49 db 'AiR-BOOT Installer v1.00', 13, 10
50 db ' - (c) Copyright 1998-2009 by M. Kiewitz.', 13, 10
51 db ' - FreeDOS bootrecord (c) 1997 by Svante Frey', 13, 10
52 db 13, 10
53 db '-> ...Please wait... <-', 13, 10, 0
54
55TXT_AfterAdd:
56TXT_AfterDelete:
57TXT_AfterQuit db 13, 10, 'Please hit ENTER to reboot your system...', 0
58
59KernelRealStart:mov ax, StackSeg
60 mov ss, ax
61 mov sp, 7FFFh
62 mov ax, cs
63 mov ds, ax
64 mov es, ax ; Set DS&ES to new segment
65 ; Shows Copyright message
66 mov si, offset TXT_START_Copyright
67 call APIShowMessage
68
69COM_DoneAlloc: mov ax, 8000h
70 mov es, ax ; ES = 8000h - space for track 0
71 jmp RunInstaller
72
73APIExitProgram:
74APIAfterAdd:
75APIAfterDelete:
76APIAfterQuit: mov ax, 8600h
77 mov cx, 65
78 xor dx, dx
79 int 15h ; Wait a little bit...
80 db 0EAh ; Jump to eternity
81 dw 0FFF0h
82 dw 0F000h
83
84; =============================================================================
85; DS:SI - NUL-terminated message to display to console
86APIShowMessage: push ax
87 push bx
88 push si
89 mov ah, 0Eh
90 mov bx, 7
91ASM_Loop: lodsb
92 or al, al
93 jz ASM_Done
94 int 10h ; BIOS: TELETYPE
95 jmp ASM_Loop
96ASM_Done: pop si
97 pop bx
98 pop ax
99 retn
100
101; =============================================================================
102APIShowChar: push ax
103 push bx
104 mov ah, 0Eh
105 mov bx, 7
106 int 10h ; BIOS: TELETYPE
107 pop bx
108 pop ax
109 retn
110
111; =============================================================================
112APIShowError: call APIShowMessage
113 call APIExitProgram
114
115; =============================================================================
116; Returns AL - Keyboard character that was pressed
117APIReadKeyboard:xor ah, ah
118 int 16h ; BIOS: GET KEYSTROKE
119 ; Result in AL
120 retn
121
122APILockVolume: retn
123
124 Include ../INST_X86/INSTALL.INC ; Execute generic code
125COM_EndOfSegment:
126
127code_seg ends
128 end AiRBOOT_Installer
Note: See TracBrowser for help on using the repository browser.