ritualka-plang/source/boot-code.h
2023-05-10 08:08:47 +03:00

40 lines
1.7 KiB
C++

#ifndef BOOTCODE_H
#define BOOTCODE_H
#include <string>
#include <vector>
using std::byte;
using std::vector;
vector<byte> bootFrom (std::string source) {
if (source == "standartOutput") {
return {
byte(0x00), byte(0x00), byte(0x00), byte(0x00), byte(0x00), byte(0x00), byte(0x00),
byte(0x01), byte(0x01), byte(0x0D), byte(0x48), byte(0x65), byte(0x6C), byte(0x6C), byte(0x6F), byte(0x2C), byte(0x20), byte(0x77), byte(0x6F), byte(0x72), byte(0x6C), byte(0x64), byte(0x21),
byte(0x04), byte(0x00), byte(0x0E),
byte(0x00), byte(0x01), byte(0x00), byte(0x00), byte(0x00), byte(0x00)
};
}
else if (source == "standartInput") {
return {
byte(0x00), byte(0x00), byte(0x00), byte(0x00), byte(0x00), byte(0x00), byte(0x00),
byte(0x04), byte(0x01), byte(0x00),
byte(0x04), byte(0x00), byte(0x0E),
byte(0x00), byte(0x01), byte(0x00), byte(0x00), byte(0x00), byte(0x00)
};
}
else if (source == "standartInputWithOut") {
return {
byte(0x00), byte(0x00), byte(0x00), byte(0x00), byte(0x00), byte(0x00), byte(0x00),
byte(0x01), byte(0x01), byte(0x10), byte(0x54), byte(0x79), byte(0x70), byte(0x65), byte(0x20), byte(0x74), byte(0x65), byte(0x78), byte(0x74), byte(0x20), byte(0x68), byte(0x65), byte(0x72), byte(0x65), byte(0x3a), byte(0x20),
byte(0x04), byte(0x00), byte(0x0E),
byte(0x04), byte(0x01), byte(0x00),
byte(0x04), byte(0x00), byte(0x0E),
byte(0x00), byte(0x01), byte(0x00), byte(0x00), byte(0x00), byte(0x00)
};
}
return {};
}
#endif // BOOTCODE_H