diff options
| author | Michal Idziorek <m.i@gmx.at> | 2015-05-14 10:44:00 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2015-05-14 10:44:00 +0200 |
| commit | dc7bf2f47d6f97407e3b50ae0b8ab59fd51079e5 (patch) | |
| tree | 1ed444c804d9ff55e23a7a007275c3d5c649a455 /boot1/disk_load_16.asm | |
| parent | 7df4060ae807dd27f3ae0a11f243897f36053ba1 (diff) | |
moving unused files folder
Diffstat (limited to 'boot1/disk_load_16.asm')
| -rw-r--r-- | boot1/disk_load_16.asm | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/boot1/disk_load_16.asm b/boot1/disk_load_16.asm deleted file mode 100644 index 6d1e4b3..0000000 --- a/boot1/disk_load_16.asm +++ /dev/null @@ -1,103 +0,0 @@ -; -;disk_load_16 -; - -[bits 16] - -STR_LBA: - db "LBA Support Detected",0 - -STR_CHS: - db "No CHS Support!)",0 - -STR_ERROR: - db "Disk Read Error",0 - -STR_DONE: - db "Stage 2 Loaded",0 - -disk_load_16: - - pusha - - ; check if LBA is supported - mov ah,0x41 - mov bx,0x55aa - int 0x13 - jnc disk_load_lba - jmp disk_load_chs - -disk_load_lba: - - mov bx, STR_LBA - call print_string - call print_nextline - - mov dl,[BOOT_DRIVE] - xor ah,ah - mov ah,0x42 - - mov bx,0 - mov ds,bx - lea si,[lba_adr] - - int 0x13 - jnc disk_load_finish - jmp disk_load_error - -disk_load_chs: - - mov bx, STR_CHS - call print_string - call print_nextline - jmp $ - - mov bx,0 ;target es:bx - mov es,bx - mov bx,0x7e00 - - mov al,50 ;number of sectors to read - mov ah,0x02 ;BIOS read sector func - - mov cl,2 ; sector - mov ch,0 ; cylinder - - mov dl,[BOOT_DRIVE] - mov dh,0 ;head - - int 0x13 ;bios interrupt - - jnc disk_load_finish - -disk_load_error: - - call print_nextline - mov bx, STR_ERROR - call print_string - call print_nextline - jmp $ - -disk_load_finish: - - call print_nextline - mov bx, STR_DONE - call print_string - call print_nextline - - - popa - ret - - -;; here we hold the lba addr -lba_adr: - - dw 0x10 ; size of packet ( 16 byte) - dw 16 ; number of sectors to read - - ; target is 0x7e00 - dw 0x7e00 ; target addr. offset - dw 0x0000 ; target addr. sector - - dd 1 ; first sector to read - dd 0 |
