Lord KJWilliams
Member
So I spent some time with one of my computer science professors at my college, to learn more about programming in assembly langauge for the intel chip series that has the preceding i in their model names. Well, I made a simple asteroid shooting program based on Shaun Spaldings youtube short video series called " Your first game ",
See :
and gave the program to my professor to show me the problems of programming in assembly language with intel CPUs such as his custom built computer that has a i9 for his windows 10 system. I am using a i7 with my windows 7 Pro to make my games with. He says " Im going to prove you that programming in assembly language is a headache, showing the differences between the legacy instruction set that intel CPUs have to have for backwards compatibility and the special chip set instructions just for the i9 which will not work on another intel CPU other than a i9".
He takes my game copies it to his computer system , then using a program that is like MASM, he reversed engineered my game from its machine language into assembly language. Now in assembly language he was able to find the exact location, where to add specific chip instructions, that access the core layers in his computers CPU. What happened is that he was able to make my game run faster by having the memory that used by game to be shared with the individual core layers in his i9. I dont know how to explain it - like my professor does. In fact he told me that each core can be instructed to manage a different address section of the stack and heap to get those variable values.
So my professor runs my game again on his computer, and it still fast. So he says to me " Why is that when I first ran your original asteroid game it runs slower, than my modified version? The answer is the legacy instruction set which is what game maker studio uses compile code into. That's why windows PC programs are portable to most other systems. Here's the problem with the new version of the asteroid game - It will only run on a windows 10 system that has a i9." I took the copy of the asteroid game that was modified, to try and run on my Windows 7 pro that has i7 - and it crashed the machine, that night.
I go back to my professor the next time I am at college, and I told him what happened. And he said , " That's part of the reason why windows programs are portable with other machines that have windows - because compilers that are made today do not use special instruction set of intel CPUs to produce stand alone executables. Those special instruction sets that are added to the instruction set ( which are separate from the legacy instruction set - which is not obvious unless you have studied the differences ) by the engineers at intel, those are for specific applications that are seldom used. They have no portability at all except to the same CPU model design. There even series different chip sets of series of the same i9 which are not compatible. When you go to your systems folder in Windows, and look at your CPU name,( in my case i7 ) there is a set of numbers after a dash '-' ( usually 4 numbers sometimes) that represent the chip set series ", as my professor continued . " You need to read up on the sandy-bridge architecture used by intel, and purchase a updated book on assembly programming by Kip R. Irvine, again ", he said to me and showing me the book.
( I hate buying college text books because I am forced to buy the one the school using which is too
expensive ! )
Therefore a program written in x86 that use legacy asm. code for a pentium 2 can be ported to a machine
that has a i7 like my computer has, or has a i9 like my professor has, because they have the same legacy asm instruction set. This does not mean a program, such as one written in C source code, that is compiled is portable.
This is the text book that the school is using :
See:
https://www.amazon.com/Assembly-Lan...?keywords=Kip+R.+Irvine&qid=1569359973&sr=8-1
This is what I know about assembly programming :
Assembly programming is never used for building giant programs, now days, its used for optimizing parts of a program, drivers for hardware, and software embedded hardware. My professor has a Xerox photocopier connected to one of his older computers by some invention he came up with, to allow him to use the photocopier as a scanner to send pictures back to his computer, but the software he designed to let him do that , had to have a driver written in assembly.
What I have learned :
I have to be worried about what I program in intel assembly because I have to be aware of the differences between these two different types of instruction sets.
" Tell your friends on that forum, dont bother learning asm. for AMD CPUs - they are not compatible as you think they are with intel CPUs. instruction sets ". - he told me to say that to all of you here at this forum.
That's what I learned about my game and the problems of machine language when it was reversed engineered with assembly.
Now would any of you would like to learn x86 asm for reverse engineering your games ? Note , I do not mean overclocking your CPU.
See :
and gave the program to my professor to show me the problems of programming in assembly language with intel CPUs such as his custom built computer that has a i9 for his windows 10 system. I am using a i7 with my windows 7 Pro to make my games with. He says " Im going to prove you that programming in assembly language is a headache, showing the differences between the legacy instruction set that intel CPUs have to have for backwards compatibility and the special chip set instructions just for the i9 which will not work on another intel CPU other than a i9".
He takes my game copies it to his computer system , then using a program that is like MASM, he reversed engineered my game from its machine language into assembly language. Now in assembly language he was able to find the exact location, where to add specific chip instructions, that access the core layers in his computers CPU. What happened is that he was able to make my game run faster by having the memory that used by game to be shared with the individual core layers in his i9. I dont know how to explain it - like my professor does. In fact he told me that each core can be instructed to manage a different address section of the stack and heap to get those variable values.
So my professor runs my game again on his computer, and it still fast. So he says to me " Why is that when I first ran your original asteroid game it runs slower, than my modified version? The answer is the legacy instruction set which is what game maker studio uses compile code into. That's why windows PC programs are portable to most other systems. Here's the problem with the new version of the asteroid game - It will only run on a windows 10 system that has a i9." I took the copy of the asteroid game that was modified, to try and run on my Windows 7 pro that has i7 - and it crashed the machine, that night.
I go back to my professor the next time I am at college, and I told him what happened. And he said , " That's part of the reason why windows programs are portable with other machines that have windows - because compilers that are made today do not use special instruction set of intel CPUs to produce stand alone executables. Those special instruction sets that are added to the instruction set ( which are separate from the legacy instruction set - which is not obvious unless you have studied the differences ) by the engineers at intel, those are for specific applications that are seldom used. They have no portability at all except to the same CPU model design. There even series different chip sets of series of the same i9 which are not compatible. When you go to your systems folder in Windows, and look at your CPU name,( in my case i7 ) there is a set of numbers after a dash '-' ( usually 4 numbers sometimes) that represent the chip set series ", as my professor continued . " You need to read up on the sandy-bridge architecture used by intel, and purchase a updated book on assembly programming by Kip R. Irvine, again ", he said to me and showing me the book.
( I hate buying college text books because I am forced to buy the one the school using which is too
expensive ! )
Therefore a program written in x86 that use legacy asm. code for a pentium 2 can be ported to a machine
that has a i7 like my computer has, or has a i9 like my professor has, because they have the same legacy asm instruction set. This does not mean a program, such as one written in C source code, that is compiled is portable.
This is the text book that the school is using :
See:
https://www.amazon.com/Assembly-Lan...?keywords=Kip+R.+Irvine&qid=1569359973&sr=8-1
This is what I know about assembly programming :
Assembly programming is never used for building giant programs, now days, its used for optimizing parts of a program, drivers for hardware, and software embedded hardware. My professor has a Xerox photocopier connected to one of his older computers by some invention he came up with, to allow him to use the photocopier as a scanner to send pictures back to his computer, but the software he designed to let him do that , had to have a driver written in assembly.
What I have learned :
I have to be worried about what I program in intel assembly because I have to be aware of the differences between these two different types of instruction sets.
" Tell your friends on that forum, dont bother learning asm. for AMD CPUs - they are not compatible as you think they are with intel CPUs. instruction sets ". - he told me to say that to all of you here at this forum.
That's what I learned about my game and the problems of machine language when it was reversed engineered with assembly.
Now would any of you would like to learn x86 asm for reverse engineering your games ? Note , I do not mean overclocking your CPU.