diff --git a/2020301918-李懋良-试点班第2个报告.docx b/2020301918-李懋良-试点班第2个报告.docx new file mode 100644 index 0000000..f4261a1 Binary files /dev/null and b/2020301918-李懋良-试点班第2个报告.docx differ diff --git a/loader.asm b/loader.asm index 506bb40..005934d 100644 --- a/loader.asm +++ b/loader.asm @@ -222,23 +222,23 @@ FuncFindFile: mov word [RootDirSectorNow], SectorNoOfRootDirectory mov word [LeftRootDirSectors], RootDirSectors .FindLoaderInRootDir: - mov ax, [RootDirSectorNow]; ax <- 现在正在搜索的扇区号 + mov ax, [RootDirSectorNow] ; ax <- 现在正在搜索的扇区号 mov bx, OffsetOfSectorBuf ; es:bx = BaseOfSectorBuf:OffsetOfSectorBuf mov cx, 1 call ReadSector - mov si, [bp + 4] ; ds:si -> "LOADER BIN" + mov si, [bp + 4] ; ds:si mov di, OffsetOfSectorBuf ; es:di -> BaseOfSectorBuf:400h = BaseOfSectorBuf*10h+400h - mov dx, 10h ; 32(目录项大小) * 16(dx) = 512(BPB_BytsPerSec) + mov dx, 10h ; 32(目录项大小) * 16(dx) = 512(BPB_BytsPerSec) .CompareFilename: call StringCmp cmp ax, 1 - jz .LoaderFound ; ax == 1 -> 比对成了 + jz .LoaderFound ; ax == 1 -> 比对成了 dec dx cmp dx, 0 - jz .GotoNextRootDirSector ; 该扇区的所有目录项都探索完了,去探索下一个扇区 - add di, 20h ; 32 -> 目录项大小 + jz .GotoNextRootDirSector ; 该扇区的所有目录项都探索完了,去探索下一个扇区 + add di, 20h ; 32 -> 目录项大小 jmp .CompareFilename .GotoNextRootDirSector: