diff options
Diffstat (limited to 'libc/msdos/i86.c')
-rw-r--r-- | libc/msdos/i86.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/libc/msdos/i86.c b/libc/msdos/i86.c index 0613756..44de3e3 100644 --- a/libc/msdos/i86.c +++ b/libc/msdos/i86.c @@ -9,7 +9,15 @@ #ifdef __AS386_16__ -#ifdef L___set_es +#ifdef L___seg_regs +unsigned int +__get_cs() +{ +#asm + mov ax,cs +#endasm +} + unsigned int __get_ds() { @@ -100,6 +108,28 @@ unsigned int off; } #endif +#ifdef L___doke_es +int +__doke_es(off, value) +unsigned int off; +int value; +{ +#asm +#if __FIRST_ARG_IN_AX__ + mov bx,sp + mov bx,[bx+2] + xchg ax,bx +#else + mov bx,sp + mov ax,[bx+4] + mov bx,[bx+2] +#endif + seg es + mov [bx],ax +#endasm +} +#endif + #ifdef L___strchr_es char * __strchr_es(s, c) |