Browse Source

Merge pull request #25 from Rhodez-x/second_stage

New placement of the system in mm
go32
Jørn Guldberg 7 years ago committed by GitHub
parent
commit
b2ca1b1e32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      bootloader.nasm
  2. 5
      kernel.nasm

6
bootloader.nasm

@ -50,7 +50,7 @@ start:
mov cl, 0x11 ;First sector to read (bits 0-5), upper bits of cylinder (bits 6-7) mov cl, 0x11 ;First sector to read (bits 0-5), upper bits of cylinder (bits 6-7)
mov dh, 0x0 ;Head number mov dh, 0x0 ;Head number
mov dl, [disk_identifier] ;0x0 ;Drive number mov dl, [disk_identifier] ;0x0 ;Drive number
mov bx, 0x7e00 ;Offset into section mov bx, 0x500 ;Offset into section
int 0x13 ;Low level disk services int 0x13 ;Low level disk services
;mov [0x7000], es ; saving retult of read ;mov [0x7000], es ; saving retult of read
; ;
@ -75,9 +75,9 @@ start:
; call dumpax ; call dumpax
mov dl, [disk_identifier] mov dl, [disk_identifier]
mov ax, 0x7e0 mov ax, 0x50
mov ds, ax mov ds, ax
jmp 0x7e0:0x00 jmp 0x50:0x00 ; 0x500
endcarrycheck: endcarrycheck:
cli ; Clear the Interrupt Flag (disable external interrupts) cli ; Clear the Interrupt Flag (disable external interrupts)

5
kernel.nasm

@ -6,7 +6,6 @@ start_sing:
; VSFS is loaded: ; VSFS is loaded:
mov [global_disk_identifier], dl ; saving disk_identifier, this is the number the disk that we are booting from. mov [global_disk_identifier], dl ; saving disk_identifier, this is the number the disk that we are booting from.
; This number is set by the bios ; This number is set by the bios
jmp sing_ready jmp sing_ready
%include "mem_lib/mem_lib.nasm" %include "mem_lib/mem_lib.nasm"
%include "lib/os_lib.nasm" %include "lib/os_lib.nasm"
@ -18,6 +17,10 @@ jmp sing_ready
%include "CLI/CLI.nasm" %include "CLI/CLI.nasm"
sing_ready: ; SingOS is ready for the user: sing_ready: ; SingOS is ready for the user:
mov ax, 0x8fc0
mov ss, ax ; Set 'ss' to this location (the beginning of our stack region)
mov sp, 0xffff ; Set 'ss:sp' to the top of our 8K stack
mov bp, sp
call os_clear_screen call os_clear_screen

Loading…
Cancel
Save