7 unsigned int skip_atou(const char **s
);
8 unsigned int atou(const char *s
);
10 static inline int isdigit(int ch
)
12 return (ch
>= '0') && (ch
<= '9');
18 uint16_t bufoffs
, bufseg
;
19 } __attribute__ ((packed
));
20 int int25_read_sector(unsigned char drive
, struct diskio
*dio
);
21 int int26_write_sector(unsigned char drive
, struct diskio
*dio
);
27 uint8_t dispatcher
[5];
30 uint32_t criterrvector
;
38 } __attribute__((packed
));
40 extern struct psp _PSP
;
42 static inline __attribute__((const))
46 asm("movw %%ds,%0":"=rm"(v
));
50 static inline void set_fs(uint16_t seg
)
52 asm volatile("movw %0,%%fs"::"rm" (seg
));
55 static inline uint8_t get_8_fs(size_t offs
)
58 asm volatile("movb %%fs:%1,%0"
59 : "=q" (v
) : "m" (*(const uint8_t *)offs
));
63 static inline uint16_t get_16_fs(size_t offs
)
66 asm volatile("movw %%fs:%1,%0"
67 : "=r" (v
) : "m" (*(const uint16_t *)offs
));
71 static inline uint32_t get_32_fs(size_t offs
)
74 asm volatile("movl %%fs:%1,%0"
75 : "=r" (v
) : "m" (*(const uint32_t *)offs
));
79 #endif /* MYSTUFF_H */