Click here to Skip to main content
15,867,308 members
Everything / Programming Languages / MASM

MASM

MASM

Great Reads

by Jose A Pascoa
Part 1 - Using DMath from C#
by John Jiyang Hou
A List data structure implementation in MASM Assembly with C function realloc
by altomaltes
This code calculates square root of an integer on a few assembler code lines.
by Kristoffer Blasiak
Automated proxy DLL generation with 64 and 32 bit DLL support

Latest Articles

by Jonathan Chapman-Moore
How to build Microsoft Disk Operating System 1.25
by Shao Voon Wong
Guess what these assembly instructions with the same source and destination operands do?
by Carles Cortés
Macros to help assembler programmers to improve source code (continued)
by Carles Cortés
Macros to help assembler programmers to improve source code

All Articles

Sort by Score

MASM 

5 Mar 2017 by Jose A Pascoa
27 Feb 2016 by John Jiyang Hou
A List data structure implementation in MASM Assembly with C function realloc
5 Jun 2019 by altomaltes
This code calculates square root of an integer on a few assembler code lines.
28 Mar 2017 by Kristoffer Blasiak
Automated proxy DLL generation with 64 and 32 bit DLL support
4 Dec 2021 by Shao Voon Wong
Guess what these assembly instructions with the same source and destination operands do?
15 Feb 2024 by Jonathan Chapman-Moore
How to build Microsoft Disk Operating System 1.25
4 Mar 2016 by John Jiyang Hou
An algorithm to determine if a point is inside a 3D convex polygon for a given polygon vertices in MASM Assembly
14 May 2012 by Jochen Arndt
The C style '0x' hex prefix is not supported by MASM. Use the 'h' postfix:mov ah, 0ehmov al, '!'int 10h
7 May 2023 by merano99
As Richard already pointed out, there are quite a few Windows system calls in the rest of the code and it would certainly be possible to get the pointer without assembler, but if you really want to, you can do it with VisualStudio and assembler. ...
22 Mar 2020 by phil.o
Image data type is binary content. JSON, on the other hand, is text-based. The simplest solution would be to encode the binary content as Base64 strings on the mongodb side, and then decode the Base64 strings back into byte arrays on the MySQL...
29 Oct 2021 by deXo-fan
Hello, I've noticed that whenever you write a program in Visual Studio that uses structs (or classes), the assembly code generated doesn't contain a single MASM STRUCTURE, even though it would perfectly fine. Instead, VC++ does something I...
26 Oct 2021 by den2k88
Assembly does not have structs. MASM does but it is its own interpretation of Assembly. Indeed the name itself means Macro ASseMbler and STRUCT is one of these macros, provided to help the developers. This kind of additional keywords is normal...
14 May 2012 by Reza Oruji
;bios routine direct callingpage 100,100title 'bios routine'.model small.stack 64.data.codemain proc far mov ax,@data mov ds,ax mov es,ax ; calling bios routine to show a charaacter on the screen mov ah, 0x0e mov al, '!' int 0x10 ;return to...
12 Dec 2012 by youngtala
i just have a task for dig out a algorithm in the software,but i only have a *.idb file in the hard disk.So i need a *.exe file which can be traced by the ida software,How can i do to this work ?Can anybody give me help!I am grareful for your help!Thank you !
18 Jan 2013 by Rasool Ahmed
Hi all, I have a problem!!!I have format my computer and reinstall visual studio (I have both Professional and Express) and I tried to build a little masm program, but when I click on properties of the project I found "Microsoft Macro Assembler" missing.Is there any way to get it back??? Is...
18 Jan 2013 by H.Brydon
If you reloaded your computer, you will also need to reinstall MASM. You can find the installer here[^].
5 Jan 2014 by Member 10406842
STSEG SEGMENT DB 64 DUP (?)STSEG ENDSDTSEG SEGMENT;From Data segmentORG 10HData_in DB 3FH,21H,0C4H,0A2H,0FFH,0E2HORG 28HCopy DB 6 DUP (?)DTSEG ENDSCDSEG SEGMENTMAIN PROC FARAssume CS:CDSEG,DS:DTSEG,SS:STSEGMOV AX,DTSEGMOV DS,AX;From Code segment MOV...
13 Apr 2014 by Member 10153188
How do I return the maximum number of a SWORD array Given: ESI holds the base of this array, and EBX holds the number of elements in the array. Returns: AX has the maximum This is what I have so far: ArrayMax PROC L1: cmp ax, [esi] JL L2 ;ax
6 May 2014 by Andrew Rinne
I'm having trouble understanding how to get a sum of two numbers that are in ascii format.Im using the following interrupt to get two 8 digit numbers from the user: MOV AH, 0AH MOV DX, OFFSET numset1 INT 21HThe inputs are stored in two variables as numset1 &...
6 May 2014 by OriginalGriff
This sounds seriously like homework, so I'll give you no code!But it isn't complex, what you need to do is convert each string you read from the use into an integer, then add them, them convert them back to a strong to output them. Clearly, you are having difficulty with the first bit!...
6 May 2014 by Andrew Rinne
Just had to convert both inputs to BCD by subtracting 30 from each byte.Then add the BCD together. Then convert the BCD sum back to Ascii bu using an AND AX, 03030H to add 30 to each byte.
6 May 2014 by Andrew Rinne
Refer to the following data, with words properly defined in reverse sequence:.DATA DATA1 DW 4563H DW 3DF4HWhat comes first if you were to define DATA1 as a Double Word?45633DF4H OR 3DF44563H
29 Mar 2017 by Patrice T
We do not do your HomeWork.HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them. Any failure of you will...
29 Mar 2017 by CPallini
Did you read, at least, a MASM tutorial? Just using Google you may find many resources on the web[^].
20 Oct 2017 by NoviceCoder871987
I have a weird issue with Dialog box on Windows XP it doesn't draw correctly, The listview doesn't redraw unless i do some thing that forces repaints like clicking on the size boarders then the listview show. But if i move the application somewhere on screen it goes hidden again. This picture...
20 Oct 2017 by NoviceCoder871987
Issue is fixed by using SetParent on listview and the parent set is the main dialog and when switching between tabs using SetParent to return the parent of listview to the sub dialog so the code still hide it with ShowWindow. Now the Listview always show on top. No flickering. Very good.
22 Mar 2020 by shiva saikrishna
Hi, i want to migrate all my data from mongodb to mysql. i am able to do everything expect images data. how to transform mongodb images data to mysql database. What I have tried: exported mongodb data as json and then converted the json data to...
26 Mar 2020 by CPallini
That's assembly code, not C++. And you may run it yourself: there are tutorials available on using the Irvine32 library.
26 Mar 2020 by Richard MacCutchan
loop L3 mov ecx , count loop L1 call dumpregs main endp end main You are missing loop L2
23 May 2021 by OriginalGriff
Compiling does not mean your code is right! :laugh: Think of the development process as writing an email: compiling successfully means that you wrote the email in the right language - English, rather than German for example - not that the email...
23 May 2021 by Rick York
There appear to be several errors in the code. Here's one : for(i=0;i
23 May 2021 by Patrice T
Many errors there. Sample int s= 79; int n= 10; int avg_min=(s/n); // result will be 7 but one can expect 8 as a better answer since real division is 7.9 // if you keep integers, a solution is int s= 79; int n= 10; int avg_min=((s+n/2)/n); //...
6 May 2023 by Richard MacCutchan
Why not use the features provided: NtQueryInformationProcess function (winternl.h) - Win32 apps | Microsoft Learn[^] ?
7 May 2023 by WOLF 2018
So I have been working on learning the windows low end side of thing and I created some asm to access the peb without using any library's. This is because my project has /NODEFAULTLIB on and no inputs in Visual Studio So my project is about...
5 Jul 2016 by T. Herselman
2 years ago I went OCD on memcpy/memmove; and wrote over 140 variations (80,000 lines of code) of memmove; testing, disassembling, optimizing and benchmarking them on multiple machines. I never released the article or the code; until now! So I need to do it before I loose my mind!
17 May 2016 by stevemk14ebr
A modern, universal, c++ hooking library.
23 Feb 2016 by Zuoliu Ding
A discussion on some MASM Macro usages, including ECHO directive, parameter type/size check, and repetitions with location counter $.
29 Jan 2019 by Zuoliu Ding
A discussion on some basic practices highly recommended in Assembly Language Programming.
4 Oct 2017 by CMalcheski
Ditching the slowdowns and applying a little elbow grease can create dramatic speed improvements in GDI image blending.
23 Apr 2017 by Zuoliu Ding
A discussion on how Visual C/C++ code works with bit-wise logical and shift operators, as well as a loop optimization.
13 Jan 2018 by Pritam Zope
In this article we will create a simple kernel such as printing HelloWorld first and then writing functions for printing numbers, Keyboard I/O, Box Drawing GUI, and Tic-Tac-Toe game in kernel in C
26 Mar 2021 by Zuoliu Ding
A discussion on optimization using SIMD instructions including MMX, SSE, and AVX in x86 Assembly Language Programming
25 Sep 2012 by Palavos
An example of how to program in assembly by using Visual Studio 2010 or 2012
9 Sep 2021 by Carles Cortés
Macros to help assembler programmers to improve source code
8 May 2014 by leon de boer
And we will give you a hint we can't answer the question anyhow without knowing what processorWe will give you a bigger hint google the word "Endian"
9 Sep 2016 by Jose A Pascoa
SIMD instruction sets may expect a special alignment of memory, but when that memory is on the stack MASM does not provide alignment facilities.
20 Sep 2021 by Carles Cortés
Macros to help assembler programmers to improve source code (continued)
26 Mar 2020 by Member 14784282
Include Irvine32.inc .data count dword ? string byte 0ah , "it is internal loop",0ah,0 string1 byte 0ah , "it is middle loop",0ah,0 string2 byte 0ah , "it is external loop",0ah,0 .code main PROC mov ebx,0 mov ecx,3 ;external loop value L1: mov...
2 Apr 2015 by Reuben Cabrera
i have this code.model small.datavar db '@', '$'delaytime db 10total db 0col db 40row db 12.stack 100h.codedelay proc mov ah, 00 int 1Ah mov bx, dxjmp_delay: int 1Ah sub dx, bx cmp dl, delaytime jl jmp_delay retdelay...