DemoN/error.asm
2024-08-08 14:52:38 +03:00

87 lines
3.8 KiB
NASM
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;[]=========================================================================[]
;[] Обработка ошибок монитора-отладчика DemoN []
;[] v0.10 - последние изменения 27.08.2006 []
;[] []
;[] ErDss - определение ошибки DSS по ее коду []
;[]=========================================================================[]
;[]=========================================================================[]
;[] Ошибки DSS []
;[] Вход: A - код ошибки []
;[] Выход: A - код ошибки []
;[] HL - строка-описание ошибки []
;[]=========================================================================[]
PrErDss:
call ErDss
ld c,Dss.PChars ;вывести сообщение об ошибке
rst DssRst
ld hl,Str.DA ;перевод строки
ld c,Dss.PChars
rst DssRst
ret
ErDss:
.MaxError equ 0x26
cp .MaxError+1 ;максимальный код ошибки + 1
jr c,$+4
ld a,.MaxError
push af
add a,a
ld hl,.Tabl
ld d,0
ld e,a
add hl,de
ld a,(hl)
inc hl
ld h,(hl)
ld l,a
pop af
ret
.e01 DB "Invalid function",0
.e02 DB "Invalid drive number",0
.e03 DB "File not found",0
.e04 DB "Path not found",0
.e05 DB "Invalid handle",0
.e06 DB "Too many open files",0
.e07 DB "File already exists",0
.e08 DB "File read only",0
.e09 DB "Root overflow",0
.e0A DB "No free space",0
.e0B DB "Directory not empty",0
.e0C DB "Can't delete current directory",0
.e0D DB "Invalid media",0
.e0E DB "Unknown operation",0 ; (невозм. операция)
.e0F DB "Directory exist",0
.e10 DB "Invalid filename",0
.e11 DB "Invalid EXE-file",0
.e12 DB "Not supported EXE-file",0
.e13 DB "Access denied",0
.e14 DB "Not ready",0
.e15 DB "Seek error",0
.e16 DB "Sector not found",0
.e17 DB "CRC error",0
.e18 DB "Write protect",0
.e19 DB "Read error",0
.e1A DB "Write error",0
.e1B DB "Drive failure",0
.e1C DB "Extended error: 28",0
.e1D DB "Extended error: 29",0
.e1E DB "Not enough memory",0
.e1F DB "Invalid memory block",0
.e20 DB "Extended error: 32",0
.e21 DB "Extended error: 33",0
.e22 DB "Extended error: 34",0
.e23 DB "Too many files",0 ; (список файлов)
.e24 DB "Too many folders nested or many folders (>1024)",0
.e25 DB "User abort",0 ; (операция прервана пользователем)
.e26 DB "Unknown error: 38..255",0 ; 38
.Tabl dw .e01,.e02,.e03,.e04,.e05,.e06,.e07,.e08
dw .e09,.e0A,.e0B,.e0C,.e0D,.e0E,.e0F,.e10
dw .e11,.e12,.e13,.e14,.e15,.e16,.e17,.e18
dw .e19,.e1A,.e1B,.e1C,.e1D,.e1E,.e1F,.e20
dw .e21,.e22,.e23,.e24,.e25,.e26