]> git.sur5r.net Git - cc65/blob - libsrc/apple2/oserrlist.s
New module from Stefan Haubenthal
[cc65] / libsrc / apple2 / oserrlist.s
1 ;
2 ; Stefan Haubenthal, 2003-12-24
3 ; Ullrich von Bassewitz, 18.07.2002
4 ;
5 ; Defines the platform specific error list.
6 ;
7 ; The table is built as a list of entries
8 ;
9 ;       .byte   entrylen
10 ;       .byte   errorcode
11 ;       .asciiz errormsg
12 ;
13 ; and terminated by an entry with length zero that is returned if the
14 ; error code could not be found.
15 ;
16
17         .export         __sys_oserrlist
18
19 ;----------------------------------------------------------------------------
20 ; Macros used to generate the list (may get moved to an include file?)
21
22 ; Regular entry
23 .macro  sys_oserr_entry         code, msg
24         .local  Start, End
25 Start:  .byte   End - Start
26         .byte   code
27         .asciiz msg
28 End:
29 .endmacro
30
31 ; Sentinel entry
32 .macro  sys_oserr_sentinel      msg
33         .byte   0                       ; Length is always zero
34         .byte   0                       ; Code is unused
35         .asciiz msg
36 .endmacro
37
38 ;----------------------------------------------------------------------------
39 ; The error message table
40
41 .rodata
42
43 __sys_oserrlist:
44         sys_oserr_entry         $01, "Invalid MLI function code number"
45         sys_oserr_entry         $04, "Incorrect parameter count"
46         sys_oserr_entry         $25, "Interrupt table full"
47         sys_oserr_entry         $27, "I/O error"
48         sys_oserr_entry         $28, "No device connected"
49         sys_oserr_entry         $2B, "Write protected"
50         sys_oserr_entry         $2E, "Disk switched"
51         sys_oserr_entry         $2F, "No disk in drive"
52         sys_oserr_entry         $40, "Invalid pathname syntax"
53         sys_oserr_entry         $42, "Too many files open"
54         sys_oserr_entry         $43, "Bad reference number"
55         sys_oserr_entry         $44, "Bad pathname"
56         sys_oserr_entry         $45, "Volume not mounted"
57         sys_oserr_entry         $46, "File not found"
58         sys_oserr_entry         $47, "File already exists"
59         sys_oserr_entry         $48, "Disk full"
60         sys_oserr_entry         $49, "Directory full"
61         sys_oserr_entry         $4A, "Incompatible ProDOS version"
62         sys_oserr_entry         $4B, "Unsupported storage type"
63         sys_oserr_entry         $4C, "End of file"
64         sys_oserr_entry         $4D, "Position past EOF"
65         sys_oserr_entry         $4E, "Access denied"
66         sys_oserr_entry         $50, "File already open"
67         sys_oserr_entry         $51, "File count bad"
68         sys_oserr_entry         $52, "Not a ProDOS disk"
69         sys_oserr_entry         $53, "Parameter out of range"
70         sys_oserr_entry         $55, "Too many devices mounted"
71         sys_oserr_entry         $56, "Bad buffer address"
72         sys_oserr_entry         $57, "Duplicate volume name"
73         sys_oserr_entry         $5A, "Damaged disk free space bit map"
74         sys_oserr_sentinel      "Unknown error"
75
76