Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 1881 → Rev 1882

/programs/develop/libraries/menuetlibc/src/libc/pc_hw/Makefile
0,0 → 1,33
all:
make -C cpu
make -C endian
make -C farptr
make -C fpu
make -C hwint
make -C kb
make -C sound
make -C mem
make -C timer
 
clean:
make -C cpu clean
make -C endian clean
make -C farptr clean
make -C fpu clean
make -C hwint clean
make -C kb clean
make -C sound clean
make -C mem clean
make -C timer clean
 
depend:
make -C cpu depend
make -C endian depend
make -C farptr depend
make -C fpu depend
make -C hwint depend
make -C kb depend
make -C sound depend
make -C mem depend
make -C timer depend
 
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/cpu/Makefile
0,0 → 1,3
THIS_SRCS = my_cs.s my_ds.s my_ss.s
 
include $(MENUET_LIBC_TOPDIR)/Make.rules
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/cpu/my_cs.s
0,0 → 1,8
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <libc/asmdefs.h>
#include<libc/asm.h>
 
MK_C_SYM(_my_cs)
movw %cs,%ax
movzwl %ax,%eax
ret
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/cpu/my_ds.s
0,0 → 1,8
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <libc/asmdefs.h>
 
#include<libc/asm.h>
MK_C_SYM(_my_ds)
movw %ds,%ax
movzwl %ax,%eax
ret
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/cpu/my_ss.s
0,0 → 1,8
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <libc/asmdefs.h>
 
#include<libc/asm.h>
MK_C_SYM(_my_ss)
movw %ss,%ax
movzwl %ax,%eax
ret
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/endian/Makefile
0,0 → 1,3
THIS_SRCS = htonl.s htons.s ntohl.s ntohs.s
 
include $(MENUET_LIBC_TOPDIR)/Make.rules
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/endian/htonl.s
0,0 → 1,11
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <libc/asmdefs.h>
 
#include<libc/asm.h>
MK_C_SYM(htonl)
 
movl 4(%esp), %eax
xchgb %ah, %al
rorl $16, %eax
xchgb %ah, %al
ret
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/endian/htons.s
0,0 → 1,9
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <libc/asmdefs.h>
#include<libc/asm.h>
 
MK_C_SYM(htons)
 
movl 4(%esp), %eax
xchgb %ah, %al
ret
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/endian/ntohl.s
0,0 → 1,11
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <libc/asmdefs.h>
#include<libc/asm.h>
 
MK_C_SYM(ntohl)
 
movl 4(%esp), %eax
xchgb %ah, %al
rorl $16, %eax
xchgb %ah, %al
ret
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/endian/ntohs.s
0,0 → 1,8
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <libc/asmdefs.h>
#include<libc/asm.h>
 
MK_C_SYM(ntohs)
movl 4(%esp), %eax
xchgb %ah, %al
ret
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/farptr/Makefile
0,0 → 1,3
THIS_SRCS = farptr.c
 
include $(MENUET_LIBC_TOPDIR)/Make.rules
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/farptr/farptr.c
0,0 → 1,4
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#define extern
#define __inline__
#include <sys/farptr.h>
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/fpu/Makefile
0,0 → 1,3
THIS_SRCS = clear87.s cntrl87.s fpreset.s stat87.s
 
include $(MENUET_LIBC_TOPDIR)/Make.rules
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/fpu/clear87.s
0,0 → 1,10
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <libc/asmdefs.h>
#include<libc/asm.h>
MK_C_SYM(clear87)
 
fstsw %ax
movzwl %ax, %eax
fclex
ret
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/fpu/cntrl87.s
0,0 → 1,29
#include<libc/asm.h>
.text
 
MK_C_SYM(control87)
pushl %ebp
movl %esp,%ebp
 
pushl %eax
fstcw (%esp)
fwait
popl %eax
andl $0xffff, %eax
 
movl 12(%ebp) , %ecx
notl %ecx
andl %eax, %ecx
 
movl 12(%ebp) , %edx
andl 8(%ebp) , %edx
 
orl %ecx, %edx
pushl %edx
fldcw (%esp)
popl %edx
 
movl %ebp,%esp
popl %ebp
ret
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/fpu/fpreset.s
0,0 → 1,11
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <libc/asmdefs.h>
#include<libc/asm.h>
.text
 
MK_C_SYM(fpreset)
 
fninit
ret
 
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/fpu/stat87.s
0,0 → 1,12
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <libc/asmdefs.h>
.text
 
#include<libc/asm.h>
MK_C_SYM(status87)
 
fstsw %ax
movzwl %ax, %eax
ret
 
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/hwint/Makefile
0,0 → 1,4
THIS_SRCS = disable.c enable.c
 
include $(MENUET_LIBC_TOPDIR)/Make.rules
 
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/hwint/disable.c
0,0 → 1,8
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <dos.h>
#include <assert.h>
 
int disable(void)
{
return -1;
}
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/hwint/enable.c
0,0 → 1,8
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <dos.h>
#include <assert.h>
 
int enable(void)
{
return -1;
}
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/kb/Makefile
0,0 → 1,4
THIS_SRCS = getkey.c getxkey.c kbhit.c
 
include $(MENUET_LIBC_TOPDIR)/Make.rules
 
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/kb/getkey.c
0,0 → 1,9
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <pc.h>
#include <menuet/os.h>
 
int getkey(void)
{
if(!kbhit()) return -1;
return __menuet__getkey();
}
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/kb/getxkey.c
0,0 → 1,7
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <pc.h>
 
int getxkey(void)
{
return getkey();
}
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/kb/kbhit.c
0,0 → 1,11
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <pc.h>
#include <libc/farptrgs.h>
#include <menuet/os.h>
 
int kbhit(void)
{
int i;
i=__menuet__check_for_event();
if(i==2) return 1; else return 0;
}
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/mem/Makefile
0,0 → 1,3
THIS_SRCS = djmdr.s djmd.s mdb.s mdl.s md.s mdw.s
 
include $(MENUET_LIBC_TOPDIR)/Make.rules
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/mem/djmd.s
0,0 → 1,40
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
# This routine moves %ecx bytes from %ds:%esi to %es:%edi. It clobbers
# %eax, %ecx, %esi, %edi, and eflags. The memory ranges must not overlap,
# unless %esi >= %edi.
#include <libc/asmdefs.h>
#include<libc/asm.h>
 
.file "djmd.s"
.text
.balign 16,,7
 
MK_C_SYM(__dj_movedata)
cmpl $15,%ecx
jle small_move
jmp mod_4_check
# Transfer bytes until either %esi or %edi is aligned % 4
align_mod_4:
movsb
decl %ecx
mod_4_check:
testl $3,%esi
jz big_move
testl $3,%edi
jnz align_mod_4
 
big_move:
movb %cl,%al # We will store leftover count in %al
shrl $2,%ecx
andb $3,%al
rep
movsl
 
# %ecx known to be zero here, so insert the leftover count in %al
movb %al,%cl
small_move:
rep
movsb
ret
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/mem/djmdr.s
0,0 → 1,58
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
/* Modified by SET to copy in reverse order */
# This routine moves %ecx bytes from %ds:%esi to %es:%edi. It clobbers
# %eax, %ecx, %esi, %edi, and eflags.
#include <libc/asmdefs.h>
#include<libc/asm.h>
 
.file "djmdr.s"
.text
.balign 16,,7
MK_C_SYM(__dj_movedata_rev)
std
# Add the counter to the index
addl %ecx,%edi
addl %ecx,%esi
decl %esi
decl %edi
 
cmpl $15,%ecx
jle small_move
jmp mod_4_check
# Transfer bytes until either %esi or %edi is aligned % 3
align_mod_4:
movsb
decl %ecx
mod_4_check:
movl %esi,%eax
andl $3,%eax
cmpl $3,%eax
jz big_move
movl %edi,%eax
andl $3,%eax
cmpl $3,%eax
jnz align_mod_4
 
big_move:
movb %cl,%al # We will store leftover count in %al
shrl $2,%ecx
andb $3,%al
# Now retrocess the index 3 positions
subl $3,%edi
subl $3,%esi
rep
movsl
 
# %ecx known to be zero here, so insert the leftover count in %al
movb %al,%cl
 
# advance the index by 3
addl $3,%edi
addl $3,%esi
 
small_move:
rep
movsb
ret
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/mem/md.s
0,0 → 1,27
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#define USE_ESI
#define USE_EDI
#include <libc/asmdefs.h>
#include <libc/asmdefs.h>
#include<libc/asm.h>
 
MK_C_SYM(__movedata) /* src_sel, src_ofs, dest_sel, dest_ofs, len */
ENTER
 
pushw %ds
pushw %es
 
movw ARG1,%ds
movw ARG3,%es
 
movl ARG2,%esi
movl ARG4,%edi
movl ARG5,%ecx
 
call C_SYM(__dj_movedata)
 
popw %es
popw %ds
 
LEAVE
 
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/mem/mdb.s
0,0 → 1,29
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#define USE_ESI
#define USE_EDI
#include <libc/asmdefs.h>
#include<libc/asm.h>
 
MK_C_SYM(_movedatab) /* src_sel, src_ofs, dest_sel, dest_ofs, len */
ENTER
 
pushw %ds
pushw %es
 
movl ARG1,%eax
movw %ax,%ds
movl ARG2,%esi
 
movl ARG3,%eax
movw %ax,%es
movl ARG4,%edi
 
movl ARG5,%ecx
cld
rep
movsb
 
popw %es
popw %ds
 
LEAVE
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/mem/mdl.s
0,0 → 1,29
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#define USE_ESI
#define USE_EDI
#include <libc/asmdefs.h>
#include<libc/asm.h>
 
MK_C_SYM(_movedatal) /* src_sel, src_ofs, dest_sel, dest_ofs, len */
ENTER
 
pushw %ds
pushw %es
 
movl ARG1,%eax
movw %ax,%ds
movl ARG2,%esi
 
movl ARG3,%eax
movw %ax,%es
movl ARG4,%edi
 
movl ARG5,%ecx
cld
rep
movsl
 
popw %es
popw %ds
 
LEAVE
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/mem/mdw.s
0,0 → 1,29
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#define USE_ESI
#define USE_EDI
#include <libc/asmdefs.h>
#include<libc/asm.h>
 
MK_C_SYM(_movedataw) /* src_sel, src_ofs, dest_sel, dest_ofs, len */
ENTER
 
pushw %ds
pushw %es
 
movl ARG1,%eax
movw %ax,%ds
movl ARG2,%esi
 
movl ARG3,%eax
movw %ax,%es
movl ARG4,%edi
 
movl ARG5,%ecx
cld
rep
movsw
 
popw %es
popw %ds
 
LEAVE
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/sound/Makefile
0,0 → 1,3
THIS_SRCS = sound.c
 
include $(MENUET_LIBC_TOPDIR)/Make.rules
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/sound/sound.c
0,0 → 1,18
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <pc.h>
#include <assert.h>
 
void sound(int freq)
{
int scale;
if (freq == 0)
{
outportb(0x61, inportb(0x61) & ~3);
return;
}
scale = 1193046 / freq;
outportb(0x43, 0xb6);
outportb(0x42, scale & 0xff);
outportb(0x42, scale >> 8);
outportb(0x61, inportb(0x61) | 3);
}
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/timer/Makefile
0,0 → 1,3
THIS_SRCS = clock.c uclock.c
 
include $(MENUET_LIBC_TOPDIR)/Make.rules
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/timer/clock.c
0,0 → 1,10
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <time.h>
#include <libc/farptrgs.h>
#include <libc/bss.h>
 
clock_t clock(void)
{
return 0;
}
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/programs/develop/libraries/menuetlibc/src/libc/pc_hw/timer/uclock.c
0,0 → 1,13
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <time.h>
#include <errno.h>
#include <pc.h>
#include <libc/farptrgs.h>
#include <libc/bss.h>
 
uclock_t uclock(void)
{
return 0;
}
Property changes:
Added: svn:executable
+*
\ No newline at end of property