A2osX/SYS/KERNEL.S.ERRORX.txt

156 lines
3.1 KiB
Plaintext
Raw Normal View History

2020-05-17 17:34:32 +00:00
NEW
AUTO 3,1
*--------------------------------------
ERRORX.GetErrorMessage
ldx #ERRORX.Messages
stx ZPPtr1
ldx /ERRORX.Messages
stx ZPPtr1+1
ldx #0
pha
.1 pla
cmp ERRORX.Codes,x
beq .4
pha
ldy #0
.2 iny
lda (ZPPtr1),y
bpl .2
tya
sec
adc ZPPtr1
sta ZPPtr1
bcc .3
inc ZPPtr1+1
.3 inx
cpx #ERRORX.Count
bne .1
pla
.4 ldy #$ff
sta CLRWRITEAUX
.5 iny
lda (ZPPtr1),y
pha
and #$7F
sta (ZPPtr2),y
pla
bpl .5
iny
lda #0
sta (ZPPtr2),y
clc
rts
2020-12-23 14:54:57 +00:00
*-------------------------------------- MLI
2020-07-30 11:14:37 +00:00
ERRORX.Codes .DA #MLI.E.BADCALL
.DA #MLI.E.IO
2020-05-17 17:34:32 +00:00
.DA #MLI.E.NODEV
.DA #MLI.E.WRTPROT
.DA #MLI.E.DSKSWIT
.DA #MLI.E.OFFLINE
.DA #MLI.E.INVPATH
.DA #MLI.E.PNOTFND
.DA #MLI.E.VNOTFND
.DA #MLI.E.FNOTFND
.DA #MLI.E.DUPFILE
.DA #MLI.E.VOLFULL
.DA #MLI.E.DIRFULL
.DA #MLI.E.UNSUPST
.DA #MLI.E.EOF
.DA #MLI.E.LOCKED
.DA #MLI.E.OPEN
2020-05-21 12:55:49 +00:00
.DA #MLI.E.BADBUF
2020-12-23 14:54:57 +00:00
*-------------------------------------- KERNEL
2020-05-17 17:34:32 +00:00
.DA #E.OOM
.DA #E.OOH
.DA #E.INVH
.DA #E.BUF
.DA #E.BADPATH
.DA #E.BADARG
.DA #E.NSP
.DA #E.SYN
.DA #E.ENVF
.DA #E.IBIN
.DA #E.FTB
2020-11-29 13:16:39 +00:00
.DA #E.INUM
2020-05-17 17:34:32 +00:00
.DA #3 Ctrl-C
2020-12-23 14:54:57 +00:00
*-------------------------------------- PARSER
2020-05-17 17:34:32 +00:00
.DA #E.CSYN
.DA #E.ESYN
.DA #E.STACKERROR
.DA #E.STKOVERFLOW
.DA #E.NOWHILE
.DA #E.NOFOR
.DA #E.NOIF
.DA #E.BADFTYPE
.DA #E.FUNDEF
.DA #E.UNEXPEOF
2020-12-23 14:54:57 +00:00
.DA #E.NODO
2020-05-17 17:34:32 +00:00
*--------------------------------------
ERRORX.Count .EQ *-ERRORX.Codes
*--------------------------------------
2020-07-30 11:14:37 +00:00
ERRORX.Messages .AT "Bad MLI Call"
.AT "I/O Error"
2020-05-17 17:34:32 +00:00
.AT "No Device"
.AT "Disk Write-Prot."
.AT "Disk Switched"
.AT "Offline Device"
.AT "Invalid Path"
.AT "Path Not Found"
.AT "Vol Not Found"
.AT "File Not Found"
.AT "Dup. Filename"
.AT "Vol Is Full"
.AT "Dir Is Full"
.AT "Unsupp. Storage"
.AT "End Of File"
.AT "File Locked"
.AT "File Opened"
2020-05-21 12:55:49 +00:00
.AT "Bad Buffer"
2020-05-17 17:34:32 +00:00
*--------------------------------------
.AT "Out Of Memory"
.AT "Out Of Handle"
.AT "Invalid Handle"
.AT "Buffer Overflow"
.AT "Bad Path"
.AT "Bad API Argument"
.AT "No Such Process"
.AT "Syntax Error"
.AT "Env Is Full"
.AT "Invalid BIN"
.AT "File Too Big"
2020-11-29 13:16:39 +00:00
.AT "Invalid Numerical"
2020-05-17 17:34:32 +00:00
.AT "User Interrupt"
*--------------------------------------
.AT "Cmd Syntax Error"
.AT "Exp. Syntax Error"
.AT "Stack Error"
.AT "Stack Overflow"
.AT "LOOP Without WHILE"
.AT "NEXT Without FOR"
.AT "FI/ELSE Without IF"
.AT "Bad File Type"
.AT "Undef. Function"
.AT "Unexp. EOF"
2020-12-23 14:54:57 +00:00
.AT "LOOP Without DO"
2020-05-17 17:34:32 +00:00
*--------------------------------------
.AT "Unknown Error"
*--------------------------------------
MAN
2020-12-15 13:23:22 +00:00
SAVE usr/src/sys/kernel.s.errorx
LOAD usr/src/sys/kernel.s
2020-05-17 17:34:32 +00:00
ASM