Fixed warnings and indentation

svn path=/trunk/; revision=1411
This commit is contained in:
Eric Kohl 2000-10-22 01:58:11 +00:00
parent 201009ddd9
commit a83fd9fd73

View file

@ -62,18 +62,18 @@ entry:
pop ss
push ds
pop es
mov sp,real_stack_end
mov sp, real_stack_end
sti
;;
;; Setup the 32-bit registers
;;
mov ebx,0
mov eax,0
mov ecx,0
mov edx,0
mov esi,0
mov edi,0
mov ebx, 0
mov eax, 0
mov ecx, 0
mov edx, 0
mov esi, 0
mov edi, 0
;;
;; Set the position for the first module to be loaded
@ -83,10 +83,10 @@ entry:
;;
;; Setup various variables
;;
mov bx,ds
movzx eax,bx
shl eax,4
add [gdt_base],eax
mov bx, ds
movzx eax, bx
shl eax, 4
add [gdt_base], eax
;;
;; Setup the loader code and data segments
@ -114,22 +114,22 @@ entry:
;; Enable the A20 address line (to allow access to over 1mb)
;;
call empty_8042
mov al,0D1h ; command write
out 064h,al
mov al, 0D1h ; command write
out 064h, al
call empty_8042
mov al,0DFh ; A20 on
out 060h,al
mov al, 0DFh ; A20 on
out 060h, al
call empty_8042
;;
;; Make the argument list into a c string
;;
mov di,081h
mov si,_multiboot_kernel_cmdline
mov di, 081h
mov si, _multiboot_kernel_cmdline
.next_char
mov al,[di]
mov [si],al
cmp byte [di],0dh
mov al, [di]
mov [si], al
cmp byte [di], 0dh
je .end_of_command_line
inc di
inc si
@ -143,13 +143,13 @@ entry:
;;
;; Make the argument list into a c string
;;
mov di,081h
mov di, 081h
.next_char2
cmp byte [di], 0
je .end_of_command_line2
cmp byte [di],' '
cmp byte [di], ' '
jne .not_space
mov byte [di],0
mov byte [di], 0
.not_space
inc di
jmp .next_char2
@ -158,19 +158,19 @@ entry:
;;
;; Check if we want to skip the first character
;;
cmp byte [081h],0
cmp byte [081h], 0
jne .first_char_is_zero
mov dx,082h
mov dx, 082h
jmp .start_loading
.first_char_is_zero
mov dx,081h
mov dx, 081h
;;
;; Check if we have reached the end of the string
;;
.start_loading
mov bx,dx
cmp byte [bx],0
mov bx, dx
cmp byte [bx], 0
jne .more_modules
jmp .done_loading
@ -184,9 +184,9 @@ entry:
;;
;; Display a message saying we are loading the module
;;
mov di,loading_msg
mov di, loading_msg
call print_string
mov di,dx
mov di, dx
call print_string
;;
@ -220,33 +220,33 @@ entry:
;; Load the file
;;
push di
mov dx,di
mov dx, di
call pe_load_module
pop di
cmp eax, 0
jne .load_success
jmp .exit
.load_success:
mov ah,02h
mov dl,0dh
mov ah, 02h
mov dl, 0dh
int 021h
mov ah,02h
mov dl,0ah
mov ah, 02h
mov dl, 0ah
int 021h
;;
;; Move onto the next module name in the command line
;;
.next_module
cmp di,[end_cmd_line]
cmp di, [end_cmd_line]
je .done_loading
cmp byte [di],0
cmp byte [di], 0
je .found_module_name
inc di
jmp .next_module
.found_module_name
inc di
mov dx,di
mov dx, di
jmp .start_loading
.done_loading:
@ -276,56 +276,55 @@ entry:
;;
;; Save cursor position
;;
mov ax,3 ;! Reset video mode
mov ax, 3 ;! Reset video mode
int 10h
mov bl,10
mov ah,12
mov bl, 10
mov ah, 12
int 10h
mov ax,1112h ;! Use 8x8 font
xor bl,bl
mov ax, 1112h ;! Use 8x8 font
xor bl, bl
int 10h
mov ax,1200h ;! Use alternate print screen
mov bl,20h
mov ax, 1200h ;! Use alternate print screen
mov bl, 20h
int 10h
mov ah,1h ;! Define cursor (scan lines 6 to 7)
mov cx,0607h
mov ah, 1h ;! Define cursor (scan lines 6 to 7)
mov cx, 0607h
int 10h
mov ah,1
mov cx,0600h
mov ah, 1
mov cx, 0600h
int 10h
mov ah,6 ;SCROLL ACTIVE PAGE UP
mov al,32H ;CLEAR 25 LINES
mov cx,0H ;UPPER LEFT OF SCROLL
mov dx,314FH ;LOWER RIGHT OF SCROLL
mov bh,1*10h+1 ;USE NORMAL ATTRIBUTE ON BLANKED LINE
int 10h ;VIDEO-IO
mov dx,0
mov dh,0
mov ah,02h
mov bh,0
mov ah, 6 ; SCROLL ACTIVE PAGE UP
mov al, 32h ; CLEAR 50 LINES
mov cx, 0 ; UPPER LEFT OF SCROLL
mov dx, 314fh ; LOWER RIGHT OF SCROLL
mov bh, 1*10h+1 ; USE NORMAL ATTRIBUTE ON BLANKED LINE
int 10h
mov dx,0
mov dh,0
mov dx, 0
mov dh, 0
mov ah,02h
mov bh,0
int 010h
mov ah, 2
mov bh, 0
int 10h
mov ah,03h
mov bh,0h
int 010h
movzx eax,dl
; mov [_cursorx],eax
movzx eax,dh
; mov [_cursory],eax
mov dx, 0
mov dh, 0
mov ah, 2
mov bh, 0
int 10h
mov ah, 3
mov bh, 0
int 10h
movzx eax, dl
; mov [_cursorx], eax
movzx eax, dh
; mov [_cursory], eax
cli
@ -624,7 +623,7 @@ pe_load_module:
int 0x21
jnc .file_opened
mov dx, error_file_open_failed
jmp near .error
jmp .error
.file_opened:
;;
@ -642,7 +641,7 @@ pe_load_module:
int 0x21
jnc .seek_start
mov dx, error_file_seek_failed
jmp near .error
jmp .error
.seek_start:
;;
@ -655,7 +654,7 @@ pe_load_module:
int 0x21
jnc .header_read
mov dx, error_file_read_failed
jmp near .error
jmp .error
.header_read
;;
@ -665,7 +664,7 @@ pe_load_module:
cmp ax, 'MZ'
je .mz_hdr_good
mov dx, error_bad_mz
jmp near .error
jmp .error
.mz_hdr_good
;;
@ -679,7 +678,7 @@ pe_load_module:
int 0x21
jnc .start_end
mov dx, error_file_seek_failed
jmp near .error
jmp .error
.start_end
shl edx, 16
mov dx, ax
@ -693,7 +692,7 @@ pe_load_module:
int 0x21
jnc .start_seek
mov dx, error_file_seek_failed
jmp near .error
jmp .error
.start_seek
mov edi, [next_load_base]
@ -903,7 +902,7 @@ _himem_zero:
dw .l3
.old_cs:
dw 0x0
.l3
.l3:
sti
pop eax
pop es
@ -1047,7 +1046,3 @@ error_bad_mz:
db 'Error: Bad DOS EXE magic'
db 0xa, 0xd, '$'