I want to learn assembly, but I don't want to do it with that HLA stuff that they use on the Art of Asembly page.
Also, could someone post a simply Hello World source that would compile in VC++ using the _asm thing?
I want to learn assembly, but I don't want to do it with that HLA stuff that they use on the Art of Asembly page.
Also, could someone post a simply Hello World source that would compile in VC++ using the _asm thing?
WebSnozz-
Cats have no butt cheeks.
If one farted, then it would make a flute noise.
they probably have many other resources [perhaps even free/online] aside from AoA... however i've heard it mentioned as if it was the defacto standard to learn the language... seek and ye shall find...
hasafraggin shizigishin oppashigger...
Randall Hyde
This guy has written an ebook that you can download free.
Warning ASM is not for the faint hearted
Randall Hyde wrote AoA, what he doesn't want to do. But it's probably the best for learning to do asm on MSVC as most other books/tutorials require a dos compiler. If you want to see the asm for Hello World then you can look at the asm generated by MSVC, it'll be something like -
Code:#include <stdio.h> int main() { char* a = "Hello World!\n"; char* format = "%s"; _asm { mov eax,dword ptr[a] push eax mov ecx,dword ptr[format] push ecx call printf add esp,8 } return 0; }
zen
How do I get it to generate assembly? I only see an obj file and it opens up as a binary file type.
WebSnozz-
Cats have no butt cheeks.
If one farted, then it would make a flute noise.
Project/Settings, C/C++ tab, Listing Files category, then select your option in the Listing File Type combo box.
edit- It's easier to understand if you compile with no optimisations.
Last edited by zen; 11-11-2001 at 05:14 PM.
zen
I have a question for you, zen: why the
add esp,8 ?
maybe you could do
but, it might need a mov or an add with esp, that's why I askCode:#include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { char* Text="Hello, World"; _asm { mov ecx,MB_OK push ecx mov eax, dword ptr [Text] push eax push eax mov eax,NULL push eax call MessageBox } return 0; }
I just thought it may work, someone with time, please try it.
I have used Assembly to crack games, though I have only needed to crack one, and I did it, succesfully. But I think I'll only use it when I really need it.
Oskilian
Last edited by oskilian; 11-11-2001 at 05:58 PM.
Adding the size of the arguments pushed onto the stack, onto the stack pointer - cleaning up as it's __cdecl.
zen
oh, thanks (learn one new thing every day)
Oskilian
I don't think there is big gap between the HLA in AoA and
nasm or any other assembler. Anyways I have two books one of which covers linux/intel assembly the other one does SPARC like assembly with an emulator; I don't have any on windows/intel assembly.
Last edited by Nick; 11-11-2001 at 06:30 PM.
What is a register?, and what is a flip-flop(not the kind on your foot?
WebSnozz-
Cats have no butt cheeks.
If one farted, then it would make a flute noise.
A flip-flop is a kind of sequential circuit, and a register
is made with flip-flops.
Book suggestion:
Assembly Language Primer
It is the best Assembley book you will every read.
Could you expand on the registry thing some more. I am going through the AoA thing and he just starts tossing the term around like it's something I should have already learned about. I don't have any formal programming or computer classes, but I grasped alot of the hardware stuff he talks about except the registers. Best guess is they are some sort of memory, are they part of the processor, mainboard, or memory?