Reorganise the repo a bit.
This commit is contained in:
parent
e791c67665
commit
d0a5441a62
13
make.sh
13
make.sh
|
@ -1,14 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ! -d "build" ];
|
||||
then
|
||||
mkdir build
|
||||
fi
|
||||
cd source/
|
||||
nasm boot.asm -f bin -O0 -o ../boot.bin
|
||||
nasm system.asm -f bin -O0 -o ../system.bin
|
||||
|
||||
cd src/
|
||||
nasm boot.asm -f bin -O0 -o ../build/boot.bin
|
||||
nasm system.asm -f bin -O0 -o ../build/system.bin
|
||||
|
||||
cd ../build/
|
||||
cd ..
|
||||
cat boot.bin system.bin > EttinOS.img
|
||||
rm boot.bin system.bin
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[ORG 0x7c00]
|
||||
jmp 0:start
|
||||
jmp short start
|
||||
nop
|
||||
|
||||
;Disk description table
|
||||
|
@ -30,6 +30,7 @@ mov ds, ax
|
|||
|
||||
;Load the system
|
||||
;Set the source
|
||||
mov dl, 0x0
|
||||
mov dh, 0x0
|
||||
mov ch, 0x0
|
||||
mov cl, 0x2
|
|
@ -12,7 +12,7 @@ rep stosb
|
|||
sub di, [.length]
|
||||
|
||||
;Initialise the cursor pointer
|
||||
mov bl, 0x0
|
||||
mov bl, 0x1
|
||||
|
||||
;Initialise the last input line pointer
|
||||
mov ah, 0x3
|
||||
|
@ -38,9 +38,7 @@ cmp al, 0x8
|
|||
je .backspace
|
||||
|
||||
;Check for input end
|
||||
mov cl, bl
|
||||
inc cl
|
||||
cmp cl, [.length]
|
||||
cmp bl, [.length]
|
||||
je .loop
|
||||
|
||||
;Check for space
|
||||
|
@ -137,13 +135,12 @@ jmp .loop
|
|||
.return:
|
||||
|
||||
;Go to the end of the input
|
||||
mov bh, 0
|
||||
mov bh, 0x0
|
||||
sub di, bx
|
||||
add di, [.length]
|
||||
|
||||
.findtrailing:
|
||||
;Check for a trailing space
|
||||
dec di
|
||||
cmp byte [di], 0x20
|
||||
je .deltrailing
|
||||
jmp .done
|
||||
|
@ -152,7 +149,7 @@ jmp .done
|
|||
;Delete a trailing space
|
||||
mov al, 0x0
|
||||
stosb
|
||||
dec di
|
||||
sub di, 0x2
|
||||
jmp .findtrailing
|
||||
|
||||
.done:
|
Loading…
Reference in New Issue