Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | cons.h: |
2 | void set_visual_page(int page); |
||
3 | void set_active_page(int page); |
||
4 | int get_visual_page(void); |
||
5 | int get_active_page(void); |
||
6 | void place(int x,int y); |
||
7 | void cursor(int start,int end); |
||
8 | void _clear(char c,char attr,int x1,int y1,int x2,int y2); |
||
9 | void clear(void); |
||
10 | void _scroll(char attr,int x1,int y1,int x2,int y2); |
||
11 | void scroll(void); |
||
12 | void bios_save(void); |
||
13 | void bios_restore(void); |
||
14 | void cputc(char c); |
||
15 | void cputs(char *s); |
||
16 | int cprintf(char *fmt,...) __attribute__((format(printf,1,2))); |
||
17 | |||
18 | void putc_xy(int x,int y,char attr,char c); |
||
19 | char getc_xy(int x,int y,char *attr,char *c); |
||
20 | void puts_xy(int x,int y,char attr,char *s); |
||
21 | int printf_xy(int x,int y,char attr, char *fmt,...) __attribute__((format(printf,4,5))); |
||
22 | |||
23 | error.h: |
||
24 | error(msg) |
||
25 | message |
||
26 | |||
27 | hw-func.h: |
||
28 | void halt(void); |
||
29 | void cold_reboot(void); ??? |
||
30 | void warm_reboot(void); ??? |
||
31 | void reboot(int mode); ??? |
||
32 | void IDT_place(BYTE num,void (*handler)(void)); |
||
33 | void GDT_place(WORD sel,DWORD base,DWORD lim,BYTE acc,BYTE gran); |
||
34 | DWORD GDT_read(WORD sel,DWORD *lim,BYTE *acc,BYTE *gran); |
||
35 | LIN_ADDR addr2linear(unsigned short sel,unsigned long offset); |
||
36 | void *x_init(void); |
||
37 | void x_end(void); |
||
38 | void x_exc_bind(int i, void (*f)(int n)); |
||
39 | void x_irq_bind(int i, void (*f)(int n)); |
||
40 | /* Do something for these, please!!! */ |
||
41 | CONTEXT ll_context_save(void); |
||
42 | void ll_context_change(CONTEXT c); |
||
43 | void ll_context_load(CONTEXT c); |
||
44 | CONTEXT ll_context_from(void); |
||
45 | void ll_context_to(CONTEXT c); |
||
46 | hw-instr.h: |
||
47 | INLINE_OP WORD get_CS(void) |
||
48 | INLINE_OP WORD get_DS(void) |
||
49 | INLINE_OP WORD get_FS(void) |
||
50 | INLINE_OP DWORD get_SP(void) |
||
51 | INLINE_OP DWORD get_BP(void) |
||
52 | INLINE_OP WORD get_TR(void) |
||
53 | INLINE_OP void set_TR(WORD n) |
||
54 | INLINE_OP void set_LDTR(WORD addr) |
||
55 | INLINE_OP void clts(void) |
||
56 | INLINE_OP void hlt(void) |
||
57 | INLINE_OP void sti(void) |
||
58 | INLINE_OP void cli(void) |
||
59 | INLINE_OP SYS_FLAGS ll_fsave(void) |
||
60 | INLINE_OP void ll_frestore(SYS_FLAGS f) |
||
61 | INLINE_OP void save_fpu(TSS *t) |
||
62 | INLINE_OP void restore_fpu(TSS *t) |
||
63 | INLINE_OP void smartsave_fpu(TSS *t) |
||
64 | INLINE_OP void reset_fpu(void) |
||
65 | INLINE_OP int check_fpu(void) |
||
66 | INLINE_OP void init_fpu(void) |
||
67 | extern __inline__ void LL_FPU_save |
||
68 | void LL_FPU_restore(void) |
||
69 | inp, outp, inpw, outpw, inpd & outpd |
||
70 | mem.h: |
||
71 | mem* functions |
||
72 | pic.h: |
||
73 | void PIC_init(void); |
||
74 | void PIC_end(void); |
||
75 | void irq_mask(WORD irqno); |
||
76 | void irq_unmask(WORD irqno); |
||
77 | pit.h: |
||
78 | INLINE_OP int pit_init(BYTE channel, BYTE mode, WORD tconst) |
||
79 | INLINE_OP int pit_setconstant(BYTE channel, DWORD c) |
||
80 | INLINE_OP WORD pit_read(BYTE channel) |
||
81 | ptspec structs & funcs... |
||
82 | stdio.h: |
||
83 | int vsprintf(char *buf,char *fmt,va_list parms); |
||
84 | int sprintf(char *buf,char *fmt,...) __attribute__((__format__(printf,2,3))); |
||
85 | int vsscanf(char *buf,char *fmt,va_list parms); |
||
86 | int sscanf(char *buf,char *fmt,...) __attribute__((__format__(scanf,2,3))); |
||
87 | (RIMUOVERE LL_PRINTF!!!) |
||
88 | stdlib.h: |
||
89 | long strtoi(char *s,int base,char **scan_end); |
||
90 | unsigned long strtou(char *s,int base,char **scan_end); |
||
91 | double strtod(char *s,char **scan_end); |
||
92 | long strtol(const char *nptr, char **endptr, int base); |
||
93 | unsigned long strtoul(const char *nptr, char **endptr, int base); |
||
94 | |||
95 | |||
96 | unsigned ecvt(double v,char *buffer,int width,int prec,int flag); |
||
97 | unsigned fcvt(double v,char *buffer,int width,int prec,int flag); |
||
98 | unsigned gcvt(double v,char *buffer,int width,int prec,int flag); |
||
99 | unsigned dcvt(long v,char *buffer,int base,int width,int flag); |
||
100 | unsigned ucvt(unsigned long v,char *buffer,int base,int width,int flag);` |
||
101 | #define atof(s) strtod(s, NULL); |
||
102 | #define atoi(s) strtoi(s, 10, NULL); |
||
103 | #define atou(s) strtou(s, 10, NULL); |
||
104 | #define atol(s) strtol(s, 10, NULL); |
||
105 | void srand(long int seed); |
||
106 | long int rand(void); |
||
107 | unsigned abs(int x); |
||
108 | void exit(int code); |
||
109 | string.h: |
||
110 | char *strcpy(char *dst,const char *src); |
||
111 | char *strncpy(char *dst,const char *src,int n); |
||
112 | int strcmp(const char *s1,const char *s2); |
||
113 | int strncmp(const char *s1,const char *s2,int n); |
||
114 | int strlen(const char *s); |
||
115 | char *strscn(char *s,char *pattern); |
||
116 | char *strchr(char *s,int c); |
||
117 | char *strupr(char *s); |
||
118 | char *strlwr(char *s); |
||
119 | char *strcat(char *dst,char *src); |
||
120 | tss-ctx.h: |
||
121 | #define TSSMax 155 |
||
122 | #define TSSMain (TSSMax-1) |
||
123 | #define TSSBase 0x100 |
||
124 | #define TSSsel2index(sel) ((sel-TSSBase)/8) |
||
125 | #define TSSindex2sel(i) (TSSBase + i*8) |
||
126 | x-bios.h: |
||
127 | X_CALLBIOS * x_bios_address(void); |
||
128 | void X_meminfo(LIN_ADDR *b1,DWORD *s1,LIN_ADDR *b2,DWORD *s2); |
||
129 | void X_callBIOS(int service,X_REGS16 *in,X_REGS16 *out,X_SREGS16 *s); |
||
130 | void vm86_init(); |
||
131 | int vm86_callBIOS(int service,X_REGS16 *in,X_REGS16 *out,X_SREGS16 *s); |
||
132 | x-dos.h: |
||
133 | DOS_FILE *DOS_fopen(char *name, char *mode); |
||
134 | void DOS_fclose(DOS_FILE *f); |
||
135 | DWORD DOS_fread(void *buf,DWORD size,DWORD num,DOS_FILE *f); |
||
136 | DWORD DOS_fwrite(void *buf,DWORD size,DWORD num,DOS_FILE *f); |
||
137 | unsigned DOS_error(void); |
||
138 | x-dosmem.h: |
||
139 | void DOS_dump_mem(void); |
||
140 | void DOS_mem_init(void); |
||
141 | LIN_ADDR DOS_alloc(DWORD s); |
||
142 | int DOS_free(LIN_ADDR p,DWORD s); |