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
|
||||
@echo off
|
||||
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
|
||||
DataClasters_msg db ' -size data in Clasters',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_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
|
||||
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_y db '->Destination name of file is GOOD',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
|
||||
make_fat12_RFS_msg db '-Make FAT12 Ram FS',0
|
||||
get_type_FS_msg db '-End make RamDisk',0
|
||||
|
|
|
@ -1662,7 +1662,7 @@ local .loop_size_root_dir
|
|||
test ax,ax
|
||||
jnz .exit
|
||||
|
||||
mov si,shot_name_fat
|
||||
lea si,[shot_name_fat] ; desination name of file
|
||||
|
||||
;âû÷èñëèì óêàçàòåëü íà êîðíåâóþ äèðåêòîðèþ
|
||||
mov di,firstDataSect
|
||||
|
@ -1672,7 +1672,6 @@ local .loop_size_root_dir
|
|||
;di= Ýòî ñìåùåíèå îò íà÷àëà áóôåðà äî ðóò äèðåêòîðèè. â ïðåäåëàõ 64 êá.
|
||||
;çàãðóçèì çíà÷åíèå - ò.å. êîë-âî ýëåìåíòîâ, êîòîðûå ìû ìîæåì ïðîñìàòðèâàòü.
|
||||
mov dx,root_dir_entry_count
|
||||
mov si,point_to_dest_file_name
|
||||
|
||||
mov ax,info_real_mode_size
|
||||
add ax,0x1000
|
||||
|
@ -1680,50 +1679,71 @@ local .loop_size_root_dir
|
|||
|
||||
mov gs,ax
|
||||
.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
|
||||
; mov ax,gs;point_next_fat_str
|
||||
; mov cx,0x0a
|
||||
; mov di,check_root_fat_
|
||||
; mov dword [di],' '
|
||||
; mov word [di+4],' '
|
||||
; call decode
|
||||
; xor eax,eax
|
||||
; pop ax
|
||||
; mov di,(check_root_fat_+7)
|
||||
; mov dword [di],' '
|
||||
; mov word [di+4],' '
|
||||
; call decode
|
||||
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],' '
|
||||
call decode
|
||||
xor eax,eax
|
||||
pop ax
|
||||
mov di,(check_root_fat_+7)
|
||||
mov dword [di],' '
|
||||
mov word [di+4],' '
|
||||
call decode
|
||||
|
||||
;Show size
|
||||
; mov si,check_root_fat_
|
||||
; call printplain
|
||||
lea si,[check_root_fat_]
|
||||
call printplain
|
||||
|
||||
; xor ax,ax
|
||||
; int 0x16
|
||||
; popad
|
||||
lea si,[shot_name_fat]
|
||||
call printplain
|
||||
|
||||
xor ax,ax
|
||||
int 0x16
|
||||
popad
|
||||
end if
|
||||
|
||||
xor bx,bx
|
||||
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
|
||||
inc bx
|
||||
|
||||
if DEBUG
|
||||
; 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
|
||||
|
||||
|
@ -1750,10 +1770,12 @@ end if
|
|||
if DEBUG
|
||||
pushad
|
||||
;Show size
|
||||
mov si,check_name_fat_msg_n
|
||||
lea si,[check_name_fat_msg_n]
|
||||
test ax,ax
|
||||
jz @f
|
||||
mov si,check_name_fat_msg_y
|
||||
lea si,[check_name_fat_msg_y]
|
||||
call printplain
|
||||
lea si,[alarm_msg]
|
||||
@@: call printplain
|
||||
popad
|
||||
end if
|
||||
|
|
|
@ -65,19 +65,19 @@ putchar:
|
|||
|
||||
printplain:
|
||||
; in: si->string
|
||||
pusha
|
||||
pushad
|
||||
lodsb
|
||||
@@:
|
||||
call putchar
|
||||
lodsb
|
||||
cmp al, 0
|
||||
test al,al
|
||||
jnz @b
|
||||
mov al,13
|
||||
call putchar
|
||||
|
||||
mov al,10
|
||||
call putchar
|
||||
popa
|
||||
popad
|
||||
ret
|
||||
getkey:
|
||||
; get number in range [bl,bh] (bl,bh in ['0'..'9'])
|
||||
|
|
Loading…
Reference in New Issue