-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathutilities.h
More file actions
executable file
·54 lines (34 loc) · 1.9 KB
/
Copy pathutilities.h
File metadata and controls
executable file
·54 lines (34 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef UTILITIES_H
#define UTILITIES_H
//figure out how much memory the system has
void memoryTest(bool printToScreen, unsigned int startAddress, unsigned int kbToTest = 1000);
//takes an 8 bit value and prints it to the screen
void print8bitNumber(unsigned int num, unsigned int curPos);
//takes an 16 bit value and prints it to the screen
void print16bitNumber(unsigned int num, unsigned int curPos);
//takes an 32 bit value and prints it to the screen
void print32bitNumber(unsigned int num, unsigned int curPos);
//slower than the other number printing functions but more versatile and it doesn't have leading zeros
void printAnyNumber(unsigned int num, short color, unsigned int curPos);
//(apparently they do) adds 2 numbers together then returns the result
int testIfReturnTypesWork(int num1, int num2);
void setCharEqual(char *target, unsigned int *poop);
//prints the memory address of all occurances of the word "fooo" in the given memory range
void findFooo(unsigned int memStart, unsigned int length, int curPos);
//shifts the cursor to the left or right. Positive values shift right. Negative values shift left.
void shiftCursor(int howFar);
//performs the equivalent of backspace on textmode 7 or 3 or whatever the default one is
void backspaceScreen();
//void printMemoryAllocation(bool contents = false);
//i'm, sick and tired of pasting that one snippet of code over and over to calculate x y values from videoStart. Here's a function to do that
void cursorAdrToInts(int *x, int *y);
string cpuModelToString(int manufacturer, int model, int family);
int getCpuVendor();
void printMemoryManagement();
void printMemInfo(bool verbose = false);
//print the number of memory allocated things in ram
void printMemNum();
//THE HEX READER. Prints 256 bytes to the screen starting at given address. A useful hex reader
void readMemoryHex(unsigned int address, unsigned int rows = 16);
#include "utilities.cpp"
#endif