Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
KosmicDaKerbal authored Aug 14, 2024
1 parent 5d5d86c commit 430dcd9
Show file tree
Hide file tree
Showing 5 changed files with 873 additions and 0 deletions.
Binary file added source/Icon.ico
Binary file not shown.
56 changes: 56 additions & 0 deletions source/MonkeyScript.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#include "parsecmds.h"
#include <fstream>
string inStr = "";
int main (){
monkey ();
cout << "\n Welcome to MonkeyScript85 v1.0\n\n";
cout << "Translator of 8085 Assembly Code to Human-Understandable Instructions for the 8085 Programming Kit.\nMade by KosmicDaKerbal.\n\n\n\nStarting Monke Terminal...\t\t\t\tNote: Only Capital Letters are accepted.\n";
while (inStr != "EXIT"){
inStr = "";
cout << "\nMonke Listen> ";
getline(cin, inStr);
if (inStr.length() > 32){
cout << "Monke no understand arguments above 32 characters :(";
} else if (inStr == "CONVERT"){
string file = "";
cout << "Enter Input File: ";
getline(cin, file);
ifstream inputFile;
inputFile.open(file.c_str());
if (!inputFile.is_open()) {
cerr << "Error opening the file: Check Filename and Extension" << endl;
} else {
cout << "Enter Location of Start Code: ";
string start;
int conf = 0;
getline(cin, start);
for (int n = 0; n <= 3; n++){
for (int m = 0; m <=15; m++){
if (start.at(n) == acceptable [m]){
conf++;
}
}
}
if (conf == 4){
output = "#Generated by MonkeyScript85 v1.0 at " + currentDateTime() + "\n\nMAIN PROGRAM:\nPRESS RST\nPRESS SET\nTYPE " + start + "\nPRESS INR";
string line;
while (getline(inputFile, line)){
parsecmds (line, 1, 1);
}
inputFile.close();
ofstream out ("MSc_Output.txt");
string buf = "\n\nTO EXECUTE:\nPRESS RST\nPRESS GO\nTYPE " + start + "\nPRESS EXEC {If everything is fine, then you should see Fr 1 End}";
output.append (buf);
out << output;
out.close();
} else {
cout << "Error in Beginning Address.";
}
}
} else {
parsecmds(inStr, globlog, 0);
}
}
cout << "\nMonke go home. Byebye!\n";
system ("pause");
}
Loading

0 comments on commit 430dcd9

Please sign in to comment.