diff --git a/COM390/Lab1/Lab1.sln b/COM390/Lab1/Lab1.sln new file mode 100644 index 0000000..0bf12dd --- /dev/null +++ b/COM390/Lab1/Lab1.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lab1", "Lab1\Lab1.vcxproj", "{40B8067B-058B-4A8E-A8E5-961CB2327455}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {40B8067B-058B-4A8E-A8E5-961CB2327455}.Debug|Win32.ActiveCfg = Debug|Win32 + {40B8067B-058B-4A8E-A8E5-961CB2327455}.Debug|Win32.Build.0 = Debug|Win32 + {40B8067B-058B-4A8E-A8E5-961CB2327455}.Release|Win32.ActiveCfg = Release|Win32 + {40B8067B-058B-4A8E-A8E5-961CB2327455}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/COM390/Lab1/Lab1/Lab1.vcxproj b/COM390/Lab1/Lab1/Lab1.vcxproj new file mode 100644 index 0000000..6b25f70 --- /dev/null +++ b/COM390/Lab1/Lab1/Lab1.vcxproj @@ -0,0 +1,72 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {40B8067B-058B-4A8E-A8E5-961CB2327455} + Lab1 + + + + Application + true + v110 + MultiByte + + + Application + false + v110 + true + MultiByte + + + + + + + + + + + + + + + Level3 + Disabled + false + + + true + + + + + Level3 + MaxSpeed + true + true + true + + + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/COM390/Lab1/Lab1/Lab1.vcxproj.filters b/COM390/Lab1/Lab1/Lab1.vcxproj.filters new file mode 100644 index 0000000..dbcb0ac --- /dev/null +++ b/COM390/Lab1/Lab1/Lab1.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/COM390/Lab1/Lab1/main.c b/COM390/Lab1/Lab1/main.c new file mode 100644 index 0000000..f213792 --- /dev/null +++ b/COM390/Lab1/Lab1/main.c @@ -0,0 +1,35 @@ +#include +#include + + +char* name1 = "Mickey Mouse"; +char* name2 = "Minnie Mouse"; + +int retval; + +void pause(); + +int main (int argc, char** argv) { + + retval = strcmp(name1, name2); + + switch (retval) { + case -1: + printf("%d: %s %s %s", retval, name1, "is shorter than", name2); + break; + case 0: + printf("%d: %s %s %s", retval, name1, "is equal to", name2); + break; + case 1: + printf("%d: %s %s %s", retval, name1, "is greater than", name2); + break; + default: + printf("%s: %d", "Undefined return value", retval); + } + + pause(); +} + +void pause() { + getch(); +} \ No newline at end of file diff --git a/COM390/Project2/CoverSheet.docx b/COM390/Project2/CoverSheet.docx new file mode 100644 index 0000000..5931f10 Binary files /dev/null and b/COM390/Project2/CoverSheet.docx differ diff --git a/COM390/Project2/Project 2.pdf b/COM390/Project2/Project 2.pdf new file mode 100644 index 0000000..850f02f Binary files /dev/null and b/COM390/Project2/Project 2.pdf differ diff --git a/COM390/Project2/Project2/Project2.vcxproj b/COM390/Project2/Project2/Project2.vcxproj index facaf63..947b188 100644 --- a/COM390/Project2/Project2/Project2.vcxproj +++ b/COM390/Project2/Project2/Project2.vcxproj @@ -43,7 +43,7 @@ Level3 Disabled - true + false true diff --git a/COM390/Project2/Project2/main.c b/COM390/Project2/Project2/main.c index e1e0a90..bb248be 100644 --- a/COM390/Project2/Project2/main.c +++ b/COM390/Project2/Project2/main.c @@ -2,48 +2,106 @@ * Program: COM 390 - Project 2 * Author: Amrit Panesar 0) { - sprintf("%d03", j); + bufnum2[BUFARR - j] = --j; } + + return TRUE; +} + +bool zero2hundred2() { + k = BUFARR + 1; + +zerohundred_loop: + + bufnum3[BUFARR - k] = --k; + + if (k >= 0) { + goto zerohundred_loop; + } else { + goto zerohundred_done; + } + +zerohundred_done: + return TRUE; } void pause() { - printf("Press any key to continue. . ."); + printf("\n%s\n", "Press any key to continue. . ."); getch(); } \ No newline at end of file diff --git a/COM390/Project2/Project2/main.h b/COM390/Project2/Project2/main.h index 7f941b9..f2a3483 100644 --- a/COM390/Project2/Project2/main.h +++ b/COM390/Project2/Project2/main.h @@ -2,7 +2,7 @@ * Program: COM 390 - Project 2 * Author: Amrit Panesar @@ -15,6 +15,7 @@ typedef int bool; #define FALSE 0 bool zero2hundred(); -bool hundred2zero(); +bool hundred2zero1(); +bool hundred2zero2(); void pause(); diff --git a/COM390/Project2/Screenshots.docx b/COM390/Project2/Screenshots.docx new file mode 100644 index 0000000..61a55da Binary files /dev/null and b/COM390/Project2/Screenshots.docx differ diff --git a/COM390/Project2/calc.asm b/COM390/Project2/calc.asm new file mode 100644 index 0000000..26f6904 --- /dev/null +++ b/COM390/Project2/calc.asm @@ -0,0 +1,32 @@ +;By Amrit Panesar +;References code from Steve Hanna of vividmachines.com +;Launches calc.exe + +[Section .text] + +global _start + +_start: + +jmp short GetCommand + +CommandReturn: + pop ebx ;ebx now holds the handle to the string + xor eax,eax + push eax + xor eax,eax ;for some reason the registers can be very volatile, did this just in case + mov [ebx + 89],al ;insert the NULL character + push ebx + mov ebx,0x77e6fd35 + call ebx ;call WinExec(path,showcode) + + xor eax,eax ;zero the register again, clears winexec retval + push eax + mov ebx, 0x77e798fd + call ebx ;call ExitProcess(0); + + +GetCommand: + ;the N at the end of the db will be replaced with a null character + call CommandReturn + db "cmd.exe /c calc.exe" \ No newline at end of file diff --git a/COM390/Project3/Project3.sln b/COM390/Project3/Project3.sln new file mode 100644 index 0000000..bf9dfdf --- /dev/null +++ b/COM390/Project3/Project3.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project3", "Project3\Project3.vcxproj", "{AC9AD92F-F278-4F00-94AD-AC87E0EE6CC9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AC9AD92F-F278-4F00-94AD-AC87E0EE6CC9}.Debug|Win32.ActiveCfg = Debug|Win32 + {AC9AD92F-F278-4F00-94AD-AC87E0EE6CC9}.Debug|Win32.Build.0 = Debug|Win32 + {AC9AD92F-F278-4F00-94AD-AC87E0EE6CC9}.Release|Win32.ActiveCfg = Release|Win32 + {AC9AD92F-F278-4F00-94AD-AC87E0EE6CC9}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/COM390/Project3/Project3/Project3.vcxproj b/COM390/Project3/Project3/Project3.vcxproj new file mode 100644 index 0000000..759692a --- /dev/null +++ b/COM390/Project3/Project3/Project3.vcxproj @@ -0,0 +1,72 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {AC9AD92F-F278-4F00-94AD-AC87E0EE6CC9} + Project3 + + + + Application + true + v110 + MultiByte + + + Application + false + v110 + true + MultiByte + + + + + + + + + + + + + + + Level3 + Disabled + false + + + true + + + + + Level3 + MaxSpeed + true + true + true + + + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/COM390/Project3/Project3/Project3.vcxproj.filters b/COM390/Project3/Project3/Project3.vcxproj.filters new file mode 100644 index 0000000..dbcb0ac --- /dev/null +++ b/COM390/Project3/Project3/Project3.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/COM390/Project3/Project3/main.c b/COM390/Project3/Project3/main.c new file mode 100644 index 0000000..ff6f08d --- /dev/null +++ b/COM390/Project3/Project3/main.c @@ -0,0 +1,8 @@ +#include +#include +#include + + +int main (int argc, char** argv) { + +} \ No newline at end of file diff --git a/SDrive/Templates/CoverSheet.dotx b/SDrive/Templates/CoverSheet.dotx index c36713a..cee64b0 100644 Binary files a/SDrive/Templates/CoverSheet.dotx and b/SDrive/Templates/CoverSheet.dotx differ