My Project
Loading...
Searching...
No Matches
az_putnbr.c
Go to the documentation of this file.
1// kernel_lib_printf_functions
2/*
3 * Kernel Lib Printf Functions
4 *
5 * Maintainer: Park Jiwoo
6 *
7 * Copyright (C) 2024 Park-Jiwoo
8 *
9 */
10#include "kernel_pr_he.h"
11
12void az_putnbr(int n)
13{
14 unsigned int i;
15
16 i = 0;
17 if (n >= 0)
18 {
19 i = n;
20 }
21
22 if (n < 0)
23 {
24 i = n * -1;
25 kernel_putchar('-');
26 }
27
28 if (i >= 10)
29 {
30 az_putnbr(i / 10);
31 }
32
33 kernel_putchar((i % 10) + '0');
34}
void kernel_putchar(char c)
Definition az_putchar.c:13
void az_putnbr(int n)
Definition az_putnbr.c:12