diff --git a/src/LOADF.INC b/src/LOADF.INC index 6d8b8d0..3136fd8 100644 --- a/src/LOADF.INC +++ b/src/LOADF.INC @@ -53,13 +53,10 @@ pop ax call .checkconv jmp .extloop -;Set the carry flag and print an error message if the file name is invalid +;Set the carry flag if the file name is invalid .error: pop ax stc -mov si, .errormsg -mov ah, 0x2 -int 0x21 jmp .done ;Find and load the file @@ -81,6 +78,8 @@ mov al, 0x1 ;Load mov ah, 0x2 int 0x13 +;Abort if the load failed +jc .done ;Store the disk values used for the rest of the call mov ax, word [buffer + 0xb] @@ -146,11 +145,8 @@ add di, ax pop cx loop .search -;Set the carry flag and print an error message if the file is not found +;Set the carry flag if the file is not found stc -mov si, .errormsg -mov ah, 0x2 -int 0x21 jmp .clearstack ;Load the file entry @@ -261,7 +257,6 @@ iret .sectorspertrack dw 0x0 .sides dw 0x0 .file times 0xb db 0x20 -.errormsg db "File not found", 0x0 .cluster dw 0x0 .pointer dw 0x0 diff --git a/src/SYSTEM.ASM b/src/SYSTEM.ASM index 8d8d215..6c0a1d1 100644 --- a/src/SYSTEM.ASM +++ b/src/SYSTEM.ASM @@ -77,7 +77,7 @@ mov ah, 0x0 int 0x21 ;Read mov di, input -mov al, 0x4e +mov al, 0x4c mov ah, 0x3 int 0x21 @@ -105,12 +105,6 @@ jmp 0x2000 ;Print a command error message and return to the shell cmderror: -mov bh, 0x0 -mov ah, 0x3 -int 0x10 -dec dh -mov ah, 0x2 -int 0x10 mov si, cmderrormsg mov ah, 0x2 int 0x21 @@ -169,7 +163,7 @@ welcomemsg db 0xd, 0xa, "Welcome to EttinOS!", 0xd, 0xa, 0x0 prompt db "> ", 0x0 driverrormsg db "Unknown drive", 0x0 cmderrormsg db "Unknown command", 0x0 -input times 0x4e db 0x0 +input times 0x4c db 0x0 crlf db 0xd, 0xa, 0x0 ;Set the drive letter