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