forked from KolibriOS/kolibrios
Bugfix and modify debug's messages.
git-svn-id: svn://kolibrios.org@1231 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
757117b379
commit
d6f5bafcc8
@ -1,4 +1,4 @@
|
|||||||
@fasm -m 65535 loader.asm loader
|
@fasm -m 65535 loader.asm loader
|
||||||
@echo off
|
@echo off
|
||||||
REM @fasm -m 65535 loader.asm loader > loader.lst
|
REM @fasm -m 65535 loader.asm loader > loader.lst
|
||||||
@pause
|
REM @pause
|
@ -58,12 +58,13 @@ firstDataSect_msg db ' -first data sector, offset to data in sectors',0
|
|||||||
size_root_dir_msg db ' -size root dir in sectrors',0
|
size_root_dir_msg db ' -size root dir in sectrors',0
|
||||||
DataClasters_msg db ' -size data in Clasters',0
|
DataClasters_msg db ' -size data in Clasters',0
|
||||||
first_entry_in_fat db ' -data segment in FIRST entry FAT',0
|
first_entry_in_fat db ' -data segment in FIRST entry FAT',0
|
||||||
check_root_fat_ db ' : _______________',0
|
check_root_fat_ db ' : --------------',0
|
||||||
check_name_fat_msg_y db 'Name is present that is BAD',0
|
check_name_fat_msg_y db 'Name is present that is BAD',0
|
||||||
check_name_fat_msg_n db 'Name is not present that is GOOD',0
|
check_name_fat_msg_n db 'Name is not present that is GOOD',0
|
||||||
name_of_seg_get_64 db ' -name of seg where we get 64 Kb of data',0
|
name_of_seg_get_64 db ' -name of seg where we get 64 Kb of data',0
|
||||||
convertion_file_name_msg_y db 'Destination name of file is GOOD',0
|
convertion_file_name_msg_y db '->Destination name of file is GOOD',0
|
||||||
convertion_file_name_msg_n db 'Destination name of file is BAD',0
|
convertion_file_name_msg_n db '->Destination name of file is BAD',0
|
||||||
|
alarm_msg db '%%%%%%%% WARNING: MISS THE FILE %%%%%%%%%%%',0
|
||||||
start_making_FAT12_msg db '>>>>>> Begin make a RAMDISK and FS after 1 Mb <<<<<<<',0
|
start_making_FAT12_msg db '>>>>>> Begin make a RAMDISK and FS after 1 Mb <<<<<<<',0
|
||||||
make_fat12_RFS_msg db '-Make FAT12 Ram FS',0
|
make_fat12_RFS_msg db '-Make FAT12 Ram FS',0
|
||||||
get_type_FS_msg db '-End make RamDisk',0
|
get_type_FS_msg db '-End make RamDisk',0
|
||||||
|
@ -1662,7 +1662,7 @@ local .loop_size_root_dir
|
|||||||
test ax,ax
|
test ax,ax
|
||||||
jnz .exit
|
jnz .exit
|
||||||
|
|
||||||
mov si,shot_name_fat
|
lea si,[shot_name_fat] ; desination name of file
|
||||||
|
|
||||||
;âû÷èñëèì óêàçàòåëü íà êîðíåâóþ äèðåêòîðèþ
|
;âû÷èñëèì óêàçàòåëü íà êîðíåâóþ äèðåêòîðèþ
|
||||||
mov di,firstDataSect
|
mov di,firstDataSect
|
||||||
@ -1672,7 +1672,6 @@ local .loop_size_root_dir
|
|||||||
;di= Ýòî ñìåùåíèå îò íà÷àëà áóôåðà äî ðóò äèðåêòîðèè. â ïðåäåëàõ 64 êá.
|
;di= Ýòî ñìåùåíèå îò íà÷àëà áóôåðà äî ðóò äèðåêòîðèè. â ïðåäåëàõ 64 êá.
|
||||||
;çàãðóçèì çíà÷åíèå - ò.å. êîë-âî ýëåìåíòîâ, êîòîðûå ìû ìîæåì ïðîñìàòðèâàòü.
|
;çàãðóçèì çíà÷åíèå - ò.å. êîë-âî ýëåìåíòîâ, êîòîðûå ìû ìîæåì ïðîñìàòðèâàòü.
|
||||||
mov dx,root_dir_entry_count
|
mov dx,root_dir_entry_count
|
||||||
mov si,point_to_dest_file_name
|
|
||||||
|
|
||||||
mov ax,info_real_mode_size
|
mov ax,info_real_mode_size
|
||||||
add ax,0x1000
|
add ax,0x1000
|
||||||
@ -1680,52 +1679,73 @@ local .loop_size_root_dir
|
|||||||
|
|
||||||
mov gs,ax
|
mov gs,ax
|
||||||
.loop_size_root_dir:
|
.loop_size_root_dir:
|
||||||
|
DEBUG1 equ 0
|
||||||
|
if DEBUG1
|
||||||
|
pushad
|
||||||
|
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
|
||||||
|
|
||||||
if DEBUG
|
|
||||||
; pushad
|
|
||||||
; push di
|
|
||||||
; mov eax,dword[gs:di]
|
|
||||||
; mov si,(check_root_fat_+14)
|
|
||||||
; mov dword [ds:si],'____'
|
|
||||||
; mov dword [ds:si+4],'____'
|
|
||||||
; mov dword[ds:si],eax
|
|
||||||
; mov eax,dword[gs:di+4]
|
|
||||||
; mov dword[ds:si+4],eax
|
|
||||||
;
|
;
|
||||||
;
|
xor eax,eax
|
||||||
; xor eax,eax
|
mov ax,gs;point_next_fat_str
|
||||||
; mov ax,gs;point_next_fat_str
|
mov cx,0x0a
|
||||||
; mov cx,0x0a
|
mov di,check_root_fat_
|
||||||
; mov di,check_root_fat_
|
mov dword [di],' '
|
||||||
; mov dword [di],' '
|
mov word [di+4],' '
|
||||||
; mov word [di+4],' '
|
call decode
|
||||||
; call decode
|
xor eax,eax
|
||||||
; xor eax,eax
|
pop ax
|
||||||
; pop ax
|
mov di,(check_root_fat_+7)
|
||||||
; mov di,(check_root_fat_+7)
|
mov dword [di],' '
|
||||||
; mov dword [di],' '
|
mov word [di+4],' '
|
||||||
; mov word [di+4],' '
|
call decode
|
||||||
; call decode
|
|
||||||
|
|
||||||
;Show size
|
;Show size
|
||||||
; mov si,check_root_fat_
|
lea si,[check_root_fat_]
|
||||||
; call printplain
|
call printplain
|
||||||
|
|
||||||
; xor ax,ax
|
lea si,[shot_name_fat]
|
||||||
; int 0x16
|
call printplain
|
||||||
; popad
|
|
||||||
|
xor ax,ax
|
||||||
|
int 0x16
|
||||||
|
popad
|
||||||
end if
|
end if
|
||||||
|
|
||||||
xor bx,bx
|
xor bx,bx
|
||||||
mov cx,11 ;size of name in struct FAT
|
mov cx,11 ;size of name in struct FAT
|
||||||
|
|
||||||
@@:
|
@@:
|
||||||
mov al,byte [es:si+bx]
|
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
|
mov ah,byte [gs:di+bx] ;gs:di - point to name in fat struct
|
||||||
inc bx
|
inc bx
|
||||||
|
|
||||||
cmp ah,al
|
if DEBUG
|
||||||
jnz .no_equal
|
; pushad
|
||||||
|
; lea si,[check_root_fat_+14]
|
||||||
|
; mov dword [ds:si],'----'
|
||||||
|
; mov word [ds:si],ax
|
||||||
|
; call printplain
|
||||||
|
|
||||||
|
; xor ax,ax
|
||||||
|
; int 0x16
|
||||||
|
|
||||||
|
; popad
|
||||||
|
end if
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cmp ah,al
|
||||||
|
jnz .no_equal
|
||||||
|
|
||||||
; dec cx
|
; dec cx
|
||||||
; jnz @b
|
; jnz @b
|
||||||
@ -1750,10 +1770,12 @@ end if
|
|||||||
if DEBUG
|
if DEBUG
|
||||||
pushad
|
pushad
|
||||||
;Show size
|
;Show size
|
||||||
mov si,check_name_fat_msg_n
|
lea si,[check_name_fat_msg_n]
|
||||||
test ax,ax
|
test ax,ax
|
||||||
jz @f
|
jz @f
|
||||||
mov si,check_name_fat_msg_y
|
lea si,[check_name_fat_msg_y]
|
||||||
|
call printplain
|
||||||
|
lea si,[alarm_msg]
|
||||||
@@: call printplain
|
@@: call printplain
|
||||||
popad
|
popad
|
||||||
end if
|
end if
|
||||||
|
@ -65,19 +65,19 @@ putchar:
|
|||||||
|
|
||||||
printplain:
|
printplain:
|
||||||
; in: si->string
|
; in: si->string
|
||||||
pusha
|
pushad
|
||||||
lodsb
|
lodsb
|
||||||
@@:
|
@@:
|
||||||
call putchar
|
call putchar
|
||||||
lodsb
|
lodsb
|
||||||
cmp al, 0
|
test al,al
|
||||||
jnz @b
|
jnz @b
|
||||||
mov al,13
|
mov al,13
|
||||||
call putchar
|
call putchar
|
||||||
|
|
||||||
mov al,10
|
mov al,10
|
||||||
call putchar
|
call putchar
|
||||||
popa
|
popad
|
||||||
ret
|
ret
|
||||||
getkey:
|
getkey:
|
||||||
; get number in range [bl,bh] (bl,bh in ['0'..'9'])
|
; get number in range [bl,bh] (bl,bh in ['0'..'9'])
|
||||||
|
Loading…
Reference in New Issue
Block a user