Some change. Modify a debug information.

git-svn-id: svn://kolibrios.org@1156 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Alexey Teplov ( 2009-09-10 14:48:32 +00:00
parent 178bc5ad6f
commit 03cd817d40
9 changed files with 2311 additions and 91 deletions

View File

@ -57,11 +57,17 @@ BPB_msg db ' -in byte, why we get data from move BPB struct',0
firstDataSect_msg db ' -first data sector, offset to data in sectors',0 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
check_name_fat_msg db ' -if -1 name is present, else 0 then not present name',0 first_entry_in_fat db ' -data segment in FIRST entry FAT',0
convertion_file_name_msg db ' -if -1, then destination name of file is bad',0 check_root_fat_ db ' : _______________',0
start_making_FAT12_msg db '>>>>>> Begin making fat12 FS on RAMDISK <<<<<<<',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
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
seg_where_get_data db ' - Segment where we get data for move up file',0
return_code_af_move db ' -return code after 0x87 int 0x15, move block',0 return_code_af_move db ' -return code after 0x87 int 0x15, move block',0
return_code_af_fat_m db ' -return code after 0x87 int 0x15, move fat struc',0 return_code_af_fat_m db ' -return code after 0x87 int 0x15, move fat struc',0

View File

@ -60,7 +60,7 @@ diskload db "Loading diskette: 00 %",8,8,8,8,0
pros db "00" pros db "00"
backspace2 db 8,8,0 backspace2 db 8,8,0
boot_dev db 0 ; 0=floppy, 1=hd boot_dev db 0 ; 0=floppy, 1=hd
start_msg db "Press [abcd] to change settings, press [Enter] to continue booting",13,10,0 start_msg db "Press [abc] to change settings, press [Enter] to continue booting",13,10,0
time_msg db " or wait " time_msg db " or wait "
time_str db " 5 seconds" time_str db " 5 seconds"
db " before automatical continuation",13,10,0 db " before automatical continuation",13,10,0

View File

@ -46,7 +46,7 @@ diskload db "
pros db "00" pros db "00"
backspace2 db 8,8,0 backspace2 db 8,8,0
boot_dev db 0 boot_dev db 0
start_msg db "<EFBFBD> ¦¬¨β¥ [abcd] ¤«ο ¨§¬¥­¥­¨ο ­ αβ஥<C2AE>, [Enter] ¤«ο ―த®«¦¥­¨ο § £ΰγ§<CEB3>¨",13,10,0 start_msg db "<EFBFBD> ¦¬¨β¥ [abc] ¤«ο ¨§¬¥­¥­¨ο ­ αβ஥<C2AE>, [Enter] ¤«ο ―த®«¦¥­¨ο § £ΰγ§<CEB3>¨",13,10,0
time_msg db " ¨«¨ ¯®¤®¦¤¨â¥ " time_msg db " ¨«¨ ¯®¤®¦¤¨â¥ "
time_str db " 5 ᥪ㭤 " time_str db " 5 ᥪ㭤 "
db " ¤®  ¢â®¬ â¨ç¥áª®£® ¯à®¤®«¦¥­¨ï",13,10,0 db " ¤®  ¢â®¬ â¨ç¥áª®£® ¯à®¤®«¦¥­¨ï",13,10,0

View File

@ -12,6 +12,8 @@
;; ;; ;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
include "lang.inc"
macro _setcursor row,column macro _setcursor row,column
{ {
mov dx, row*256 + column mov dx, row*256 + column

View File

@ -275,7 +275,7 @@ fat12_buffer:
.BS_VolLab db 'RAM DISK FS' ;11 символов .BS_VolLab db 'RAM DISK FS' ;11 символов
.BS_FilSysType db 'FAT12 ' ;8 символов .BS_FilSysType db 'FAT12 ' ;8 символов
;62 байта структура fat12. ;62 байта структура fat12.
db (512-($-fat12_buffer))dup(0x90)
@ -301,10 +301,13 @@ struc FAT_32_entry ;Byte Directory Entry Structure
;;; ;;;
;timer ;timer
shot_name_fat rb 11 ;временный буфер для fat12, в нем храняться имена файлов приведенные к правилам FAT /* вдальнейшем перенести в стэк shot_name_fat rb 11 ;временный буфер для fat12, в нем храняться имена файлов приведенные к правилам FAT /* вдальнейшем перенести в стэк
if DEBUG if DEBUG
rb 1 ;нужен для отладки и вывода имени файла после преобразования rb 1 ;нужен для отладки и вывода имени файла после преобразования
dest_name_fat rb 12 dest_name_fat db 24 dup('_');12
db 0x0
end if end if
value_timeout rw 1 ;value to timeout value_timeout rw 1 ;value to timeout
old_timer rd 1 ;старое значение вектора таймера old_timer rd 1 ;старое значение вектора таймера
start_timer rd 1 ;значение таймера start_timer rd 1 ;значение таймера

File diff suppressed because it is too large Load Diff

View File

@ -1088,8 +1088,7 @@ local .error
;ìû åå ìîäèôèöèðóåì äî òàêîãî ñîñòîÿíèÿ dw,dw,db'@menu',0 êîíå÷íî ñîõðàíèâ òå çíà÷åíèÿ êîòîðûå ìû çàìåíÿåì ;ìû åå ìîäèôèöèðóåì äî òàêîãî ñîñòîÿíèÿ dw,dw,db'@menu',0 êîíå÷íî ñîõðàíèâ òå çíà÷åíèÿ êîòîðûå ìû çàìåíÿåì
;ñîõðàíèëè ïåâûå 2 word ;ñîõðàíèëè ïåâûå 2 word
;//ïðîâåðêà íàëè÷èÿ òàêîãî æå èìåíè â ðóò äèð ;
@@: mov al,byte [es:di] @@: mov al,byte [es:di]
cmp al,',' ; ò.å. èùåì ðàçäåëèòåëü cmp al,',' ; ò.å. èùåì ðàçäåëèòåëü
jz .found_end_str jz .found_end_str
@ -1135,6 +1134,21 @@ check_name_file
mov di,point_to_dest_file_name mov di,point_to_dest_file_name
if DEBUG
pushad
; mov ax,di
mov cx,0x0a
mov di,name_of_seg_get_64
mov dword[ds:di],' '
mov word[ds:di+4],' '
call decode
;Show size
mov si,name_of_seg_get_64
call printplain
popad
end if
push word [es:di] push word [es:di]
push cx push cx
xor ax,ax xor ax,ax
@ -1184,7 +1198,7 @@ check_name_file
if DEBUG if DEBUG
pusha pushad
mov cx,0x0a mov cx,0x0a
mov di,RamdiskFile_msg mov di,RamdiskFile_msg
mov dword[ds:di],' ' mov dword[ds:di],' '
@ -1193,7 +1207,7 @@ if DEBUG
mov si,RamdiskFile_msg mov si,RamdiskFile_msg
call printplain call printplain
popa popad
end if end if
@ -1274,8 +1288,8 @@ move_up_fat_and_root_d
} }
macro use_BPB_RAM macro use_BPB_RAM ;çàêèíóòü ñàìûå ïåðâûå 512 áàéò çà 1-é ìá
;äàííûé ìàêðîñ çàêèäûâàåò BPB ñòðóêòóðó, ïîêà òîëüêî ôàò12 çà 1 ìá ;äàííûé ìàêðîñ çàêèäûâàåò BPB ñòðóêòóðó ò.å. ïåðâûå 512 áàéò, ïîêà òîëüêî ôàò12 çà 1 ìá
{ {
mov ax,fat12_buffer mov ax,fat12_buffer
mov si,table_15_87 mov si,table_15_87
@ -1283,7 +1297,7 @@ macro use_BPB_RAM
push es push es
push ds push ds
pop es pop es
mov cx,31 ;ôàò12 óêëàäûâàåòñÿ â 62 áàéòà 62/2=31 mov cx,256 ;áóò ñåêòîð óêëàäûâàåòñÿ â 512 áàéò 512/2=256
mov ah, 0x87 mov ah, 0x87
int 0x15 int 0x15
pop es pop es
@ -1315,12 +1329,35 @@ macro first_create_fat_table
mov di,info_real_mode_size mov di,info_real_mode_size
add di,0x1000 add di,0x1000
if DEBUG
pushad
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
;Show size
mov si,first_entry_in_fat
call printplain
xor ax,ax
int 0x16
popad
end if
push di ; push word info_real_mode_size+0x1000 ;cëåäóþùèé ñåãìåíò çà çàãðóæåííûì ó÷àñòêîì push di ; push word info_real_mode_size+0x1000 ;cëåäóþùèé ñåãìåíò çà çàãðóæåííûì ó÷àñòêîì
xor di,di xor di,di
mov point_to_free_root,di ;çíà÷åíèå ñìåùåíèÿ =0 â êîðíåâîé ôàò òàáëèöå îïèñàíèÿ mov point_to_free_root,di ;çíà÷åíèå ñìåùåíèÿ =0 â êîðíåâîé ôàò òàáëèöå îïèñàíèÿ
pop ds ; çàãðóæåí ñëåäóþùèé ñåãìåíò ò.å. ïóñòîé ñåãìåíò pop ds ; çàãðóæåí ñëåäóþùèé ñåãìåíò ò.å. ïóñòîé ñåãìåíò
mov byte [di],al mov byte [di],al
@ -1328,8 +1365,6 @@ macro first_create_fat_table
inc di inc di
mov word [di],ax mov word [di],ax
pop ds pop ds
mov point_next_fat_str,3 mov point_next_fat_str,3
@ -1371,6 +1406,26 @@ local .eof_file
shl di,9 ;imul 512 shl di,9 ;imul 512
add di,point_to_free_root ;ñìåùåíèå â óæå çàïèñàííûõ 32-õ ñòðóêòóðàõ. add di,point_to_free_root ;ñìåùåíèå â óæå çàïèñàííûõ 32-õ ñòðóêòóðàõ.
;íåîáõîäèìî âíåñòè çíà÷åíèå â ðóò äèð ò.å. 32 áàéòà ;íåîáõîäèìî âíåñòè çíà÷åíèå â ðóò äèð ò.å. 32 áàéòà
if DEBUG
pushad
; mov ax,point_default
; mov ax,
mov cx,0x0a
mov di,show_db2
mov dword[ds:di],' '
mov word [ds:di+4],' '
call decode
;Show size
mov si,show_db2
call printplain
;
; xor ax,ax
; int 0x16
popad
end if
;gs:di - óêàçàòåëü äëÿ âíåñåíèÿ èíôîðàöèè â ðóò îáëàñòü ôàò òàáëèöû èíîðìàöèè î ôàéëå. ;gs:di - óêàçàòåëü äëÿ âíåñåíèÿ èíôîðàöèè â ðóò îáëàñòü ôàò òàáëèöû èíîðìàöèè î ôàéëå.
mov si,shot_name_fat mov si,shot_name_fat
mov cx,11 mov cx,11
@ -1412,7 +1467,7 @@ local .eof_file
push di push di
;DIR_FstClusLO Ìëàäøåå ñëîâî íîìåðà ïåðâîãî êëàñòåðà. ;DIR_FstClusLO Ìëàäøåå ñëîâî íîìåðà ïåðâîãî êëàñòåðà.
; mov ax,point_next_fat_str ;çàãðóçèì óêàçàòåëü íà ýëåìåíò ôàò òàáëèöû ò.å. ýòî íîìåð ôàò çàïèñè ; mov ax,point_next_fat_str ;çàãðóçèì óêàçàòåëü íà ýëåìåíò ôàò òàáëèöû ò.å. ýòî íîìåð ôàò çàïèñè
;FATOffset = N + (N / 2) ò.å. ýòî óæå ó íàñ ñìåùåíèå ìû çíàåì ÷òî -íà÷èíàåòñÿ âñå ñ 3-ãî ýëåìåíòà çàïèñè ôàò ;FATOffset = N + (N / 2) ò.å. ýòî óæå ó íàñ ñìåùåíèå ìû çíàåì ÷òî -íà÷èíàåòñÿ âñå ñ 3-ãî ýëåìåíòà çàïèñè ôàò
mov bx,ax mov bx,ax
shr bx,1 shr bx,1
@ -1488,8 +1543,11 @@ if DEBUG
shl di,9 ;imul 512 shl di,9 ;imul 512
add di,point_to_free_root ;ñìåùåíèå â óæå çàïèñàííûõ 32-õ ñòðóêòóðàõ. add di,point_to_free_root ;ñìåùåíèå â óæå çàïèñàííûõ 32-õ ñòðóêòóðàõ.
push di
mov si,dest_name_fat mov si,dest_name_fat
mov cx,11 mov cx,11
;çàïèøåì â ñòðóêòóðó èìÿ ;çàïèøåì â ñòðóêòóðó èìÿ
@@: mov al,byte [es:di] @@: mov al,byte [es:di]
inc di inc di
@ -1497,8 +1555,12 @@ if DEBUG
inc si inc si
loop @b loop @b
xor ax,ax mov di,si
mov byte [si],al inc di
pop ax
mov cx,0xa
call decode
mov si,dest_name_fat mov si,dest_name_fat
call printplain call printplain
popad popad
@ -1593,9 +1655,10 @@ macro check_name_file
{ {
local .no_equal local .no_equal
local .exit local .exit
local .loop_size_root_dir
;âû÷èñëèì äëèííó ñòðî÷êè èìåíè íàçíà÷åíèÿ, êîòîðóþ áóäåì ñðàâíèâàòü ñ óæå çàïèñàííûìè äàííûìè. ;âû÷èñëèì äëèííó ñòðî÷êè èìåíè íàçíà÷åíèÿ, êîòîðóþ áóäåì ñðàâíèâàòü ñ óæå çàïèñàííûìè äàííûìè.
;ïðåîáðàçóåì â àíàëîã ôàò çàïèñè ñòî÷êó ñ èìåíåì íàçíà÷åíèÿ ;ïðåîáðàçóåì â àíàëîã ôàò çàïèñè ñòî÷êó ñ èìåíåì íàçíà÷åíèÿ
convertion_file_name convertion_file_name ; ïðåîáðàçîâàëè èìÿ ïî íóæíûì ïðàâèëàì
test ax,ax test ax,ax
jnz .exit jnz .exit
@ -1605,47 +1668,60 @@ local .exit
mov di,firstDataSect mov di,firstDataSect
sub di,size_root_dir sub di,size_root_dir
;òåïåðü â ax ðàçìåð â ñåêòîðàõ íà÷àëà ðóò äèð ;òåïåðü â ax ðàçìåð â ñåêòîðàõ íà÷àëà ðóò äèð
shl di,9 ;imul 512 shl di,9 ;imul 512
;di= Ýòî ñìåùåíèå îò íà÷àëà áóôåðà äî ðóò äèðåêòîðèè. â ïðåäåëàõ 64 êá.
;di= Ýòî ñìåùåíèå îò íà÷àëà áóôåðà äî ðóò äèðåêòîðèè.
;çàãðóçèì çíà÷åíèå - ò.å. êîë-âî ýëåìåíòîâ, êîòîðûå ìû ìîæåì ïðîñìàòðèâàòü. ;çàãðóçèì çíà÷åíèå - ò.å. êîë-âî ýëåìåíòîâ, êîòîðûå ìû ìîæåì ïðîñìàòðèâàòü.
mov dx,root_dir_entry_count mov dx,root_dir_entry_count
; mov si,point_to_dest_file_name 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
mov gs,ax mov gs,ax
.loop_size_root_dir:
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
;Show size
; mov si,check_root_fat_
; call printplain
; xor ax,ax
; int 0x16
; popad
end if
xor bx,bx
mov cx,11 ;size of name in struct FAT mov cx,11 ;size of name in struct FAT
@@: @@:
mov al,byte [ds:si+bx] mov al,byte [es:si+bx]
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
if DEBUG
pushad
mov cx,11
;input cx=size al=char áóäåò âûâåäåí ñèìâîë ñêîëüêî ðàç óêàçàíî â cx
@@:
mov al,byte [gs:di]
inc di
call putchar
loop @b
xor ax,ax
int 0x16
popad
end if
inc bx inc bx
cmp ah,al cmp ah,al
@ -1654,6 +1730,7 @@ end if
; dec cx ; dec cx
; jnz @b ; jnz @b
loop @b loop @b
;.succesfuly: ;.succesfuly:
;ïå÷àëüíî, òàêîå èìÿ óæå èìååòñÿ :( ;ïå÷àëüíî, òàêîå èìÿ óæå èìååòñÿ :(
or ax,-1 or ax,-1
@ -1661,11 +1738,9 @@ end if
.no_equal: .no_equal:
mov cx,11;save_cx_check_name
xor bx,bx
add di,32 ;fat struct =32 byte add di,32 ;fat struct =32 byte
dec dx dec dx
jnz @b jnz .loop_size_root_dir
;.exit_check_name: ;.exit_check_name:
and ax,0 and ax,0
@ -1673,17 +1748,14 @@ end if
.exit: .exit:
if DEBUG if DEBUG
pusha pushad
; movzx eax,ax;point_next_fat_str
mov cx,0x0a
mov di,check_name_fat_msg
mov dword [di],' '
mov word [di+4],' '
call decode
;Show size ;Show size
mov si,check_name_fat_msg mov si,check_name_fat_msg_n
call printplain test ax,ax
popa jz @f
mov si,check_name_fat_msg_y
@@: call printplain
popad
end if end if
} }
@ -1809,19 +1881,18 @@ local .st5
@@: @@:
if DEBUG if DEBUG
pusha pushad
; mov ax,point_next_fat_str
mov cx,0x0a mov si,convertion_file_name_msg_y
mov di,convertion_file_name_msg test ax,ax
call decode jz @f
;Show size mov si,convertion_file_name_msg_n
mov si,convertion_file_name_msg @@: call printplain
call printplain
mov si,shot_name_fat mov si,shot_name_fat
mov byte [si+12],0 mov byte [si+12],0
call printplain call printplain
popa popad
end if end if
} }
@ -1855,15 +1926,18 @@ local .correct_on_byte
; shl eax,9 ;óìíîæèì íà 512 ; shl eax,9 ;óìíîæèì íà 512
if DEBUG if DEBUG
pusha pushad
; mov eax,ebx;point_next_fat_str xor eax,eax
mov ax,info_real_mode_size
mov cx,0x0a mov cx,0x0a
mov di,show_db1 mov di,seg_where_get_data
mov dword [di],' '
mov word [di+4],' '
call decode call decode
;Show size ;Show size
mov si,show_db1 mov si,seg_where_get_data
call printplain call printplain
popa popad
end if end if

View File

@ -87,7 +87,7 @@ size_root_dir equ word [bp-80] ;
firstDataSect equ word [bp-82] ;первый сектор данных в сеторах от 0 firstDataSect equ word [bp-82] ;первый сектор данных в сеторах от 0
DataClasters equ word [bp-84] ;размер массива доступной для записи данных в кластерах. DataClasters equ word [bp-84] ;размер массива доступной для записи данных в кластерах.
point_to_free_root equ word [bp-86] ;указатель на следующий пустую запись в рут дир point_to_free_root equ word [bp-86] ;указатель на следующий пустую запись в рут дир
point_to_dest_file_name equ word [bp-88] ;указывает на начало имени файла назначения. point_to_dest_file_name equ word [bp-88] ;óêàçûâàåò íà íà÷àëî èìåíè ôàéëà íàçíà÷åíèÿ. â ôîðìàòå es:point_to_dest_file_name, ãäå es =0x2000
data_offset equ word [bp-90] ;смещение в кластерах для записанных данных т.е перекинутых за 1-й мб data_offset equ word [bp-90] ;смещение в кластерах для записанных данных т.е перекинутых за 1-й мб
first_input equ word [bp-92] ;поле для флагов в преобразовании имени. first_input equ word [bp-92] ;поле для флагов в преобразовании имени.
save_di_RAMDISK equ word [bp-94] ;сохраним di -указателя при обработке секции save_di_RAMDISK equ word [bp-94] ;сохраним di -указателя при обработке секции

View File

@ -60,7 +60,7 @@ RamdiskFile=kord/filema~1/kfar,"File Managers/kfar"
[kolibri_EE] [kolibri_EE]
name="KOLIBRY EXCLUSIVE EDITION" name="KOLIBRY EXCLUSIVE EDITION"
descript="KOLIBRY EXCLUSIVE EDITION BEST OF THE BEST opetation system" descript="KOLIBRY EXCLUSIVE EDITION BEST OF THE BEST opetation system"
LoaderModule=kord/kolibri.ldm LoaderModule=kolibri/kolibri.ldm
RamdiskFS=FAT RamdiskFS=FAT
RamdiskSector=512 RamdiskSector=512
RamdiskCluster=1 RamdiskCluster=1
@ -69,19 +69,7 @@ LoaderRamImage=kolibri.img
RamdiskPATH=/kolibri/ RamdiskPATH=/kolibri/
RamdiskFile=@menu,@menu RamdiskFile=@menu,@menu
RamdiskFile=@PANEL,@PANEL RamdiskFile=@PANEL,@PANEL
RamdiskFile=@RB,@RB RamdiskFile=@RB,@PANEL
RamdiskFile=@rcher,@rcher
RamdiskFile=@ss,@ss
RamdiskFile=ac97snd,ac97snd
RamdiskFile=animage,animage
RamdiskFile=AUTOEXEC.CMD,AUTOEXEC.CMD
RamdiskFile=AUTORUN.DAT,AUTORUN.DAT
RamdiskFile=calc,calc
RamdiskFile=calendar,calendar
RamdiskFile=progs/cdp,cdp
RamdiskFile=cmd,cmd
RamdiskFile=config.inc,config.inc
RamdiskFile=copy2,copy2
[legacy_kolibri] [legacy_kolibri]
name="KolibriOS" name="KolibriOS"