masm32

how to use a library in masm or more specifcally a .lib file?

孤街醉人 提交于 2019-12-20 04:47:19
问题 I have made a .lib file using visual studio 2010 and now I want to use it in masm. How can I do that? need help. I tried to look it on the internet but couldn't find any precise answer on how to do this. here is the link to .lib file that I created using Visual C++ 2010. https://www.dropbox.com/s/pzdd35ktolfl48x/MathFuncsLib.lib This file contains only a function that takes two integers as arguments and returns their sum. I need to use this function in one of my program written in intel

Assembly language - masm32 - multiplying

本小妞迷上赌 提交于 2019-12-19 11:59:55
问题 I am multiplying 3 numbers which works good even with a carry. I want to add a 4th number to multiply just for learning purposes. After i multiply 3 numbers i shift into EDX and print. Works great. After i add a 4th number i think i am multiplying 32bit x 32bit? So it stores into EDX:EAX? Would i then need to shift EAX into EDX so they are together to print? Im not sure if i am doing it right for the 4th number? .data? num1 dd ? num2 dd ? num3 dd ? num4 dd ? .data sum dd 0 prod dd 0 prod2 dd

Why is it better to use the ebp than the esp register to locate parameters on the stack?

断了今生、忘了曾经 提交于 2019-12-17 21:36:06
问题 I am new to MASM. I have confusion regarding these pointer registers. I would really appreciate if you guys help me. Thanks 回答1: Encoding an addressing mode using [ebp + disp8] is one byte shorter than [esp+disp8] , because using ESP as a base register requires a SIB byte. See rbp not allowed as SIB base? for details. (That question title is asking about the fact that [ebp] has to be encoded as [ebp+0] .) The first time [esp + disp8] is used after a push or pop, or after a call , will require

MASM str and substr?

别说谁变了你拦得住时间么 提交于 2019-12-13 16:26:15
问题 I'm currently coding an irc bot in asm I have already done this once in C++, so I know how to solve most problems I encounter, but I need a substr()[*] function like the one seen in C++. I need the substr function to receive the server name from a PING request so I can respond with the corresponding PONG response But I don't know how to implent it in MASM, I heard of something called macroassembling, It seems substr is often used in those functions Does anyone have any idea how I can get my

32 bit Calculator in 8086 Assembly

你说的曾经没有我的故事 提交于 2019-12-13 08:58:31
问题 CALCULATOR 32 Bit Can someone help me with my 32 bit calculator in MASM32. i think the adding and subtracting is OK but i cant print the number in decimal; 0002FFFF - 10005 = 1fffa In MEMORY :0001 0FFFA PRINTING: 165530 in decimal DATA_HERE SEGMENT mult1 dw 0002H dw 0FFFFH mult2 dw 0001H dw 0005H ans dw 0,0 DATA_HERE ENDS STACK_HERE SEGMENT STACK DW 40 DUP(0) STACK_HERE ENDS CODE_HERE SEGMENT ASSUME CS:CODE_HERE, DS:DATA_HERE, SS: STACK_HERE INICIO: MOV AX,DATA_HERE MOV DS,AX ADD: MOV AX

How to convert a DWORD into a DB

时光毁灭记忆、已成空白 提交于 2019-12-13 06:51:33
问题 I want to display a score in a game that I built in MASM32, and I have a problem, how do I convert a DWORD to a DB (string). There is the function crt__itoa to convert a dword to an integer , but for some reason it doesn't work (do i need to include an other lib ? ). There is the function TextOutA to display a score, but again I cant print it out because I don't have a string so it can print it from. 回答1: do i need to include an other lib? - Probably. You need msvcrt.inc and msvcrt.lib for

x86 assembly - how to show the integer 2, not the second ASCII character

我怕爱的太早我们不能终老 提交于 2019-12-13 03:33:41
问题 I have this code: .386 .model flat, stdcall option casemap :none include \masm32\include\windows.inc include \masm32\include\kernel32.inc include \masm32\include\masm32.inc includelib \masm32\lib\kernel32.lib includelib \masm32\lib\masm32.lib .data num dd ? .code start: mov eax, 1 mov ebx, 1 add eax, ebx push eax pop num sub num, 0 invoke StdOut, addr num invoke ExitProcess, 0 end start What it is supposed to do is do 1+1 and then display the result on the console. When I run it it displays

how to change linker setting in MASM32

不问归期 提交于 2019-12-13 02:11:51
问题 I am using MASM32 editor in windows 7 (64 bit). By default my linker is "Incremental Linker Version 5.12.8078" which is not linking my programs. I want to use this linker "Microsoft (R) Segmented Executable Linker Version 5.60.339 Dec 5 1994". Please tell me how to change my MASM32 setting and make it the default linker 回答1: Load \masm32\menus.ini in an editor (you can use the MASM32 Editor). Scroll down to &Run Program,"{b}.exe" [&Tools] Insert two lines: &Run Program,"{b}.exe" - Build 16

Get structure size within MASM

情到浓时终转凉″ 提交于 2019-12-12 04:36:47
问题 I am wondering how to get the size of a structure at compilation time in MASM. Here is the C equivalent code. struct Point { int x; int y; }; printf("Point Stucture size %d\n", sizeof(struct Point)); 回答1: I'm assuming that you'll be declaring the struct in your assembly code. According to the masm32 documentation you've got the following operators available to you: LENGTHOF variable SIZEOF variable SIZEOF type LENGTH expression SIZE expression Description The LENGTHOF operator returns the

Project Options in Qeditor of MASM32 isn't working

亡梦爱人 提交于 2019-12-12 01:52:21
问题 I Have Masm32 and I am using Qeditor. None of the options in Porject menu work. As an example if I click "Build All" nothing happens (no window, no files are build in the file directory, nothing happens). I have c:\masm32\bin on my path so thats not the problem. 回答1: I too use MASM32 and, for a while, used Qeditor. I had the same problem as you, but overcame it by writing my own batch file for assembling projects. Eventually I switched to Notepad++ for writing code and eliminated Qeditor