-
Notifications
You must be signed in to change notification settings - Fork 1
/
critical.h
76 lines (59 loc) · 2.86 KB
/
critical.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
DISKCOPY.EXE, floppy diskette duplicator similar to MSDOS Diskcopy.
Copyright (C) 1998, Matthew Stanford.
Copyright (C) 1999, 2000, 2001 Imre Leber.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have recieved a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
If you have any questions, comments, suggestions, or fixes please
email me at: [email protected]
*/
#ifndef CRITICAL_H_
#define CRITICAL_H_
/* Macro's to interpret the status code. */
/* Causes: */
#define WRITEPROTECTED 0 /* Medium is write protected. */
#define UNKNOWNDEVICE 1 /* Device unknown. */
#define DRIVENOTREADY 2 /* Drive not ready. */
#define UNKNOWNINSTRUCTION 3 /* Unknown instruction. */
#define CRC_ERROR 4 /* CRC error. */
#define WRONGLENGTH 5 /* Wrong length of data block. */
#define SEEKERROR 6 /* Seek error. */
#define UNKNOWNMEDIUM 7 /* Unknown medium. */
#define SECTOR_NOT_FOUND 8 /* Sector not found. */
#define NOPAPER 9 /* No paper left in printer. */
#define WRITEERROR 10 /* Write error. */
#define READERROR 11 /* Read error. */
#define GENERALFAILURE 12 /* General failure. */
/* Status values. */
#define ERRORONWRITE 0x01 /* Application where the error occured. */
/* 0 = read, 1 = write. */
#define ERRORRANGE 0x06 /* Range involved. */
/* 0 = system data. */
/* 1 = FAT. */
/* 2 = directory. */
/* 3 = data range. */
#define ABORTALLOWED 0x08 /* Abort allowed. */
#define RETRYALLOWED 0x10 /* Retry allowed. */
#define IGNOREALLOWED 0x20 /* Ignore allowed. */
#define IGNORE 0x00
#define RETRY 0x01
#define ABORTIT 0x02
#define FAIL 0x03
/* In critical.asm */
void SetCriticalHandler (int (*handler) (int status));
void RenewCriticalHandler (int (*handler) (int status));
/* In hicritcl.asm */
void CriticalHandlerOn (void);
int CriticalErrorOccured (void);
int GetCriticalCause (void);
int GetCriticalStatus (void);
#endif