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

Subversion Repositories forwardcom

[/] [forwardcom/] [libraries/] [printint64.as] - Blame information for rev 103

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 103 Agner
/*********************************  printint32.as *****************************
2
* Author:        Agner Fog
3
* date created:  2018-03-23
4
* Last modified: 2018-03-23
5
* Version:       1.00
6
* Project:       ForwardCom library libc.li
7
* Description:   printint32: print integer to stdout
8
* C declaration: void printint64 (int64_t x)
9
*
10
* Copyright 2018 GNU General Public License http://www.gnu.org/licenses
11
*****************************************************************************/
12
 
13
data section datap align = 8
14
parlist: int64 0                       // parameter list
15
format:  int8 "%lli",0                 // format string
16
data end
17
 
18
extern _printf: function
19
 
20
code section execute align = 4         // code section
21
 
22
_printint64 function public
23
int64 [parlist] = r0                   // save x in parameter list
24
int64 r0 = address([format])           // first parameter is format string
25
int64 r1 = address([parlist])          // parameter list
26
jump _printf                           // tail call to _printf
27
_printint64 end
28
 
29
code end

powered by: WebSVN 2.1.0

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