update for HEAD-2003091401
[reactos.git] / loaders / dos / loadros.asm
index 5fc2984..687a5d5 100644 (file)
@@ -286,12 +286,26 @@ entry:
 .checkForHive:
        ; Check if it is a hive file
        cmp     byte [bx-5],'.'
-       jne     .lst_copy
+       jne     .checkForNls
        cmp     byte [bx-4],'h'
-       jne     .lst_copy
+       jne     .checkForNls
        cmp     byte [bx-3],'i'
-       jne     .lst_copy
+       jne     .checkForNls
        cmp     byte [bx-2],'v'
+       jne     .checkForNls
+
+       call    sym_load_module
+       jmp     .after_copy
+
+.checkForNls:
+       ; Check if it is a NLS file
+       cmp     byte [bx-5],'.'
+       jne     .lst_copy
+       cmp     byte [bx-4],'n'
+       jne     .lst_copy
+       cmp     byte [bx-3],'l'
+       jne     .lst_copy
+       cmp     byte [bx-2],'s'
        jne     .lst_copy
 
        call    sym_load_module
@@ -1043,6 +1057,7 @@ load_module2:
        ;;
        ;; Close the file
        ;;
+       pop     ds
        mov     bx, [_current_filehandle]
        mov     ah, 0x3e
        int     0x21
@@ -1055,7 +1070,6 @@ load_module2:
        ;;
        ;; Copy the tailing part to high memory
        ;;
-       pop     ds
        mov     ecx, [_current_size]
        mov     esi, 0x90000
        call    _himem_copy