Compare commits

..

1 Commits

1 changed files with 12 additions and 14 deletions

View File

@ -86,12 +86,13 @@ int 0x21
cmp byte [input], 0x0
jz shell
;Check for a current drive change command
;Set SI at the command
;Set SI at input
mov si, input
;Ignore leading spaces
call ignoreleading
;Check
;Check for a current drive change command
cmp byte [si + 0x1], ":"
jne extract
cmp byte [si + 0x2], 0x0
@ -101,11 +102,8 @@ je changecurdrive
;Extract the specification of the program file
extract:
;Set SI at input and DI at program
mov si, input
;Set DI at program
mov di, program
;Ignore leading spaces
call ignoreleading
;Initialise program with spaces
mov cx, 0xe
mov al, 0x20
@ -155,6 +153,13 @@ call ignoreleading
;Execute the program
jmp 0x3000
;Print a command error message and return to the shell
cmderror:
mov si, cmderrormsg
mov ah, 0x2
int 0x21
jmp shell
;Change the current drive
;Get the BIOS equipment list
changecurdrive:
@ -189,17 +194,10 @@ mov [curdrive], dl
call setcurdriveletter
jmp shell
;Print a command error message and return to the shell
cmderror:
mov si, cmderrormsg
mov ah, 0x2
int 0x21
jmp shell
;Welcome message
welcomemsg db 0xd, 0xa, "Welcome to EttinOS!", 0xd, 0xa, 0x0
;Drive
;Drive stuff
curdrive db 0x0
driveletters db "AaBbCcDd"