2010-10-01 11:21:55 +02:00
|
|
|
|
; Copyright (c) 2009, <Lrz>
|
|
|
|
|
; All rights reserved.
|
|
|
|
|
;
|
|
|
|
|
; Redistribution and use in source and binary forms, with or without
|
|
|
|
|
; modification, are permitted provided that the following conditions are met:
|
|
|
|
|
; * Redistributions of source code must retain the above copyright
|
|
|
|
|
; notice, this list of conditions and the following disclaimer.
|
|
|
|
|
; * Redistributions in binary form must reproduce the above copyright
|
|
|
|
|
; notice, this list of conditions and the following disclaimer in the
|
|
|
|
|
; documentation and/or other materials provided with the distribution.
|
|
|
|
|
; * Neither the name of the <organization> nor the
|
|
|
|
|
; names of its contributors may be used to endorse or promote products
|
|
|
|
|
; derived from this software without specific prior written permission.
|
|
|
|
|
;
|
|
|
|
|
; THIS SOFTWARE IS PROVIDED BY Alexey Teplov nickname <Lrz> ''AS IS'' AND ANY
|
|
|
|
|
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
|
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
|
; DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
|
|
|
|
|
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
|
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
|
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
|
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
|
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
;*****************************************************************************
|
|
|
|
|
|
|
|
|
|
; <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> point_default
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RamdiskFS
|
|
|
|
|
;/<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
ATTR_READ_ONLY equ 0x01
|
|
|
|
|
ATTR_HIDDEN equ 0x02
|
|
|
|
|
ATTR_SYSTEM equ 0x04
|
|
|
|
|
ATTR_VOLUME_ID equ 0x08
|
|
|
|
|
ATTR_DIRECTORY equ 0x10
|
|
|
|
|
ATTR_ARCHIVE equ 0x20
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
show_error_1 equ 0x1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
show_error_2 equ 0x2 ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
show_error_3 equ 0x4 ; <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =64 <EFBFBD><EFBFBD>.
|
|
|
|
|
show_error_4 equ 0x8 ;
|
|
|
|
|
|
|
|
|
|
macro use_parse_def_sect
|
|
|
|
|
{
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, point_default
|
2010-10-01 11:21:55 +02:00
|
|
|
|
push ini_data_
|
|
|
|
|
pop es
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, point_to_point_def
|
|
|
|
|
sub si, 2
|
|
|
|
|
mov cx, [si] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>x <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub cx, di ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov save_cx_d, cx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> cx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov status_flag, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;;;;
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. es:di - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> cx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> bp, es, cs, sp
|
|
|
|
|
;use_Loader_Image ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>
|
|
|
|
|
use_RamdiskFS
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
use_LoaderModule ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro use_LoaderModule
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
local .found_end_str
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, point_default ;restore value
|
|
|
|
|
mov cx, save_cx_d
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> LoaderModule=kord/kolibri.ldm
|
|
|
|
|
.start_p_LM:
|
|
|
|
|
call get_firs_sym ;get first symbol on new line
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test cx, cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz ._afterLoaderModule ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 'L'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_p_LM
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> LoaderModule
|
|
|
|
|
; parse_LoaderModule
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, cx
|
|
|
|
|
mov ax, di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, parse_LoaderModule
|
|
|
|
|
mov cx, parse_LoaderModule_e - parse_LoaderModule
|
|
|
|
|
repe cmpsb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .rest_value_loop_LM ;is not compare
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub bx, parse_LoaderModule_e - parse_LoaderModule;correct cx
|
|
|
|
|
add bx, cx
|
|
|
|
|
mov cx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test status_flag, flag_found_LM ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jz .correct_is_not_set_LM
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
; mov si,found_equal_timeout ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; call printplain
|
|
|
|
|
; jmp .get_next_str
|
|
|
|
|
|
|
|
|
|
.correct_is_not_set_LM:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 0x3d20 ;cut al=' ' ah='='
|
|
|
|
|
repe scasb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jcxz .rest_value_loop_LM ;not found param timeout
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp ah, byte [es:di-1] ;find '='
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .rest_value_loop_LM
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
repe scasb ;cut ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc cx
|
|
|
|
|
dec di
|
|
|
|
|
;di <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> cx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> callback <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dd <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> byte =0
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>: <EFBFBD> ini <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> LoaderModule = kord/kernel.loader
|
|
|
|
|
;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dw,dw,db'kord/kernel.loader',0 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2 word
|
|
|
|
|
push dword [es:di-6]
|
2012-03-08 09:33:38 +01:00
|
|
|
|
lea si, [di-6]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push word [es:di-2]
|
|
|
|
|
xor ax, ax
|
|
|
|
|
mov word [es:di-6], ax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;info_real_mode_size <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, info_real_mode_size ;0x3000 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [es:di-4], ax
|
|
|
|
|
mov word [es:di-2], 16 ;<EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 4 <EFBFBD><EFBFBD> =64 <EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;;;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
mov al, byte [es:di]
|
|
|
|
|
cmp al, ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .found_end_str
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0xa
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .found_end_str
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0xd
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .found_end_str
|
|
|
|
|
inc di
|
|
|
|
|
dec cx
|
|
|
|
|
jnz @b
|
|
|
|
|
;;;not found <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.found_end_str:
|
|
|
|
|
|
|
|
|
|
push word [es:di]
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
|
|
|
|
mov word [es:di], ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; xor ax,ax ; function 1 - read file
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, si ;file_data
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc ax
|
|
|
|
|
push si
|
|
|
|
|
push es
|
|
|
|
|
|
|
|
|
|
push es
|
|
|
|
|
pop ds
|
|
|
|
|
push cs
|
|
|
|
|
pop es
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
call far dword [es:loader_callback]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
push cs
|
|
|
|
|
pop ds
|
|
|
|
|
|
|
|
|
|
pop es
|
|
|
|
|
pop si
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test bx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .error_LM
|
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
jmp far dword [es:si]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.error_LM:
|
|
|
|
|
call error.LoaderModule
|
|
|
|
|
.rest_value_loop_LM:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, ax
|
|
|
|
|
mov cx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp .start_p_LM
|
|
|
|
|
|
|
|
|
|
._afterLoaderModule:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro use_RamdiskFS
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, + <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
{
|
|
|
|
|
if DEBUG
|
|
|
|
|
local ._not_memory_in_sys
|
|
|
|
|
;//////// clear window
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 3
|
2010-10-01 11:21:55 +02:00
|
|
|
|
int 0x10
|
|
|
|
|
;\\\\\\\\\ clear window is end
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, ramdiskFS_st
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
end if
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
|
|
|
|
mov show_errors_sect, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
use_free_memory ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ax
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
use_RamdiskSize ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> bx
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp free_ad_memory, bx ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>.
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jbe ._not_memory_in_sys
|
2012-03-08 09:33:38 +01:00
|
|
|
|
movzx eax, bx
|
|
|
|
|
shl eax, 10 ;*1024 = get size in byte
|
|
|
|
|
mov save_ramdisksize, eax ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> byte
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
get_type_FS ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> + <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
._not_memory_in_sys:
|
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
;pause
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
int 0x16
|
|
|
|
|
end if
|
|
|
|
|
}
|
|
|
|
|
macro use_RamdiskSize
|
|
|
|
|
{
|
|
|
|
|
local .start_p_RS
|
|
|
|
|
local .correct_is_not_set_RS
|
|
|
|
|
local .CS
|
|
|
|
|
local .correct_val_RS
|
|
|
|
|
local .correct_size_RS
|
|
|
|
|
local .rest_value_loop_RS
|
|
|
|
|
local .end_get_RS_ERROR_1
|
|
|
|
|
local .end_get_RS_ERROR_2
|
|
|
|
|
local ._end_parse_RS
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, point_default ;restore value
|
|
|
|
|
mov cx, save_cx_d
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.start_p_RS:
|
|
|
|
|
call get_firs_sym ;get first symbol on new line
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test cx, cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz ._end_parse_RS ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 'R'
|
|
|
|
|
jnz .start_p_RS
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RamdiskSize
|
|
|
|
|
; parse_RamdiskSize
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, cx
|
|
|
|
|
mov ax, di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, parse_RamdiskSize
|
|
|
|
|
mov cx, parse_RamdiskSize_e - parse_RamdiskSize
|
|
|
|
|
repe cmpsb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .rest_value_loop_RS ;is not compare
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub bx, parse_RamdiskSize_e - parse_RamdiskSize;correct cx
|
|
|
|
|
add bx, cx
|
|
|
|
|
mov cx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test status_flag, flag_found_RS ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jz .correct_is_not_set_RS
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
; mov si,found_equal_timeout ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; call printplain
|
|
|
|
|
; jmp .get_next_str
|
|
|
|
|
|
|
|
|
|
.correct_is_not_set_RS:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 0x3d20 ;cut al=' ' ah='='
|
|
|
|
|
repe scasb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jcxz .end_get_RS_ERROR_1 ;not found param
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp ah, byte [es:di-1] ;find '='
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_p_RS ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
repe scasb ;cut ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc cx
|
|
|
|
|
dec di
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor bx, bx
|
|
|
|
|
mov cx, 5
|
|
|
|
|
@@:
|
|
|
|
|
mov al, byte [es:di]
|
|
|
|
|
cmp al, '0'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jb .CS
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, '9'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jbe .correct_val_RS
|
|
|
|
|
.CS:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 'K'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .correct_size_RS
|
|
|
|
|
jmp .end_get_RS_ERROR_2
|
|
|
|
|
.correct_val_RS:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
imul bx, 10
|
|
|
|
|
xor al, 0x30
|
|
|
|
|
add bl, al
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc di
|
|
|
|
|
loop @b
|
|
|
|
|
|
|
|
|
|
.correct_size_RS:
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> K <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test bx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz @f ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 0
|
|
|
|
|
;;;;;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =0 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 64 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
or show_errors_sect, show_error_3
|
|
|
|
|
mov bx, 64
|
2010-10-01 11:21:55 +02:00
|
|
|
|
@@:
|
|
|
|
|
jmp ._end_parse_RS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.rest_value_loop_RS:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, ax
|
|
|
|
|
mov cx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp .start_p_RS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.end_get_RS_ERROR_1:
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> :(
|
2012-03-08 09:33:38 +01:00
|
|
|
|
or show_errors_sect, show_error_1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp ._end_parse_RS
|
|
|
|
|
.end_get_RS_ERROR_2:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
or show_errors_sect, show_error_2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
._end_parse_RS:
|
|
|
|
|
if DEBUG
|
|
|
|
|
pusha
|
2012-03-08 09:33:38 +01:00
|
|
|
|
movzx eax, bx
|
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, RamdiskSize_msg
|
|
|
|
|
mov dword[ds:di], ' '
|
|
|
|
|
mov word [ds:di+4], ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call decode
|
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, RamdiskSize_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
|
|
|
|
|
popa
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro use_free_memory
|
|
|
|
|
{
|
|
|
|
|
local _support_function_use_free_memory
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<EFBFBD>88 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<EFBFBD>15 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD> ax <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD> ax=0
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ah, 0x88 ;ah,0x88
|
2010-10-01 11:21:55 +02:00
|
|
|
|
int 0x15
|
|
|
|
|
jnc ._support_function_use_free_memory
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ax <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>
|
|
|
|
|
._support_function_use_free_memory:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov free_ad_memory, ax ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD> ax=0
|
2010-10-01 11:21:55 +02:00
|
|
|
|
if DEBUG
|
|
|
|
|
pushad
|
2012-03-08 09:33:38 +01:00
|
|
|
|
movzx eax, ax
|
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, free_memory_msg
|
|
|
|
|
mov dword[ds:di], ' '
|
|
|
|
|
mov word [ds:di+4], ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call decode
|
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, free_memory_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
|
|
|
|
|
popad
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
macro show_ERRORS
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro get_type_FS ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RFS.
|
|
|
|
|
{
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, point_default ;restore value
|
|
|
|
|
mov cx, save_cx_d
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.start_g_tpe_RFS:
|
|
|
|
|
call get_firs_sym ;get first symbol on new line
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test cx, cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz ._end_parse_FRS ;._end_get_type_RFS ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 'R'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_g_tpe_RFS
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RamdiskSize
|
|
|
|
|
; parse_RamdiskSize
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, cx
|
|
|
|
|
mov ax, di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, parse_RamdiskFS
|
|
|
|
|
mov cx, parse_RamdiskFS_e - parse_RamdiskFS
|
|
|
|
|
repe cmpsb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_g_tpe_RFS_rest_v ;is not compare
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub bx, parse_RamdiskFS_e - parse_RamdiskFS;correct cx
|
|
|
|
|
add bx, cx
|
|
|
|
|
mov cx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test status_flag, flag_found_GTRFMS ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jz .correct_is_not_set_FRS
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
; mov si,found_equal_timeout ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; call printplain
|
|
|
|
|
; jmp .get_next_str
|
|
|
|
|
|
|
|
|
|
.correct_is_not_set_FRS:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 0x3d20 ;cut al=' ' ah='='
|
|
|
|
|
repe scasb
|
|
|
|
|
test cx, cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .end_get_FRS_ERROR_1 ;not found param
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp ah, byte [es:di-1] ;find '='
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_g_tpe_RFS ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
repe scasb ;cut ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc cx
|
|
|
|
|
dec di
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, cx
|
|
|
|
|
mov ax, di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, parse_RFS_FAT
|
|
|
|
|
mov cx, parse_RFS_FAT_e - parse_RFS_FAT
|
|
|
|
|
repe cmpsb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .krfs_cmp ;is not compare
|
|
|
|
|
|
|
|
|
|
make_FAT_RamFS ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pusha
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, make_fat12_RFS_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
popa
|
|
|
|
|
end if
|
|
|
|
|
jmp ._end_parse_FRS
|
|
|
|
|
|
|
|
|
|
.krfs_cmp:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, bx
|
|
|
|
|
mov di, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, parse_RFS_KRFS
|
|
|
|
|
mov cx, parse_RFS_KRFS_e - parse_RFS_KRFS
|
|
|
|
|
repe cmpsb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; jnz @f ;is not compare
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
jmp ._end_parse_FRS
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.start_g_tpe_RFS_rest_v:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, bx
|
|
|
|
|
mov di, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp .start_g_tpe_RFS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.end_get_FRS_ERROR_1:
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> :(
|
2012-03-08 09:33:38 +01:00
|
|
|
|
or show_errors_sect, show_error_1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp ._end_parse_FRS
|
|
|
|
|
.end_get_FRS_ERROR_2:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
or show_errors_sect, show_error_2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
._end_parse_FRS:
|
|
|
|
|
if DEBUG
|
|
|
|
|
pusha
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, get_type_FS_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
popa
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
macro make_FAT_RamFS
|
|
|
|
|
{
|
|
|
|
|
local .RS1
|
|
|
|
|
local .fat12
|
|
|
|
|
local .fat16
|
|
|
|
|
; <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ram FS, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>..
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> FAT12
|
|
|
|
|
; mov di,fat12_buffer ;ds <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> = cs
|
|
|
|
|
;es:di - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>.
|
|
|
|
|
use_RamdiskSector ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ax <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp ax, 4096;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD> 4096
|
2010-10-01 11:21:55 +02:00
|
|
|
|
ja .RS1
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test ax, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz @f ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ...
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
.RS1:
|
|
|
|
|
mov word [fat12_buffer.BPB_BytsPerSec], 512
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;;;;;;;;;;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
mov word [fat12_buffer.BPB_BytsPerSec], ax;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
;BPB_SecPerClus <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
use_RamdiskCluster ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> al
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 128
|
2010-10-01 11:21:55 +02:00
|
|
|
|
ja @f
|
|
|
|
|
; test al,0x1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
|
|
|
|
; jnz @f
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov byte [fat12_buffer.BPB_SecPerClus], al
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
;incorrect value will be set dafault
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2 <EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD> 128 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;@@: ;mov byte [fat12_buffer.BPB_SecPerClus],1
|
|
|
|
|
|
|
|
|
|
;;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FAT
|
|
|
|
|
;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, fat12<4085<=fat16<65525<=fat32
|
|
|
|
|
; fat12_buffer.BPB_BytsPerSec*fat12_buffer.BPB_SecPerClus = <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
movzx eax, word [fat12_buffer.BPB_BytsPerSec]
|
|
|
|
|
movzx ebx, byte [fat12_buffer.BPB_SecPerClus]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
imul ebx, eax;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov eax, save_ramdisksize ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
cdq
|
|
|
|
|
idiv ebx
|
|
|
|
|
;;;;;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> eax, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> edx
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> FAT <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp eax, 4085
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jb .fat12
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp eax, 65525
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jb .fat16
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;; <EFBFBD><EFBFBD><EFBFBD> fat32
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov set_ramfs, 32 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov word [fat12_buffer.BPB_RsvdSecCnt], 32
|
|
|
|
|
xor eax, eax
|
|
|
|
|
mov word [fat12_buffer.BPB_RootEntCnt], ax
|
|
|
|
|
mov word [fat12_buffer.BPB_TotSec16], ax
|
|
|
|
|
mov dword [fat12_buffer.BPB_TotSec32], eax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.fat16: ;fat16
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> FAT12 <EFBFBD> FAT16 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> BPB_TotSec32 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>> (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0x10000).
|
|
|
|
|
jmp $
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov set_ramfs, 16 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
movzx ebx, byte [fat12_buffer.BPB_SecPerClus]
|
|
|
|
|
imul eax, ebx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp eax, 0x10000
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jae @f
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [fat12_buffer.BPB_TotSec16], ax
|
|
|
|
|
mov dword [fat12_buffer.BPB_TotSec32], 0
|
2010-10-01 11:21:55 +02:00
|
|
|
|
@@:
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; mov word [fat12_buffer.BPB_FATSz16],0x9 ;<EFBFBD><EFBFBD><EFBFBD> FAT12/FAT16 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FAT. ??
|
|
|
|
|
;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BPB_RootEntCnt <EFBFBD><EFBFBD><EFBFBD> FAT12 <EFBFBD> FAT16 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;32-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD> FAT32 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0. <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov eax, root_dir_entry_count
|
|
|
|
|
mov word [fat12_buffer.BPB_RootEntCnt], ax ; count of 32-byte dir. entries (224*32 = 14 sectors= 7 kb)
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 16 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 7 <EFBFBD><EFBFBD>
|
|
|
|
|
;;;;;;;
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> FAT16 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FAT. <EFBFBD><EFBFBD><EFBFBD> FAT32 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FAT <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> BPB_FATSz32.
|
|
|
|
|
;RootDirSectors = ((BPB_RootEntCnt * 32) + (BPB_BytsPerSec - 1)) / BPB_BytsPerSec;
|
|
|
|
|
|
|
|
|
|
;TmpVal1 = DskSize - (BPB_ResvdSecCnt + RootDirSectors);
|
|
|
|
|
;TmpVal2 = (256 * BPB_SecPerClus) + BPB_NumFATs;
|
|
|
|
|
;If(FATType == FAT32)
|
|
|
|
|
; TmpVal2 = TmpVal2 / 2;
|
|
|
|
|
;FATSz = (TMPVal1 + (TmpVal2 - 1)) / TmpVal2;
|
|
|
|
|
;If(FATType == FAT32) {
|
|
|
|
|
; BPB_FATSz16 = 0;
|
|
|
|
|
; BPB_FATSz32 = FATSz;
|
|
|
|
|
;} else {
|
|
|
|
|
; BPB_FATSz16 = LOWORD(FATSz);
|
|
|
|
|
; /* there is no BPB_FATSz32 in a FAT16 BPB */
|
|
|
|
|
;}
|
|
|
|
|
;=====================================
|
|
|
|
|
;RootDirSectors
|
|
|
|
|
movzx ebx, word [fat12_buffer.BPB_BytsPerSec]
|
2012-03-08 09:33:38 +01:00
|
|
|
|
imul eax, 32
|
|
|
|
|
add eax, ebx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
dec eax
|
|
|
|
|
|
|
|
|
|
cdq
|
|
|
|
|
idiv ebx
|
|
|
|
|
;;;;;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> eax, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> edx <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1.44 <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =14
|
|
|
|
|
;BPB_ResvdSecCnt + RootDirSectors
|
|
|
|
|
movzx ebx, word [fat12_buffer.BPB_RsvdSecCnt]
|
2012-03-08 09:33:38 +01:00
|
|
|
|
add ebx, eax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
;DskSize <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
movzx eax, word [fat12_buffer.BPB_TotSec16] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
sub eax, ebx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;TmpVal1=eax
|
2012-03-08 09:33:38 +01:00
|
|
|
|
shl edi, 8 ;=edi*256
|
|
|
|
|
movzx ecx, byte [fat12_buffer.BPB_NumFATs]
|
|
|
|
|
add edi, ecx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;TmpVal2=edi
|
2012-03-08 09:33:38 +01:00
|
|
|
|
add eax, edi
|
2010-10-01 11:21:55 +02:00
|
|
|
|
dec eax
|
|
|
|
|
cdq
|
|
|
|
|
idiv edi
|
|
|
|
|
;FATSz = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> eax, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> edx
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [fat12_buffer.BPB_FATSz16], ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.fat12: ;fat12
|
|
|
|
|
if DEBUG
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> c FS=fat12
|
2012-03-08 09:33:38 +01:00
|
|
|
|
pushad
|
|
|
|
|
mov si, start_making_FAT12_msg
|
|
|
|
|
call printplain
|
|
|
|
|
popad
|
2010-10-01 11:21:55 +02:00
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> FAT12 <EFBFBD> FAT16 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> BPB_TotSec32 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>> (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0x10000).
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov set_ramfs, 12 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
movzx ebx, byte [fat12_buffer.BPB_SecPerClus]
|
|
|
|
|
imul eax, ebx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp eax, 0x10000
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jae @f
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [fat12_buffer.BPB_TotSec16], ax
|
|
|
|
|
mov dword [fat12_buffer.BPB_TotSec32], 0
|
2010-10-01 11:21:55 +02:00
|
|
|
|
@@:
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; mov word [fat12_buffer.BPB_FATSz16],0x9 ;<EFBFBD><EFBFBD><EFBFBD> FAT12/FAT16 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FAT. ??
|
|
|
|
|
;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BPB_RootEntCnt <EFBFBD><EFBFBD><EFBFBD> FAT12 <EFBFBD> FAT16 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;32-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD> FAT32 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0. <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov eax, root_dir_entry_count
|
|
|
|
|
mov word [fat12_buffer.BPB_RootEntCnt], ax ; count of 32-byte dir. entries (224*32 = 14 sectors= 7 kb)
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 16 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 7 <EFBFBD><EFBFBD>
|
|
|
|
|
;;;;;;;
|
|
|
|
|
;DskSize(<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*12 (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD>.<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) /8 (<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. 512 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD>12
|
|
|
|
|
movzx eax, word [fat12_buffer.BPB_TotSec16]
|
2012-03-08 09:33:38 +01:00
|
|
|
|
imul eax, 12
|
|
|
|
|
shr eax, 3 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 8 <EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> 512 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
movzx ebx, word [fat12_buffer.BPB_BytsPerSec] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
cdq
|
|
|
|
|
idiv ebx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> eax <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 512 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 512 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 512 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; and eax,0xfff200
|
|
|
|
|
; add eax,0x200 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 512 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 1.44 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ))
|
|
|
|
|
|
|
|
|
|
inc ax
|
|
|
|
|
;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 9 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2*9=18+1 =19 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD> 20 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<EFBFBD>2600
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> ) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 512
|
|
|
|
|
;FATSz = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> eax
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [fat12_buffer.BPB_FATSz16], ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
get_firstDataSector ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
first_create_fat_table
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BPB <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>.
|
|
|
|
|
use_BPB_RAM
|
|
|
|
|
;
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
use_RamdiskFile
|
|
|
|
|
|
|
|
|
|
;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> FirstRootDirSecNum = BPB_ResvdSecCnt + (BPB_NumFATs * BPB_FATSz16);
|
|
|
|
|
; movzx ebx, [fat12_buffer.BPB_NumFATs]
|
|
|
|
|
; movzx eax,ax
|
|
|
|
|
; imul eax,ebx
|
|
|
|
|
;eax=(BPB_NumFATs * BPB_FATSz16)
|
|
|
|
|
; inc eax
|
|
|
|
|
; BPB_ResvdSecCnt <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD><EFBFBD> fat12/16
|
|
|
|
|
;<EFBFBD> eax <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> root dir. <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> fat12 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> fat 1 = 1+ (1*1) =2 <EFBFBD><EFBFBD><EFBFBD> 3
|
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pusha
|
|
|
|
|
; mov ax,point_default
|
|
|
|
|
; mov ax,cx
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, show_db1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; mov dword[ds:di],' '
|
|
|
|
|
; mov word [ds:di+4],' '
|
2012-03-08 09:33:38 +01:00
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, show_db1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
;
|
|
|
|
|
; xor ax,ax
|
|
|
|
|
; int 0x16
|
|
|
|
|
popa
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro use_RamdiskSector
|
|
|
|
|
{
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, point_default ;restore value
|
|
|
|
|
mov cx, save_cx_d
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
.start_RamdiskSector:
|
|
|
|
|
call get_firs_sym ;get first symbol on new line
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test cx, cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .end_RamdiskSector ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 'R'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_RamdiskSector
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RamdiskSize
|
|
|
|
|
; parse_RamdiskSize
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, cx
|
|
|
|
|
mov ax, di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, parse_RamdiskSector
|
|
|
|
|
mov cx, parse_RamdiskSector_e - parse_RamdiskSector
|
|
|
|
|
repe cmpsb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .RamdiskSector_rest_val ;is not compare
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub bx, parse_RamdiskSector_e - parse_RamdiskSector;correct cx
|
|
|
|
|
add bx, cx
|
|
|
|
|
mov cx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test status_flag, flag_found_RamdiskSector ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jz .correct_is_not_set_RamdiskSector
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
; mov si,found_equal_timeout ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; call printplain
|
|
|
|
|
; jmp .get_next_str
|
|
|
|
|
|
|
|
|
|
.correct_is_not_set_RamdiskSector:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 0x3d20 ;cut al=' ' ah='='
|
|
|
|
|
repe scasb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jcxz .end_get_RamS_ERROR_1 ;not found param
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp ah, byte [es:di-1] ;find '='
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_RamdiskSector ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
repe scasb ;cut ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc cx
|
|
|
|
|
dec di
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor bx, bx
|
|
|
|
|
mov cx, 4
|
|
|
|
|
@@:
|
|
|
|
|
movzx ax, byte [es:di]
|
|
|
|
|
cmp al, '0'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jb .end_RamdiskSector
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, '9'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
ja .end_RamdiskSector
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
imul bx, 10
|
|
|
|
|
xor al, 0x30
|
|
|
|
|
add bx, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
inc di
|
|
|
|
|
|
|
|
|
|
loop @b
|
|
|
|
|
jmp .end_RamdiskSector
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.RamdiskSector_rest_val:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, bx
|
|
|
|
|
mov di, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp .start_RamdiskSector
|
|
|
|
|
.end_get_RamS_ERROR_1:
|
|
|
|
|
|
|
|
|
|
.end_RamdiskSector:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pusha
|
2012-03-08 09:33:38 +01:00
|
|
|
|
movzx eax, bx;save_cx_d;point_default
|
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, RamdiskSector_msg
|
|
|
|
|
mov dword[ds:di], ' '
|
|
|
|
|
mov dword [ds:di+4], ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call decode
|
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, RamdiskSector_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
|
|
|
|
|
popa
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
; pop di
|
|
|
|
|
; pop es
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro use_RamdiskCluster
|
|
|
|
|
{
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FS <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; push es
|
|
|
|
|
; push di
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, point_default ;restore value
|
|
|
|
|
mov cx, save_cx_d
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; push ini_data_
|
|
|
|
|
; pop es
|
|
|
|
|
.start_RamdiskCluster:
|
|
|
|
|
call get_firs_sym ;get first symbol on new line
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test cx, cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .end_RamdiskCluster ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 'R'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_RamdiskCluster
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RamdiskSize
|
|
|
|
|
; parse_RamdiskSize
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, cx
|
|
|
|
|
mov ax, di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, parse_RamdiskCluster
|
|
|
|
|
mov cx, parse_RamdiskCluster_e - parse_RamdiskCluster
|
|
|
|
|
repe cmpsb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .RamdiskCluster_rest_val ;is not compare
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub bx, parse_RamdiskCluster_e - parse_RamdiskCluster;correct cx
|
|
|
|
|
add bx, cx
|
|
|
|
|
mov cx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test status_flag, flag_found_RamdiskCluster ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jz .correct_is_not_set_RamdiskCluster
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
; mov si,found_equal_timeout ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; call printplain
|
|
|
|
|
; jmp .get_next_str
|
|
|
|
|
|
|
|
|
|
.correct_is_not_set_RamdiskCluster:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 0x3d20 ;cut al=' ' ah='='
|
|
|
|
|
repe scasb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jcxz .end_get_RamSC_ERROR_1 ;not found param
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp ah, byte [es:di-1] ;find '='
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_RamdiskCluster ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
repe scasb ;cut ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc cx
|
|
|
|
|
dec di
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
movzx ax, byte [es:di]
|
|
|
|
|
cmp al, '0'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jb .end_RamdiskCluster
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, '9'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
ja .end_RamdiskCluster
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor al, 0x30
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
jmp .end_RamdiskCluster
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.RamdiskCluster_rest_val:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, bx
|
|
|
|
|
mov di, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp .start_RamdiskCluster
|
|
|
|
|
.end_get_RamSC_ERROR_1:
|
|
|
|
|
|
|
|
|
|
.end_RamdiskCluster:
|
|
|
|
|
if DEBUG
|
|
|
|
|
pusha
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, RamdiskCluster_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; mov word[ds:di],' '
|
|
|
|
|
call decode
|
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, RamdiskCluster_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
|
|
|
|
|
popa
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro use_Loader_Image
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1.44 <EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
local .start_p_LI
|
|
|
|
|
local .exit
|
|
|
|
|
local .error_LI
|
|
|
|
|
local .rest_value_loop
|
|
|
|
|
local .found_end_str
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, point_default ;restore value
|
|
|
|
|
mov cx, save_cx_d
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> LoaderModule=kord/kolibri.ldm
|
|
|
|
|
.start_p_LI:
|
|
|
|
|
call get_firs_sym ;get first symbol on new line
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test cx, cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .exit ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 'L'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_p_LI
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> LoaderModule
|
|
|
|
|
; parse_LoaderModule
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, cx
|
|
|
|
|
mov ax, di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, parse_LoaderImage
|
|
|
|
|
mov cx, parse_LoaderImage_e - parse_LoaderImage
|
|
|
|
|
repe cmpsb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .rest_value_loop ;is not compare
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub bx, parse_LoaderImage_e - parse_LoaderImage;correct cx
|
|
|
|
|
add bx, cx
|
|
|
|
|
mov cx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
; test status_flag,flag_found_LM ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; jz .correct_is_not_set_LI
|
|
|
|
|
|
|
|
|
|
; mov si,found_equal_timeout ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; call printplain
|
|
|
|
|
; jmp .get_next_str
|
|
|
|
|
|
|
|
|
|
;.correct_is_not_set_LI:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 0x3d20 ;cut al=' ' ah='='
|
|
|
|
|
repe scasb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jcxz .rest_value_loop_LI ;not found param timeout
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp ah, byte [es:di-1] ;find '='
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .rest_value_loop_LI
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
repe scasb ;cut ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc cx
|
|
|
|
|
dec di
|
|
|
|
|
;di <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> cx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> callback <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dd <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> byte =0
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>: <EFBFBD> ini <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> LoaderModule = kord/kernel.loader
|
|
|
|
|
;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dw,dw,db'kord/kernel.loader',0 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2 word
|
|
|
|
|
push dword [es:di-6]
|
2012-03-08 09:33:38 +01:00
|
|
|
|
lea si, [di-6]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push word [es:di-2]
|
|
|
|
|
xor ax, ax
|
|
|
|
|
mov word [es:di-6], ax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;info_real_mode_size <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, info_real_mode_size ;0x3000 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [es:di-4], ax
|
|
|
|
|
mov word [es:di-2], 16 ;<EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 4 <EFBFBD><EFBFBD> =64 <EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;;;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
mov al, byte [es:di]
|
|
|
|
|
cmp al, ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .found_end_str
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0xa
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .found_end_str
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0xd
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .found_end_str
|
|
|
|
|
inc di
|
|
|
|
|
dec cx
|
|
|
|
|
jnz @b
|
|
|
|
|
;;;not found <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.found_end_str:
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 64 <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>.
|
|
|
|
|
push word [es:di]
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
|
|
|
|
mov word [es:di], ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; xor ax,ax ; function 1 - read file
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, si ;file_data
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc ax
|
|
|
|
|
push si
|
|
|
|
|
push es
|
2012-03-08 09:33:38 +01:00
|
|
|
|
call far dword [loader_callback]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
push cs
|
|
|
|
|
pop ds
|
|
|
|
|
|
|
|
|
|
pop es
|
|
|
|
|
pop si
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test bx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .error_LM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 64 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, table_15_87
|
2010-10-01 11:21:55 +02:00
|
|
|
|
push es
|
|
|
|
|
push ds
|
|
|
|
|
pop es
|
|
|
|
|
mov cx, 256*18
|
|
|
|
|
mov ah, 0x87
|
|
|
|
|
int 0x15
|
|
|
|
|
pop es
|
|
|
|
|
pop dx cx
|
|
|
|
|
test ah, ah
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
jmp far dword [es:si]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.rest_value_loop:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, ax
|
|
|
|
|
mov cx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp .start_p_LI
|
|
|
|
|
|
|
|
|
|
.exit:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
macro name_in_root_fat
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
macro use_RamdiskFile
|
|
|
|
|
{
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> callback <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<EFBFBD>87 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> int 0x15 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 64 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>
|
|
|
|
|
local .start_loop
|
|
|
|
|
local ._end
|
|
|
|
|
local .rest_value_loop
|
|
|
|
|
local .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, point_default ;restore value
|
|
|
|
|
mov cx, save_cx_d
|
|
|
|
|
mov data_offset, 0 ;clean offset
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> LoaderModule=kord/kolibri.ldm
|
|
|
|
|
.start_loop:
|
|
|
|
|
call get_firs_sym ;get first symbol on new line
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test cx, cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz ._end ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 'R'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_loop
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RamdiskFile
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, cx
|
|
|
|
|
mov ax, di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, parse_RamdiskFile
|
|
|
|
|
mov cx, parse_RamdiskFile_e - parse_RamdiskFile
|
|
|
|
|
repe cmpsb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .rest_value_loop ;is not compare
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub bx, parse_RamdiskFile_e - parse_RamdiskFile;correct cx
|
|
|
|
|
add bx, cx
|
|
|
|
|
mov cx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; test status_flag,flag_found_LM ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; jz .correct_is_not_set_LM
|
|
|
|
|
|
|
|
|
|
; mov si,found_equal_timeout ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; call printplain
|
|
|
|
|
; jmp .get_next_str
|
|
|
|
|
|
|
|
|
|
;.correct_is_not_set_LM:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 0x3d20 ;cut al=' ' ah='='
|
|
|
|
|
repe scasb
|
|
|
|
|
test ecx, ecx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .rest_value_loop ;not found param timeout
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp ah, byte [es:di-1] ;find '='
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .rest_value_loop
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
repe scasb ;cut ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc cx
|
|
|
|
|
dec di
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov save_di_RAMDISK, di
|
|
|
|
|
mov save_cx_RAMDISK, cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;di <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> cx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> callback <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dd <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> byte =0
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>: <EFBFBD> ini <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RamdiskFile = @menu,@menu
|
|
|
|
|
;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> dw,dw,db'@menu',0 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2 word
|
|
|
|
|
|
|
|
|
|
;
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
mov al, byte [es:di]
|
|
|
|
|
cmp al, ',' ; <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .found_end_str
|
|
|
|
|
inc di
|
|
|
|
|
dec cx
|
|
|
|
|
jnz @b
|
|
|
|
|
;;;not found <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.found_end_str:
|
|
|
|
|
; mov al,byte [es:di]
|
|
|
|
|
; cmp al,' ' ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; jnz @f
|
|
|
|
|
; inc di
|
|
|
|
|
; dec cx
|
|
|
|
|
; jnz .found_end_str
|
|
|
|
|
|
|
|
|
|
;@@:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov point_to_dest_file_name, di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc di
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
check_name_file
|
|
|
|
|
;/restore di - point and cx -size section
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, save_di_RAMDISK
|
|
|
|
|
mov cx, save_cx_RAMDISK
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test al, al
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .start_loop ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> al <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> =0, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
push dword [es:di-6]
|
2012-03-08 09:33:38 +01:00
|
|
|
|
lea si, [di-6]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push word [es:di-2]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
push di
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
|
|
|
|
mov word [es:di-6], ax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;info_real_mode_size <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, info_real_mode_size ;0x3000 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [es:di-4], ax
|
|
|
|
|
mov word [es:di-2], 16 ;<EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 4 <EFBFBD><EFBFBD> =64 <EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, point_to_dest_file_name
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pushad
|
2012-03-08 09:33:38 +01:00
|
|
|
|
; mov ax,di
|
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, name_of_seg_get_64
|
|
|
|
|
mov dword[ds:di], ' '
|
|
|
|
|
mov word[ds:di+4], ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call decode
|
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, name_of_seg_get_64
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
|
|
|
|
|
popad
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
push word [es:di]
|
|
|
|
|
push cx
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
|
|
|
|
mov word [es:di], ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; xor ax,ax ; function 1 - read file
|
|
|
|
|
push di
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, si ;file_data
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc ax
|
|
|
|
|
push si
|
|
|
|
|
push es
|
|
|
|
|
push bp
|
|
|
|
|
|
|
|
|
|
push es
|
|
|
|
|
pop ds
|
|
|
|
|
push cs
|
|
|
|
|
pop es
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
call far dword [es:loader_callback]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
push cs
|
|
|
|
|
pop ds
|
|
|
|
|
|
|
|
|
|
pop bp
|
|
|
|
|
pop es
|
|
|
|
|
pop si
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp bx, 2
|
|
|
|
|
ja .error
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> dx:ax <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> bx=1 <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov status_flag_loader_f, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
shl edx, 16
|
|
|
|
|
mov dx, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; shr edx,10 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>.
|
|
|
|
|
;;<EFBFBD> edx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov save_file_size, edx
|
|
|
|
|
mov eax, edx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
pop di
|
|
|
|
|
pop cx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 2-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
pop word [es:di]
|
|
|
|
|
pop di
|
2012-03-08 09:33:38 +01:00
|
|
|
|
pop word [es:di-2]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
pop dword [es:di-6]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pushad
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, RamdiskFile_msg
|
|
|
|
|
mov dword[ds:di], ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call decode
|
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, RamdiskFile_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
|
|
|
|
|
popad
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; mov ax,word [fat12_buffer.BPB_BytsPerSec] ;<EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 512 1024 2048 4096 2 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; movzx bx,byte [fat12_buffer.BPB_SecPerClus] ;<EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; imul ax,bx
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> eax <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (512) <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD> edx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 64 <EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>
|
|
|
|
|
;1 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
register_file_in_fat
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
move_file_up
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 64 <EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp status_flag_loader_f, 0x1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz @f
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@:
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, save_di_RAMDISK
|
|
|
|
|
mov cx, save_cx_RAMDISK
|
2010-10-01 11:21:55 +02:00
|
|
|
|
if DEBUG
|
|
|
|
|
pusha
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
int 0x16
|
|
|
|
|
popa
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jmp .start_loop
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.error:
|
|
|
|
|
;call error.LoaderModule
|
|
|
|
|
;fixme!
|
|
|
|
|
.rest_value_loop:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, ax
|
|
|
|
|
mov cx, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp .start_loop
|
|
|
|
|
|
|
|
|
|
._end:
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
move_up_fat_and_root_d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; mov ah,0x87
|
|
|
|
|
; mov cx, ;size in byte
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;es:si point to descripts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro use_BPB_RAM ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 512 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1-<EFBFBD> <EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BPB <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 512 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>12 <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>
|
|
|
|
|
{
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, fat12_buffer
|
|
|
|
|
mov si, table_15_87
|
|
|
|
|
add word [si+8*2+2], ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
push es
|
|
|
|
|
push ds
|
|
|
|
|
pop es
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, 256 ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 512 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 512/2=256
|
2010-10-01 11:21:55 +02:00
|
|
|
|
mov ah, 0x87
|
|
|
|
|
int 0x15
|
|
|
|
|
pop es
|
|
|
|
|
;add 512 byte for destination adress
|
|
|
|
|
; add dword [si+8*3+2], 512
|
|
|
|
|
; test ah, ah
|
|
|
|
|
; jz
|
|
|
|
|
if DEBUG
|
|
|
|
|
pusha
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, word [si+8*2+2]
|
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, BPB_msg
|
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, BPB_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
popa
|
|
|
|
|
end if
|
|
|
|
|
}
|
|
|
|
|
macro first_create_fat_table
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> fat <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
{
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, byte [fat12_buffer.BPB_Media]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
push ds
|
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, info_real_mode_size
|
|
|
|
|
add di, 0x1000
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pushad
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, info_real_mode_size
|
|
|
|
|
add ax, 0x1000
|
|
|
|
|
; mov ax,ds
|
|
|
|
|
mov cx, 0xa
|
|
|
|
|
|
|
|
|
|
mov di, first_entry_in_fat
|
|
|
|
|
mov dword [di], ' '
|
|
|
|
|
mov word [di+4], ' '
|
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, first_entry_in_fat
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
int 0x16
|
|
|
|
|
|
|
|
|
|
popad
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
push di ; push word info_real_mode_size+0x1000 ;c<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor di, di
|
|
|
|
|
mov point_to_free_root, di ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =0 <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
pop ds ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov byte [di], al
|
|
|
|
|
or ax, -1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc di
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [di], ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
pop ds
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov point_next_fat_str, 3
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pushad
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, point_next_fat_str
|
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, fat_create_msg
|
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, fat_create_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
popad
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
macro register_file_in_fat
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Fat
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>12, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ))
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> fat/
|
|
|
|
|
{
|
|
|
|
|
local .step2
|
|
|
|
|
local .step3
|
|
|
|
|
local .end
|
|
|
|
|
local .eof_file
|
|
|
|
|
|
|
|
|
|
;di point on root dir <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
push es
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, info_real_mode_size
|
|
|
|
|
add ax, 0x1000
|
|
|
|
|
mov es, ax ; push word info_real_mode_size+0x1000 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 64 <EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 12
|
|
|
|
|
; 12 <EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, firstDataSect ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
sub di, size_root_dir
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ax <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
shl di, 9;imul 512
|
|
|
|
|
add di, point_to_free_root ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 32-<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. 32 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if DEBUG
|
|
|
|
|
pushad
|
|
|
|
|
; mov ax,point_default
|
|
|
|
|
; mov ax,
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, show_db2
|
|
|
|
|
mov dword[ds:di], ' '
|
|
|
|
|
mov word [ds:di+4], ' '
|
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, show_db2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
;
|
|
|
|
|
; xor ax,ax
|
|
|
|
|
; int 0x16
|
|
|
|
|
popad
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;gs:di - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, shot_name_fat
|
|
|
|
|
mov cx, 11
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
lodsb
|
2010-10-01 11:21:55 +02:00
|
|
|
|
stosb
|
|
|
|
|
loop @b
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> DIR_NTRes - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> =0
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
|
|
|
|
mov ah, ATTR_VOLUME_ID
|
|
|
|
|
mov word [es:di], ax
|
|
|
|
|
add di, 2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;DIR_CrtTimeTenth
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov byte [es:di], 100
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc di
|
|
|
|
|
;DIR_CrtTime
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [es:di], 0x032b ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
add di, 2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;DIR_CrtDate
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [es:di], 0x0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ><
|
|
|
|
|
add di, 2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;DIR_LstAccDate
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [es:di], 0x032b ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
add di, 2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;DIR_FstClusHI
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [es:di], 0x0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>12 /16 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0
|
|
|
|
|
add di, 2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;DIR_WrtTime
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [es:di], 0x0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ><
|
|
|
|
|
add di, 2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;DIR_WrtDate
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov word [es:di], 0x032b
|
|
|
|
|
add di, 2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, point_next_fat_str
|
|
|
|
|
mov word [es:di], ax
|
|
|
|
|
add di, 2
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
push di
|
|
|
|
|
;DIR_FstClusLO <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
; mov ax,point_next_fat_str ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;FATOffset = N + (N / 2) <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> -<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 3-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, ax
|
|
|
|
|
shr bx, 1
|
|
|
|
|
add ax, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FATOffset
|
|
|
|
|
;ThisFATEntOffset = BPB_ResvdSecCnt + (FATOffset / BPB_BytsPerSec);
|
|
|
|
|
mov bx, word [fat12_buffer.BPB_BytsPerSec]
|
|
|
|
|
cwd
|
|
|
|
|
idiv bx
|
|
|
|
|
;ax=ThisFATEntOffset= rem (FATOffset / BPB_BytsPerSec) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
movzx eax, word [fat12_buffer.BPB_BytsPerSec]
|
|
|
|
|
movzx ebx, byte [fat12_buffer.BPB_SecPerClus]
|
|
|
|
|
imul eax, ebx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;ax - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ebx, save_file_size ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
sub ebx, eax
|
|
|
|
|
cmp ebx, eax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jbe .eof_file
|
|
|
|
|
|
|
|
|
|
inc point_next_fat_str
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, point_next_fat_str ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;FATOffset = N + (N / 2) <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> -<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 3-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov dx, ax
|
|
|
|
|
shr dx, 1
|
|
|
|
|
add cx, dx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test si, 0x1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .step2
|
2012-03-08 09:33:38 +01:00
|
|
|
|
shl cx, 4
|
|
|
|
|
mov word[es:si], cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc si
|
2012-03-08 09:33:38 +01:00
|
|
|
|
add cx, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp @b
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
.step2:
|
|
|
|
|
and cx, 0x0FFF
|
|
|
|
|
mov word[es:si], cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc si
|
2012-03-08 09:33:38 +01:00
|
|
|
|
add cx, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp @b
|
|
|
|
|
|
|
|
|
|
.eof_file:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, 0x0fff
|
|
|
|
|
test si, 0x1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .step3
|
2012-03-08 09:33:38 +01:00
|
|
|
|
shl cx, 4
|
|
|
|
|
mov word[es:si], cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp .end
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
.step3:
|
|
|
|
|
and cx, 0x0FFF
|
|
|
|
|
mov word[es:si], cx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
.end:
|
|
|
|
|
inc point_next_fat_str
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
pop di
|
|
|
|
|
;DIR_FileSize 32-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DWORD <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov eax, save_file_size
|
|
|
|
|
mov dword [es:di], eax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pushad
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, firstDataSect ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
sub di, size_root_dir
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ax <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
shl di, 9;imul 512
|
|
|
|
|
add di, point_to_free_root ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 32-<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push di
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, dest_name_fat
|
|
|
|
|
mov cx, 11
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
mov al, byte [es:di]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc di
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov byte [ds:si], al
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc si
|
|
|
|
|
loop @b
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, si
|
|
|
|
|
inc di
|
|
|
|
|
pop ax
|
|
|
|
|
mov cx, 0xa
|
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, dest_name_fat
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
popad
|
|
|
|
|
|
|
|
|
|
END IF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
add point_to_free_root, 32 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2010-10-01 11:21:55 +02:00
|
|
|
|
pop es
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
macro get_firstDataSector
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FirstDataSector = BPB_ResvdSecCnt + (BPB_NumFATs * FATSz) + RootDirSectors;
|
|
|
|
|
{
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, word [fat12_buffer.BPB_FATSz16]
|
|
|
|
|
movzx bx, byte [fat12_buffer.BPB_NumFATs]
|
|
|
|
|
imul ax, bx ;9x1=9
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;ax=BPB_NumFATs * FATSz
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, word [fat12_buffer.BPB_RootEntCnt] ; count of 32-byte dir. entries (224*32 = 14 sectors= 7 kb)
|
|
|
|
|
shr bx, 4 ;imul bx,32 and then div 512 -> in bx size in sectors
|
|
|
|
|
add ax, bx ;9+14=23
|
|
|
|
|
mov size_root_dir, bx
|
|
|
|
|
movzx bx, byte [fat12_buffer.BPB_RsvdSecCnt] ;add 1 for fat 16/12
|
|
|
|
|
add ax, bx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;ax=firstDataSector - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 0 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = 24 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov firstDataSect, ax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov bx, word [fat12_buffer.BPB_TotSec16]
|
|
|
|
|
sub bx, ax
|
|
|
|
|
mov ax, bx
|
|
|
|
|
movzx bx, byte [fat12_buffer.BPB_SecPerClus]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
cwd
|
|
|
|
|
idiv bx
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov DataClasters, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pushad
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, firstDataSect ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, firstDataSect_msg
|
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, firstDataSect_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, size_root_dir ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, size_root_dir_msg
|
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, size_root_dir_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, DataClasters;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, DataClasters_msg
|
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, DataClasters_msg
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
popad
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro use_RamdiskPATHS
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro use_RamdiskPATHD
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
macro check_name_file
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: es- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. startos.ini
|
|
|
|
|
;di - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. es:di <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> eax =-1 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, eax=0 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
{
|
|
|
|
|
local .no_equal
|
|
|
|
|
local .exit
|
2012-03-08 09:33:38 +01:00
|
|
|
|
local .loop_size_root_dir
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
convertion_file_name ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
test ax, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .exit
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
lea si, [shot_name_fat] ; desination name of file
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov di, firstDataSect
|
|
|
|
|
sub di, size_root_dir
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> ax <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
shl di, 9;imul 512
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;di= <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 64 <EFBFBD><EFBFBD>.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov dx, root_dir_entry_count
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, info_real_mode_size
|
|
|
|
|
add ax, 0x1000
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov gs, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
.loop_size_root_dir:
|
|
|
|
|
DEBUG1 equ 0
|
|
|
|
|
if DEBUG1
|
|
|
|
|
pushad
|
2012-03-08 09:33:38 +01:00
|
|
|
|
push di
|
|
|
|
|
mov eax, dword[gs:di]
|
|
|
|
|
lea si, [check_root_fat_+14]
|
|
|
|
|
mov dword [ds:si], '----'
|
|
|
|
|
mov dword [ds:si+4], '----'
|
|
|
|
|
mov dword [ds:si+8], '----'
|
|
|
|
|
mov dword[ds:si], eax
|
|
|
|
|
mov eax, dword[gs:di+4]
|
|
|
|
|
mov dword[ds:si+4], eax
|
|
|
|
|
mov eax, dword[gs:di+8]
|
|
|
|
|
mov dword[ds:si+8], eax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
;
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor eax, eax
|
|
|
|
|
mov ax, gs;point_next_fat_str
|
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, check_root_fat_
|
|
|
|
|
mov dword [di], ' '
|
|
|
|
|
mov word [di+4], ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call decode
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor eax, eax
|
|
|
|
|
pop ax
|
|
|
|
|
mov di, (check_root_fat_+7)
|
|
|
|
|
mov dword [di], ' '
|
|
|
|
|
mov word [di+4], ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call decode
|
|
|
|
|
|
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
lea si, [check_root_fat_]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
lea si, [shot_name_fat]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor ax, ax
|
|
|
|
|
int 0x16
|
2010-10-01 11:21:55 +02:00
|
|
|
|
popad
|
|
|
|
|
end if
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor bx, bx
|
|
|
|
|
mov cx, 11 ;size of name in struct FAT
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
@@:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, byte [ds:si+bx] ;ds:si - point to name of convertion variable.
|
|
|
|
|
mov ah, byte [gs:di+bx] ;gs:di - point to name in fat struct
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc bx
|
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
; pushad
|
2012-03-08 09:33:38 +01:00
|
|
|
|
; lea si,[check_root_fat_+14]
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; mov dword [ds:si],'----'
|
2012-03-08 09:33:38 +01:00
|
|
|
|
; mov word [ds:si],ax
|
|
|
|
|
; call printplain
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
; xor ax,ax
|
|
|
|
|
; int 0x16
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
; popad
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp ah, al
|
|
|
|
|
jnz .no_equal
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
; dec cx
|
|
|
|
|
; jnz @b
|
|
|
|
|
loop @b
|
|
|
|
|
|
|
|
|
|
;.succesfuly:
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> :(
|
2012-03-08 09:33:38 +01:00
|
|
|
|
or ax, -1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp .exit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.no_equal:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
add di, 32 ;fat struct =32 byte
|
2010-10-01 11:21:55 +02:00
|
|
|
|
dec dx
|
|
|
|
|
jnz .loop_size_root_dir
|
|
|
|
|
|
|
|
|
|
;.exit_check_name:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
and ax, 0
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
.exit:
|
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pushad
|
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
lea si, [check_name_fat_msg_n]
|
|
|
|
|
test ax, ax
|
|
|
|
|
jz @f
|
|
|
|
|
lea si, [check_name_fat_msg_y]
|
|
|
|
|
call printplain
|
|
|
|
|
lea si, [alarm_msg]
|
|
|
|
|
@@:
|
|
|
|
|
call printplain
|
2010-10-01 11:21:55 +02:00
|
|
|
|
popad
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
macro convertion_file_name
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> hello.asm <EFBFBD> 'HELLO ASM', <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> fat.
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> es:di <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> shot_name_fat
|
|
|
|
|
{
|
|
|
|
|
local .next_step
|
|
|
|
|
local .error
|
|
|
|
|
local .st1
|
|
|
|
|
local .st2
|
|
|
|
|
local .st2_l
|
|
|
|
|
local .st3
|
|
|
|
|
local .st4_s
|
|
|
|
|
local .st4
|
|
|
|
|
local .st5
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
; mov di,point_to_dest_file_name <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, shot_name_fat
|
|
|
|
|
or first_input, -1 ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov cx, 11 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
@@:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, byte [es:di]
|
|
|
|
|
cmp al, 0xa
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .st4_s
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0xd
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .st4_s
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x20
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .st4_s
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x20
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jb .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x22
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x2a
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x2b
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x2c
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x2F
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x3a
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x3b
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x3c
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x3d
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x3E
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x3F
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x5b
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x5c
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x5d
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x7c
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error
|
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp first_input, -1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .next_step
|
2012-03-08 09:33:38 +01:00
|
|
|
|
and first_input, 0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
cmp al, '.'
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .error ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
.next_step:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x2e
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jnz .st2 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov al, ' '
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
;!fixme <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> :(
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp cl, 3 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> GIDGIDIIASM <EFBFBD>.<EFBFBD>. gidgidii.asm
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jbe .st2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.st3:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov byte [si], al
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc si
|
|
|
|
|
dec cx
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp cx, 3
|
2010-10-01 11:21:55 +02:00
|
|
|
|
ja .st3
|
|
|
|
|
; inc cx
|
|
|
|
|
inc di
|
|
|
|
|
jmp @b
|
|
|
|
|
|
|
|
|
|
.st2:
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp al, 0x60
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jbe .st2_l
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor al, 0x20;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.st2_l:
|
|
|
|
|
mov byte [si], al
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc di
|
|
|
|
|
inc si
|
|
|
|
|
; dec cx
|
|
|
|
|
; jnz @b
|
|
|
|
|
loop @b
|
2012-03-08 09:33:38 +01:00
|
|
|
|
.st5:
|
|
|
|
|
xor ax, ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp @f
|
|
|
|
|
|
|
|
|
|
;;;;;;;;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
.st4_s:
|
|
|
|
|
mov al, ' '
|
|
|
|
|
.st4:
|
|
|
|
|
mov byte [si], al
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc si
|
|
|
|
|
loop .st4
|
|
|
|
|
jmp .st5
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
.error:
|
|
|
|
|
or ax, -1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pushad
|
2012-03-08 09:33:38 +01:00
|
|
|
|
|
|
|
|
|
mov si, convertion_file_name_msg_y
|
|
|
|
|
test ax, ax
|
|
|
|
|
jz @f
|
|
|
|
|
mov si, convertion_file_name_msg_n
|
|
|
|
|
@@:
|
|
|
|
|
call printplain
|
|
|
|
|
|
|
|
|
|
mov si, shot_name_fat
|
|
|
|
|
mov byte [si+12], 0
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
popad
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro move_file_up
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
{
|
|
|
|
|
local .st1
|
|
|
|
|
local .correct_on_byte
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BPB <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
|
|
|
|
;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, info_real_mode_size ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov si, table_15_87
|
|
|
|
|
mov word [si+8*2+2], ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1-<EFBFBD> <EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
movzx eax, firstDataSect
|
|
|
|
|
movzx edx, data_offset
|
|
|
|
|
add eax, edx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
movzx ebx, word [fat12_buffer.BPB_BytsPerSec]
|
|
|
|
|
movzx edx, byte [fat12_buffer.BPB_SecPerClus]
|
|
|
|
|
imul bx, dx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
push ebx ;save bx
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
imul eax, ebx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; shl eax,9 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 512
|
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pushad
|
2012-03-08 09:33:38 +01:00
|
|
|
|
xor eax, eax
|
|
|
|
|
mov ax, info_real_mode_size
|
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, seg_where_get_data
|
|
|
|
|
mov dword [di], ' '
|
|
|
|
|
mov word [di+4], ' '
|
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, seg_where_get_data
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
popad
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
; mov bx,word [fat12_buffer.BPB_BytsPerSec]
|
|
|
|
|
; movzx dx,byte [fat12_buffer.BPB_SecPerClus]
|
|
|
|
|
; imul bx,dx
|
|
|
|
|
; cwd
|
|
|
|
|
; idiv bx
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov dl, 0x10
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp eax, 0x00010000
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jb @f
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub eax, 0x00010000
|
2010-10-01 11:21:55 +02:00
|
|
|
|
inc dl
|
|
|
|
|
jmp @b
|
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
mov byte [si+8*3+3], dl ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov word [si+8*3+2], ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ecx, save_file_size ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
cmp ecx, 0x0000ffff ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. 64 <EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jbe .correct_on_byte ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ecx, 0x00010000 ;65536
|
|
|
|
|
sub save_file_size, ecx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-10-01 11:21:55 +02:00
|
|
|
|
; jmp .st1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<EFBFBD>8000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.correct_on_byte:
|
|
|
|
|
;/<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
pop eax ;restore size of claster
|
|
|
|
|
push ecx
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
inc data_offset
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
cmp eax, ecx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jae @f
|
2012-03-08 09:33:38 +01:00
|
|
|
|
sub ecx, eax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jmp @b
|
2012-03-08 09:33:38 +01:00
|
|
|
|
@@:
|
|
|
|
|
pop ecx
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test ecx, 0x1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .st1
|
|
|
|
|
inc ecx
|
2012-03-08 09:33:38 +01:00
|
|
|
|
.st1:
|
|
|
|
|
shr ecx, 1 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 0x87 function
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD>
|
|
|
|
|
push es
|
|
|
|
|
push ds
|
|
|
|
|
pop es
|
|
|
|
|
|
|
|
|
|
mov ah, 0x87
|
|
|
|
|
int 0x15
|
|
|
|
|
pop es
|
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pusha
|
|
|
|
|
; mov ax,point_next_fat_str
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, return_code_af_move
|
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, return_code_af_move
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
popa
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
macro move_up_fat_and_root_d
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
local .st1
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, info_real_mode_size
|
|
|
|
|
add ax, 0x1000
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, table_15_87
|
|
|
|
|
mov word [si+8*2+2], ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov ax, 512
|
|
|
|
|
mov word [si+8*3+2], ax
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;fixme! <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
movzx ecx, word [fat12_buffer.BPB_FATSz16]
|
|
|
|
|
movzx bx, byte [fat12_buffer.BPB_NumFATs]
|
|
|
|
|
imul cx, bx ;9x1=9
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
add cx, size_root_dir ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
shl ecx, 9 ;imul 512
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-03-08 09:33:38 +01:00
|
|
|
|
test ecx, 0x1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
jz .st1
|
|
|
|
|
inc ecx
|
2012-03-08 09:33:38 +01:00
|
|
|
|
.st1:
|
|
|
|
|
shr ecx, 1
|
2010-10-01 11:21:55 +02:00
|
|
|
|
|
|
|
|
|
push es
|
|
|
|
|
push ds
|
|
|
|
|
pop es
|
|
|
|
|
|
|
|
|
|
mov ah, 0x87
|
|
|
|
|
int 0x15
|
|
|
|
|
pop es
|
|
|
|
|
|
|
|
|
|
if DEBUG
|
|
|
|
|
pusha
|
|
|
|
|
; mov ax,point_next_fat_str
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov cx, 0x0a
|
|
|
|
|
mov di, return_code_af_fat_m
|
|
|
|
|
call decode
|
2010-10-01 11:21:55 +02:00
|
|
|
|
;Show size
|
2012-03-08 09:33:38 +01:00
|
|
|
|
mov si, return_code_af_fat_m
|
2010-10-01 11:21:55 +02:00
|
|
|
|
call printplain
|
|
|
|
|
popa
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
2012-03-08 09:33:38 +01:00
|
|
|
|
}
|