Reorganise the repo a bit.

This commit is contained in:
CrazyEttin 2021-06-02 13:18:59 +03:00
parent e791c67665
commit d0a5441a62
13 changed files with 10 additions and 17 deletions

13
make.sh
View File

@ -1,14 +1,9 @@
#!/bin/bash #!/bin/bash
if [ ! -d "build" ]; cd source/
then nasm boot.asm -f bin -O0 -o ../boot.bin
mkdir build nasm system.asm -f bin -O0 -o ../system.bin
fi
cd src/ cd ..
nasm boot.asm -f bin -O0 -o ../build/boot.bin
nasm system.asm -f bin -O0 -o ../build/system.bin
cd ../build/
cat boot.bin system.bin > EttinOS.img cat boot.bin system.bin > EttinOS.img
rm boot.bin system.bin rm boot.bin system.bin

View File

@ -1,5 +1,5 @@
[ORG 0x7c00] [ORG 0x7c00]
jmp 0:start jmp short start
nop nop
;Disk description table ;Disk description table
@ -30,6 +30,7 @@ mov ds, ax
;Load the system ;Load the system
;Set the source ;Set the source
mov dl, 0x0
mov dh, 0x0 mov dh, 0x0
mov ch, 0x0 mov ch, 0x0
mov cl, 0x2 mov cl, 0x2

View File

@ -12,7 +12,7 @@ rep stosb
sub di, [.length] sub di, [.length]
;Initialise the cursor pointer ;Initialise the cursor pointer
mov bl, 0x0 mov bl, 0x1
;Initialise the last input line pointer ;Initialise the last input line pointer
mov ah, 0x3 mov ah, 0x3
@ -38,9 +38,7 @@ cmp al, 0x8
je .backspace je .backspace
;Check for input end ;Check for input end
mov cl, bl cmp bl, [.length]
inc cl
cmp cl, [.length]
je .loop je .loop
;Check for space ;Check for space
@ -137,13 +135,12 @@ jmp .loop
.return: .return:
;Go to the end of the input ;Go to the end of the input
mov bh, 0 mov bh, 0x0
sub di, bx sub di, bx
add di, [.length] add di, [.length]
.findtrailing: .findtrailing:
;Check for a trailing space ;Check for a trailing space
dec di
cmp byte [di], 0x20 cmp byte [di], 0x20
je .deltrailing je .deltrailing
jmp .done jmp .done
@ -152,7 +149,7 @@ jmp .done
;Delete a trailing space ;Delete a trailing space
mov al, 0x0 mov al, 0x0
stosb stosb
dec di sub di, 0x2
jmp .findtrailing jmp .findtrailing
.done: .done: