Skip to main content

Posts

Showing posts with the label Assembly

ASM: Convert int to string in Assembly

This post shows how to convert int (DWORD) to string using MASM library dwtoa. There seems to be a bug in dwtoa as it can only handle 2147483647 instead of 4294967295 which is the maximum size of DWORD (32-bit). The code for dwtoa checks for a negative number which is not needed for DWORD. Note that DWORD is defined as 32-bit unsigned. Pre-requisite: Install MASM To assemble: \masm32\bin\ml /c /Zd /coff int2string.asm To link: \masm32\bin\Link /SUBSYSTEM:CONSOLE int2string.obj

ASM: Basic Windows application in Assembly

This post shows how to create Windows application using Assembly. Pre-requisite: Install MASM To assemble: \masm32\bin\ml /c /Zd /coff basicwindows.asm To link: \masm32\bin\Link /SUBSYSTEM:WINDOWS basicwindows.obj Reference(s): This is shamelessly using contents from Windows Assembly Programming Tutorial  by JEFF HUANG (huang6@uiuc.edu)

ASM: Basic usage of assembly instructions

This program shows usage of basic assembly instructions add, cmp, dec, jnz, jz, mov, mul, pop, push, xor Pre-requisite: Install MASM To assemble: \masm32\bin\ml /c /Zd /coff basicinstructions.asm To link: \masm32\bin\Link /SUBSYSTEM:CONSOLE basicinstructions.obj Reference(s): This is shamelessly using contents from Windows Assembly Programming Tutorial  by JEFF HUANG (huang6@uiuc.edu)

ASM: Hello world using MessageBox in Windows assembly

MessageBox Hello World in Windows assembly using MASM Pre-requisite: Install MASM To assemble: \masm32\bin\ml /c /Zd /coff hellow.asm To link: \masm32\bin\Link /SUBSYSTEM:WINDOWS hellow.obj Reference(s): This is shamelessly using contents from Windows Assembly Programming Tutorial  by JEFF HUANG (huang6@uiuc.edu) x86 Disassembly - link