Last change
on this file since 616 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
984 bytes
|
Rev | Line | |
---|
[444] | 1 | /* |
---|
| 2 | * Copyright (C) 2006 KPIT Cummins |
---|
| 3 | * Copyright (C) 2009 Conny Marco Menebröcker |
---|
| 4 | * All rights reserved. |
---|
| 5 | * |
---|
| 6 | * Redistribution and use in source and binary forms is permitted |
---|
| 7 | * provided that the above copyright notice and following paragraph are |
---|
| 8 | * duplicated in all such forms. |
---|
| 9 | * |
---|
| 10 | * This file is distributed WITHOUT ANY WARRANTY; without even the implied |
---|
| 11 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
| 12 | */ |
---|
| 13 | #include<sys/stat.h> |
---|
| 14 | #include<sys/types.h> |
---|
| 15 | /*volatile int creatsys(char *name,int perms) |
---|
| 16 | { |
---|
| 17 | #ifndef __xc16xL__ |
---|
| 18 | asm volatile("push r10\n" |
---|
| 19 | " mov r10,r9 \n" |
---|
| 20 | " mov r9,#0x300 \n" |
---|
| 21 | ); |
---|
| 22 | |
---|
| 23 | #endif |
---|
| 24 | |
---|
| 25 | asm volatile("trap #7"); |
---|
| 26 | #ifndef __xc16xL__ |
---|
| 27 | asm volatile("pop r10"); |
---|
| 28 | #endif |
---|
| 29 | } |
---|
| 30 | */ |
---|
| 31 | volatile int _creat(char *name,int perms) |
---|
| 32 | { |
---|
| 33 | int temp; |
---|
| 34 | |
---|
| 35 | temp=creatsys(name,perms); |
---|
| 36 | // putchar((char)temp); |
---|
| 37 | //printf("%d\n",temp); |
---|
| 38 | return temp; |
---|
| 39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.