This repository has been archived on 2024-08-24. You can view files and clone it, but cannot push or open issues or pull requests.
PlutoISA/tpu.hpp

126 lines
2 KiB
C++
Raw Normal View History

2024-08-22 21:17:58 +02:00
#pragma once
#include <iostream>
#include <cstdlib>
#include <cstdint>
using namespace std;
void textProcessing ( uint8_t ch ) {
switch ( ch ) {
case 0x01:
cout << "0";
break;
case 0x02:
cout << "1";
break;
case 0x03:
cout << "2";
break;
case 0x04:
cout << "3";
break;
case 0x05:
cout << "4";
break;
case 0x06:
cout << "5";
break;
case 0x07:
cout << "6";
break;
case 0x08:
cout << "7";
break;
case 0x09:
cout << "8";
break;
case 0x0A:
cout << "9";
break;
case 0x0B:
cout << "A";
break;
case 0x0C:
cout << "B";
break;
case 0x0D:
cout << "C";
break;
case 0x0E:
cout << "D";
break;
case 0x0F:
cout << "E";
break;
case 0x10:
cout << "F";
break;
case 0x11:
cout << "G";
break;
case 0x12:
cout << "H";
break;
case 0x13:
cout << "I";
break;
case 0x14:
cout << "J";
break;
case 0x15:
cout << "K";
break;
case 0x16:
cout << "L";
break;
case 0x17:
cout << "M";
break;
case 0x18:
cout << "N";
break;
case 0x19:
cout << "O";
break;
case 0x1A:
cout << "P";
break;
case 0x1B:
cout << "Q";
break;
case 0x1C:
cout << "R";
break;
case 0x1D:
cout << "S";
break;
case 0x1E:
cout << "T";
break;
case 0x1F:
cout << "U";
break;
case 0x20:
cout << "V";
break;
case 0x21:
cout << "W";
break;
case 0x22:
cout << "X";
break;
case 0x23:
cout << "Y";
break;
case 0x24:
cout << "Z";
break;
case 0x25:
cout << endl;
break;
default:
break;
}
}