pull/3/head
E. Almqvist 4 years ago
parent 9b3095f56d
commit 4060b45e58
  1. 2
      compile.sh
  2. 20
      src/bootloader.asm
  3. 2
      src/elib/io.asm
  4. 9
      src/equ/ASCII.asm
  5. 0
      src/equ/BIOS.asm

@ -3,4 +3,4 @@
srcDir=src srcDir=src
binDir=bin binDir=bin
nasm -f bin $srcDir/bootloader.asm -o $binDir/bootloader.bin nasm -f bin $srcDir/bootloader.asm -i $srcDir -o $binDir/bootloader.bin

@ -1,4 +1,6 @@
%include "BIOS_equ.asm" %include "equ/BIOS.asm"
%include "equ/ASCII.asm"
mov ah, 0x0e ; enter teletype mode (BIOS) mov ah, 0x0e ; enter teletype mode (BIOS)
mov al, "e" mov al, "e"
@ -16,17 +18,21 @@ int BIOS_INT
; ALPHABET PRINT ; ALPHABET PRINT
mov al, 64 ; one less than A since we are printing in a loop and it increments before sys interupt mov al, 64 ; one less than A since we are printing in a loop and it increments before sys interupt
loop: loop:
; Print the alphabetic char
inc al ; move to next char inc al ; move to next char
int BIOS_INT ; bios interupt to print it int BIOS_INT ; bios interupt to print it
push al ; push al onto stack
mov al, 10 ; ASCII linebreak ;push al ; push al onto stack
int BIOS_INT
; Print a linebreak
;mov al, ASCII_LINEBREAK
;int BIOS_INT
pop al ; return to char ; Prepair for next iteration
;pop al ; return to char
cmp al, 91 ; 26 letters in english alphabet (65 + 26) cmp al, 90 ; 26 letters in english alphabet (64 + 26)
jl loop ; if al < 65+26: jmp loop jl loop ; if al < 64+26: jmp loop
jmp $ jmp $

@ -0,0 +1,2 @@
; eLibrary
; Input/Output sr

@ -0,0 +1,9 @@
; ASCII EQUs
ASCII_END equ 0
ASCII_BELL equ 7
ASCII_BACKSPACE equ 8
ASCII_HORIZONTAL_TAB equ 9
ASCII_VERTICAL_TAB equ 11
ASCII_LINEBREAK equ 10
ASCII_CARRIAGE_RETURN equ 13
ASCII_CLEAR equ 12
Loading…
Cancel
Save