OpenCores
URL https://opencores.org/ocsvn/forwardcom/forwardcom/trunk

Subversion Repositories forwardcom

[/] [forwardcom/] [libraries/] [fwrite.as] - Blame information for rev 113

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 87 Agner
/*********************************  fwrite.as  ********************************
2
* Author:        Agner Fog
3
* date created:  2018-03-21
4
* Last modified: 2018-03-21
5
* Version:       1.00
6
* Project:       ForwardCom library libc.li
7
* Description:   fwrite function. Write to file
8
* C declaration: size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
9
*
10
* Copyright 2018 GNU General Public License http://www.gnu.org/licenses
11
*****************************************************************************/
12
 
13
code section execute align = 4
14
 
15
_fwrite function public reguse = 0xF
16
 
17
int64 r1 *= r2               // calculate total size
18
int64 r2 = 1                 // make r1*r2 unchanged
19
 
20
sys_call(r0, r1, 1, 0x113)   // system call fwrite. buffer base r0, size r1
21
return
22
 
23
_fwrite end
24
 
25
code end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.