|
From: <ji...@us...> - 2002-08-28 20:02:21
|
Update of /cvsroot/subtrick/TiTan/src/boot
In directory usw-pr-cvs1:/tmp/cvs-serv2127
Modified Files:
sloader.asm
Log Message:
Fixed the 1 sec bug
Index: sloader.asm
===================================================================
RCS file: /cvsroot/subtrick/TiTan/src/boot/sloader.asm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sloader.asm 25 Aug 2002 15:44:57 -0000 1.3
--- sloader.asm 28 Aug 2002 20:02:18 -0000 1.4
***************
*** 17,30 ****
; Data used in boot up
;_______________________________________________________________________
! m_crlf db 10, 13, '$' ; Carrige Return Line Feed
! twodots db ":",'$'
msg db " Starting Second stage loader ",'$'
! loading db " Loading Kernel init. # of sector(s) = ", '$'
! loaded db " Kernel init loaded @ ",'$'
goto db " Jumping To Kernel Init.", '$'
fdrive db " Booting from Floppy Drive.",'$'
! hdrive db " Booting from Hard Drive.",'$'
m_reboot db " System is Going Down.",10,13, " Hit any Key...",'$'
! derror db " Disk Error # ",'$'
drive db 0 ; What drive did we boot from
--- 17,30 ----
; Data used in boot up
;_______________________________________________________________________
! m_crlf db 10, 13, '$' ; Carrige Return Line Feed
! twodots db ":",'$'
msg db " Starting Second stage loader ",'$'
! loading db " Loading Kernel init. # of sector(s) = ", '$'
! loaded db " Kernel init loaded @ ",'$'
goto db " Jumping To Kernel Init.", '$'
fdrive db " Booting from Floppy Drive.",'$'
! hdrive db " Booting from Hard Drive.",'$'
m_reboot db " System is Going Down.",10,13, " Hit any Key...",'$'
! derror db " Disk Error # ",'$'
drive db 0 ; What drive did we boot from
***************
*** 36,44 ****
mov ss, ax ; Setup stack segment
sti ; Restor Int
! mov sp, S_STACK_PTR ; Setup stack pointer
mov [drive], dl ; Save the drive we booted from
! mov si, msg ; Prints msg
call Print
call Crlf
--- 36,49 ----
mov ss, ax ; Setup stack segment
sti ; Restor Int
! mov sp, S_STACK_PTR ; Setup stack pointer
mov [drive], dl ; Save the drive we booted from
+
+ ; Set video mode
+ mov ah,00h
+ mov al,10h
+ int 0x10
! mov si, msg ; Prints msg
call Print
call Crlf
***************
*** 50,58 ****
cmp dl, 0
jne Hard_Drive
! mov si, fdrive ; Prints fdrive
jmp Printdisk
Hard_Drive:
! mov si, hdrive ; Prints hdrive
Printdisk:
--- 55,63 ----
cmp dl, 0
jne Hard_Drive
! mov si, fdrive ; Prints fdrive
jmp Printdisk
Hard_Drive:
! mov si, hdrive ; Prints hdrive
Printdisk:
***************
*** 68,76 ****
Disk_Err:
! mov si, derror ; Prints error
call Print
! mov al, ah ; Swap reg
xor ah, ah
! call Print_Num ; Print whatis in ax which is the err number
jmp Reboot
--- 73,81 ----
Disk_Err:
! mov si, derror ; Prints error
call Print
! mov al, ah ; Swap reg
xor ah, ah
! call Print_Num ; Print whatis in ax which is the err number
jmp Reboot
***************
*** 86,95 ****
mov bx, OFF_KINIT
! mov ah, 02h ; Read
! mov al, 1;SEC ; Number of sectors Sec to read
! mov dl, [drive] ; Drive to read from
mov ch, PAR_CYL
! mov cl, PAR_SEC
mov dh, PAR_HEAD
int 13h
--- 91,100 ----
mov bx, OFF_KINIT
! mov ah, 02h ; Read
! mov al, SEC ; Number of sectors Sec to read
! mov dl, [drive] ; Drive to read from
mov ch, PAR_CYL
! mov cl, PAR_SEC
mov dh, PAR_HEAD
int 13h
***************
*** 97,101 ****
jc Disk_Err
! mov si, loaded ; Prints info
call Print
mov ax, SEG_KINIT
--- 102,106 ----
jc Disk_Err
! mov si, loaded ; Prints info
call Print
mov ax, SEG_KINIT
***************
*** 111,115 ****
call Crlf
! jmp SEG_KINIT:OFF_KINIT ; Jump to loaded code
Reboot:
--- 116,120 ----
call Crlf
! jmp SEG_KINIT:OFF_KINIT ; Jump to loaded code
Reboot:
***************
*** 136,143 ****
mov ah, 0Eh
xor bh, bh
! mov bl, 14h
Print_rep:
! lodsb ; al = DS:[SI]
! cmp al,'$' ; if $ exit
je Print_ret
int 10h
--- 141,148 ----
mov ah, 0Eh
xor bh, bh
! mov bl, 7
Print_rep:
! lodsb ; al = DS:[SI]
! cmp al,'$' ; if $ exit
je Print_ret
int 10h
***************
*** 170,177 ****
Under_9:
push dx
! cmp ax, 0 ;revalate this statment
jnz Loop_Div
xor bx, bx
Print_Char:
pop ax
--- 175,183 ----
Under_9:
push dx
! cmp ax, 0 ;revalate this statment
jnz Loop_Div
xor bx, bx
+ mov bl, 02
Print_Char:
pop ax
***************
*** 188,192 ****
; Boot loader Requerments
;_______________________________________________________________________
! times 510-($-$$) db 0 ; padding
! dw 0xAA55 ; Sig for boot loader
--- 194,198 ----
; Boot loader Requerments
;_______________________________________________________________________
! times 510-($-$$) db 0 ; padding
! dw 0xAA55 ; Sig for boot loader
|