Skip to content

Commit

Permalink
variable name refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
firatkucuk committed Oct 17, 2018
1 parent d2467de commit b6a57ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions bootloader.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BITS 16
; CONSTANTS

%define BOOTLOADER_START_SEGMENT 0x07C0
%define KERNEL_START_SEGMENT 0x07E0
%define KERNEL_LOAD_SEGMENT 0x07E0



Expand Down Expand Up @@ -58,7 +58,7 @@ main:
mov ds, ax

; Let's read disk sectors into memory
mov ax, KERNEL_START_SEGMENT ; Kernel start segment
mov ax, KERNEL_LOAD_SEGMENT ; Kernel start segment
mov es, ax
mov bx, 0x0000 ; Offset
mov ah, 0x02 ; INT 13h / AH = 02h
Expand All @@ -71,7 +71,7 @@ main:

jc .error_message ; jump if clear flag set

jmp 0x2400
jmp 0x2400 ; Diff between A000 - 7C00

.error_message:
mov si, error_text ; Put string position into SI
Expand Down
12 changes: 6 additions & 6 deletions kernel.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@




; ------------------------------------------------------------------------------
main:
mov ax, KERNEL_START_SEGMENT ; Set data segment to where we're loaded
Expand All @@ -20,14 +19,15 @@ main:



print_string: ; Routine: output string in SI to screen
mov ah, 0Eh ; int 10h 'print char' function
; ------------------------------------------------------------------------------
print_string: ; Routine: output string in SI to screen
mov ah, 0Eh ; int 10h 'print char' function

.repeat:
lodsb ; Get character from string
lodsb ; Get character from string
cmp al, 0
je .done ; If char is zero, end of string
int 10h ; Otherwise, print it
je .done ; If char is zero, end of string
int 10h ; Otherwise, print it
jmp .repeat

.done:
Expand Down

0 comments on commit b6a57ee

Please sign in to comment.