project directories reorganization

This commit is contained in:
Blaise Tine
2020-04-14 06:35:20 -04:00
parent 1de06fd9c0
commit fc155e1223
1056 changed files with 8120 additions and 8120 deletions

View File

@@ -1,38 +0,0 @@
#include "vx_io.h"
#ifdef __cplusplus
extern "C" {
#endif
void vx_print_hex(unsigned f)
{
// vx_print_str(hextoa[f]);
if (f < 16)
{
vx_print_str(hextoa[f]);
return;
}
int temp;
int sf = 32;
bool start = false;
do
{
temp = (f >> (sf - 4)) & 0xf;
if (temp != 0) start = true;
if (start) vx_print_str(hextoa[temp]);
sf -= 4;
} while(sf > 0);
}
void vx_printf(const char * c, unsigned f)
{
vx_print_str(c);
vx_print_hex(f);
vx_print_str("\n");
}
#ifdef __cplusplus
}
#endif

View File

@@ -1,20 +0,0 @@
#pragma once
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
static char * hextoa[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"};
void vx_print_hex(unsigned);
void vx_printf(const char *, unsigned);
void vx_print_str(const char *);
void vx_printc(unsigned, char c);
#ifdef __cplusplus
}
#endif

View File

@@ -1,33 +0,0 @@
.type vx_print_str, @function
.global vx_print_str
vx_print_str:
addi sp, sp, -12
sw ra, 0(sp)
sw a1, 4(sp)
bl:
lbu a1,0(a0)
beqz a1,be
jal vx_printc
addi a0, a0, 1
j bl
be:
lw ra, 0(sp)
lw a1, 4(sp)
addi sp, sp, 12
ret
.type vx_printc, @function
.global vx_printc
vx_printc:
la t0, print_addr
lw t0, 0(t0)
sw a1, 0(t0)
ret
.section .data
print_addr:
.word 0x00010000