Subversion Repositories Kolibri OS

Rev

Rev 996 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 996 Rev 1066
Line 2... Line 2...
2
#define IMAGE_BASE  0xE0100000
2
#define IMAGE_BASE  0xE0100000
3
#define LOAD_BASE   0x00100000
3
#define LOAD_BASE   0x00100000
4
 
4
 
Line 5... Line 5...
5
 
5
 
Line 6... Line 6...
6
#define page_tabs   0xDDC00000
6
#define page_tabs       0xDD800000
Line 7... Line 7...
7
 
7
 
Line 18... Line 18...
18
#define sel_srv_code    0x31
18
#define sel_srv_code    0x31
19
#define sel_srv_stack   0x39
19
#define sel_srv_stack   0x39
Line -... Line 20...
-
 
20
 
-
 
21
 
-
 
22
 
-
 
23
#define __export __attribute__ ((dllexport))
20
 
24
 
Line 21... Line 25...
21
 
25
 
Line 22... Line 26...
22
void printf (const char *format, ...);
26
void printf (const char *format, ...);
Line 72... Line 76...
72
{
76
{
73
	asm volatile (
77
	asm volatile (
74
    "pushl %0\n\t"
78
    "pushl %0\n\t"
75
    "popfl\n"
79
    "popfl\n"
76
    : : "r" (efl)
80
    : : "r" (efl));
77
	);
81
}
78
}
-
 
79
 
82
 
Line 80... Line 83...
80
static inline count_t fnzb(u32_t arg)
83
static inline index_t fnzb(u32_t arg)
81
{
84
{
82
  count_t n;
85
  count_t n;
83
    asm volatile (
86
    asm volatile (
84
    "xorl %0, %0 \n\t"
87
    "xorl %0, %0 \n\t"
85
                "bsr %1, %0"
88
                "bsr %1, %0"
86
    :"=&r"(n) :"r"(arg) );
89
    :"=&r"(n) :"r"(arg) );
87
	return n;
90
	return n;
88
}
91
}
Line 89... Line 92...
89
 
92
 
90
static inline count_t _bsf(u32_t arg)
93
static inline index_t _bsf(u32_t arg)
91
{
94
{
92
  count_t n;
95
  count_t n;
93
    asm volatile (
96
    asm volatile (
94
    "xorl %0, %0 \n\t"
97
    "xorl %0, %0 \n\t"
Line 199... Line 202...
199
  int        out_size;
202
  int        out_size;
200
}ioctl_t;
203
}ioctl_t;
201
 
204
 
Line 202... Line 205...
202
 
205
 
203
typedef struct
206
typedef struct __attribute__ ((packed))
204
{
207
{
205
    u32_t code;
208
    u32_t code;
206
    union
209
    union
207
    {
210
    {
Line 212... Line 215...
212
            u32_t   val2;
215
            u32_t   val2;
213
            u16_t   x;                  /* cursor x        */
216
            u16_t   x;                  /* cursor x        */
214
            u16_t   y;                  /* cursor y        */
217
            u16_t   y;                  /* cursor y        */
215
            u32_t   unused;
218
            u32_t   unused;
216
        }__attribute__ ((packed));
219
        };
217
 
220
 
Line 218... Line 221...
218
        struct                          /* realtime io     */
221
        struct                          /* realtime io     */
219
        {
222
        {
220
            u32_t   sender;             /* service handler */
223
            u32_t   sender;             /* service handler */
221
            u32_t   stream;             /* io stream id, if present  */
224
            u32_t   stream;             /* io stream id, if present  */
Line 235... Line 238...
235
    };
238
    };
236
}event_t;
239
}event_t;
237
240
 
Line -... Line 241...
-
 
241