mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2024-10-27 20:34:19 +00:00
Merge 025a4d5189
into ce8e050d24
This commit is contained in:
commit
288f5f6d29
@ -11,7 +11,9 @@ and think on a strategy.
|
||||
|
||||
Take a look at the new folder structure. Most of the files have been symlinked
|
||||
from previous lessons, so if we have to change them at some point, it will be
|
||||
a better idea to remove the symlink and create a new file.
|
||||
a better idea to remove the symlink and create a new file. Open `boot/bootsect.asm`
|
||||
and note that since our kernel will be larger, the number of sectors to read when
|
||||
loading it from disk has increased from `2` to `16`.
|
||||
|
||||
Furthermore, since from now on we will use mostly C to code, we'll take advantage of qemu's
|
||||
ability to open a connection to gdb. First, let's install a cross-compiled `gdb` since
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
; this is how constants are defined
|
||||
VIDEO_MEMORY equ 0xb8000
|
||||
WHITE_OB_BLACK equ 0x0f ; the color byte for each character
|
||||
WHITE_ON_BLACK equ 0x0f ; the color byte for each character
|
||||
|
||||
print_string_pm:
|
||||
pusha
|
||||
@ -10,7 +10,7 @@ print_string_pm:
|
||||
|
||||
print_string_pm_loop:
|
||||
mov al, [ebx] ; [ebx] is the address of our character
|
||||
mov ah, WHITE_OB_BLACK
|
||||
mov ah, WHITE_ON_BLACK
|
||||
|
||||
cmp al, 0 ; check if end of string
|
||||
je print_string_pm_done
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
; this is how constants are defined
|
||||
VIDEO_MEMORY equ 0xb8000
|
||||
WHITE_OB_BLACK equ 0x0f ; the color byte for each character
|
||||
WHITE_ON_BLACK equ 0x0f ; the color byte for each character
|
||||
|
||||
print_string_pm:
|
||||
pusha
|
||||
@ -10,7 +10,7 @@ print_string_pm:
|
||||
|
||||
print_string_pm_loop:
|
||||
mov al, [ebx] ; [ebx] is the address of our character
|
||||
mov ah, WHITE_OB_BLACK
|
||||
mov ah, WHITE_ON_BLACK
|
||||
|
||||
cmp al, 0 ; check if end of string
|
||||
je print_string_pm_done
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
; this is how constants are defined
|
||||
VIDEO_MEMORY equ 0xb8000
|
||||
WHITE_OB_BLACK equ 0x0f ; the color byte for each character
|
||||
WHITE_ON_BLACK equ 0x0f ; the color byte for each character
|
||||
|
||||
print_string_pm:
|
||||
pusha
|
||||
@ -10,7 +10,7 @@ print_string_pm:
|
||||
|
||||
print_string_pm_loop:
|
||||
mov al, [ebx] ; [ebx] is the address of our character
|
||||
mov ah, WHITE_OB_BLACK
|
||||
mov ah, WHITE_ON_BLACK
|
||||
|
||||
cmp al, 0 ; check if end of string
|
||||
je print_string_pm_done
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
; this is how constants are defined
|
||||
VIDEO_MEMORY equ 0xb8000
|
||||
WHITE_OB_BLACK equ 0x0f ; the color byte for each character
|
||||
WHITE_ON_BLACK equ 0x0f ; the color byte for each character
|
||||
|
||||
print_string_pm:
|
||||
pusha
|
||||
@ -10,7 +10,7 @@ print_string_pm:
|
||||
|
||||
print_string_pm_loop:
|
||||
mov al, [ebx] ; [ebx] is the address of our character
|
||||
mov ah, WHITE_OB_BLACK
|
||||
mov ah, WHITE_ON_BLACK
|
||||
|
||||
cmp al, 0 ; check if end of string
|
||||
je print_string_pm_done
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
; this is how constants are defined
|
||||
VIDEO_MEMORY equ 0xb8000
|
||||
WHITE_OB_BLACK equ 0x0f ; the color byte for each character
|
||||
WHITE_ON_BLACK equ 0x0f ; the color byte for each character
|
||||
|
||||
print_string_pm:
|
||||
pusha
|
||||
@ -10,7 +10,7 @@ print_string_pm:
|
||||
|
||||
print_string_pm_loop:
|
||||
mov al, [ebx] ; [ebx] is the address of our character
|
||||
mov ah, WHITE_OB_BLACK
|
||||
mov ah, WHITE_ON_BLACK
|
||||
|
||||
cmp al, 0 ; check if end of string
|
||||
je print_string_pm_done
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
; this is how constants are defined
|
||||
VIDEO_MEMORY equ 0xb8000
|
||||
WHITE_OB_BLACK equ 0x0f ; the color byte for each character
|
||||
WHITE_ON_BLACK equ 0x0f ; the color byte for each character
|
||||
|
||||
print_string_pm:
|
||||
pusha
|
||||
@ -10,7 +10,7 @@ print_string_pm:
|
||||
|
||||
print_string_pm_loop:
|
||||
mov al, [ebx] ; [ebx] is the address of our character
|
||||
mov ah, WHITE_OB_BLACK
|
||||
mov ah, WHITE_ON_BLACK
|
||||
|
||||
cmp al, 0 ; check if end of string
|
||||
je print_string_pm_done
|
||||
|
Loading…
Reference in New Issue
Block a user