80 Posted Topics
Re: If you wrote a program in Assembly, then when you pass your code through the assembler you get a "one to one" translation (what you wrote in Assembly is what will be in the exe file), now if on the other hand, you thought you wrote in Assembly and passed … | |
Re: That is easy, basic stuff... If I were taking a class, I would pay attention though... We don't write your code for you, what we WILL do is help you if you get stuck.. Write some code and we will help ya out. | |
Re: byte == 8 bits word == 2 bytes (16 bit) dword == 4 bytes (2 words) (32 bit) qword == 8 bytes (2 dwords or 4 words (64 bit)) in 32bit assembly the size of a pointer is a dword not a word, pointers are 32 bit. the sizes stay … | |
Re: Your first post, new to assembly? If so, why don't you use invoke instead of push/call? It will save you many headaches... You don't gain anything using push/calls. You do not need lines 12, 13, and 14 they are already defined in kernel32.inc that being said, all you have to … | |
Re: Don't know much about MIPS, but instead of using byte for variable size, could you use halfword? [CODE] A: .halfword '8C','9A','9B' .... etc[/CODE] | |
Re: The MUST have books are from Intel and AMD, many years ago they actually shipped their manuals for free, now they are in PDF format. [url]http://search.intel.com/Default.aspx?q=software%20developers%20manual[/url] [url]http://search.amd.com/US/_layouts/search/Search.aspx?csquery=programmers%20manual&collection=all-us[/url] I got the books by Intel and AMD when they were printed, and a few years ago I got them on CD they … | |
Re: 1. [CODE] ProcName proc ; code here ret ProcName endp [/CODE] 2. Don't know 16bit asm, but this should work, dwMyVar is a DWORD in the uninitialized data section [CODE] mov dwMyVar, eax ; or mov dwMyVar, 1 etc [/CODE] 3. unsure in 16 bit | |
Re: everything is a number to a processor (well actually true or false, open or closed) an opcode is an instruction that the processor understands. But we really don't use opcodes, we use mnumonics (groups of letters that a human can easily remember). It is much easier to remember CALL then … | |
Re: actually jb is the opposite of ja. ja and jg are basically the same, they will both jump if it second operand is > the first opcode... in your example it will jmp to start if eax is above or greater than ebx... ja and jg check differant flags, but … | |
Re: Probably line 31? You are trying to move a DWORD into a BYTE... in MASM it would be: [CODE]mov al, BYTE PTR [ebx] [/CODE] in this way the assembler knows we only want to move a byte from ebx to al. Wait, HLA is backwards right? you are moving from … | |
Re: [QUOTE=Goddard;1503525]I am just starting asm in my cs class. What architecture is this?[/QUOTE] It is INTEL/AMD x86 | |
Re: Well, your logic is a bit off... print is a MASM macro that prints text to the console, just change print to what you use... putch and putint [CODE] mov esi, 10 ; only want 10 numbers printed xor ebx, ebx FirstRow: inc ebx print str$(ebx), 32 ; print num … | |
Re: Why would you have to change your code to work with an IDE? An IDE is just a front end (with fancy features)for your assembler/linker/compier/whetevertool...You would just have to set the paths that the IDE passes to your assembler/linker/tool or am I misunderstanding your meaning of IDE? What IDE are … | |
Re: The big problems I see right away are: 1. you are using 32 bit registers and using pusha, pusha saves the 16 bit registers.. you need to use push[COLOR="Red"]ad[/COLOR] 2. your stack is really screwed up!! you are using pusha without using popa. for every pusha/d you need to use … | |
Re: The only place I see a floating point error (division by zero) is at your idiv... if eax or esi == 0 then you will get this... a cmp wouldn t throw that error... if you want to put the accumulator back on the stack shouldn't [CODE]mov [esp+56],eax[/CODE] be after … | |
Re: hmm, you don't pay attention in class and now you want us to write your code? nope won't do it.... you learn nothing.... show some effort for cryin out loud! write some code... and when you get stuck, we will help... | |
Re: [CODE] mov edi, offset Arr mov ax, word ptr [edi +2 *0][/CODE] 1st line you are moving the address of Arr into edi 2nd line you are moving the 1st value in the array to ax. since your array are WORDS we use +2 if they were DWORDS you would … | |
Re: I do not think Windows 7 will run dos/com files anymore... MS dropped support for those file types.. You will need to run under a virtual machine... If you are starting out, I suggest you learn 32 bit windows assembly (a lot easier than 16 bit code and dos/com) Starting … | |
Re: Sure!!! Why couldn't you? If you have the time and patients, then you can write anything in Assembler. I had this in my collection: the old Boulder Dash game... credit to the original author, source included.. | |
Re: RadASM, WinASM and a few others are only IDE's (Intergrated Development Enviroments) They provide text coloring, dialog editors, autocomplete, MDI, resource editors, and many more things to make coding easier. We use assemblers not compilers (sure I'll get flamed for that)... they don't assemble anything, they are the "front end" … | |
Re: Yes, that is correct. IF the characters are between 41H and 5AH, then subtract 32 from the char code to make lower... If the characters are between 61H and 7AH then add 32 to make upper. | |
Re: Technically, Yes you can... Will most people tell you how, No... Just either, write a PE file in Hex by hand, or just use the mnemonics as most normal people do... The only reason I see one would want to do that is virii coding.. Now, if you want a … | |
Re: Window program? You cannot write directly to a serial port AFAIK. You would need to write a driver to do it in RING 0 in order to use OUT in 32 bit windows. Otherwise you would have to use the Windows API CreateFile, here is some reading: [url]http://msdn.microsoft.com/en-us/library/ms810467.aspx[/url] | |
Re: MOV is an instruction an Operand is "what" to operate on, so in the below sample eax and ecx are the operands mov eax, ecx and the opcode for the above mov would be 8B and the whole opcode for mov eax, ecx would be 8BC1 (Helps to have the … | |
Re: Trying to reverse something? Tsk tsk tsk... What is dword_000001? Initialized, uninitialized? Oh, dword_000001 is a compiler generated name... This should work: [CODE] mov ecx, offset dword_000001 lea ecx, [ecx][/CODE] | |
Re: Well, you if you have 2 processors/cores and use CreateThread the OS decides which to use? Or you can look into SetProcessAffinityMask and SetThreadAffinityMask Windows API to delegate what processor/core you want to use | |
Re: 5CH == 92 base 10 so it would be call DWORD PTR [ecx + 92] what is it from? A disassembly? | |
Hmm, guess I am supposed to introduce myself? Name is Gunner, have been writing windows programs in assembly for about 10 years.. Figured I would find a new forum to share my knowledge :-) Been building computers and programming in general for over 25 years so maybe somewhere in my … | |
Re: Also, since the address of xd is known at assembly time you can do: [CODE] invoke MessageBox, NULL, [COLOR="Red"]offset[/COLOR] xd, [COLOR="#ff0000"]offse[/COLOR]t xd, MB_OK[/CODE] or [CODE] push MB_OK push offset xd push offset xd push NULL call MessageBox[/CODE] | |
Re: WinASM is not an assembler but an IDE for MASM (and FASM with a plugin). You will also need to dl the MASM32 package from Hutches site... www.masm32.com comes with samples too! |
The End.