Click here to Skip to main content
15,885,365 members
Everything / Programming Languages / ASM

ASM

ASM

Great Reads

by codestarman
X86/ARM emulator written using C++ and assembler for the .NET environment.
by Ryan Scott White
CudaPAD is a PTX/SASS viewer for NVIDIA Cuda kernels and provides an on-the-fly view of your Cuda code.
by Dr. Song Li
This is a note on how compilers implement function calls to pass the parameters to and get the return value from the called functions.
by Jose A Pascoa
Rolling up a practical solution

Latest Articles

by shunninghuang
C# arcade emulator, ROM hacking
by Jonathan Chapman-Moore
How to build Microsoft Disk Operating System 1.25
by Dr. Song Li
This is a note on how compilers implement function calls to pass the parameters to and get the return value from the called functions.
by Sarthak S
Assembly inspection and hacking with windbg

All Articles

Sort by Title

ASM 

7 Aug 2014 by Jerry.Wang
Modify methods' IL codes on runtime even if they have been JIT-compiled, supports release mode / x64 & x86, and variants of .NET versions, from 2.0 to 4.5.
24 Aug 2013 by sid2x
So I have 2 questions here, (Sorry for posting 2 questions in one Article)1) Is there a BIOS routine that can receive a file from a URL like : www.domainname.tld/file.format2)This one is for a creating a C Library out of assembly instructions like :;===============Assembly Print...
24 Aug 2013 by pasztorpisti
1. Some BIOSes have some extensions but I don't know about any standard bios functions that do so high level stuff like connecting with TCP to a site and downloading file with HTTP protocol... In my opinion PCs should support user friendly network installs (like MACs) but we have to wait with...
30 Jun 2015 by Toby Opferman
Building your own 64-bit Windows Extender
30 Dec 2006 by akyprian
Maximum performance, reduced size applications using 32-bit assembly is easy
29 Jan 2019 by Zuoliu Ding
A discussion on some basic practices highly recommended in Assembly Language Programming.
19 Jun 2011 by Rimon Orni
Code injection cave for 64 bit processes
1 Nov 2017 by Jose A Pascoa
Rolling up a practical solution
15 Aug 2012 by Arman Aşçı
Time division multiplexing between 6 x 7-Segment displays control with Parallel Port and x86 assembly.
8 Oct 2022 by reverser69
hi all i want to do an inline asm and i want to see if a given location of memory is non-writable-executable code or its writable data; if its data, skip the overwrite. i want to do it in pure asm + win api. i partially achieved it by checking...
8 Oct 2022 by merano99
Access to main memory is usually realized with an MMU. Since the MMU is a critical resource, the operating system takes care of it. Access to the MMU requires operating system rights and good hardware knowledge. If you had access to the MMU, you...
29 Dec 2013 by Sergey Alexandrovich Kryukov
Please see this overview: http://smendes.com/el31p/parallel.htm[^].It is written in Pascal (I think, this is Borland Turbo Pascal), but it is reduced to use some physical address in the real mode of 8086 and ports, so this is what you need to produce your Assembly code.Something else can...
21 Feb 2013 by PrafullaVedante
Hi,We have our application which is written in C++. At some places we check if any debugger is attached to the application by following code char IsDbgPresent = 0;__asm {mov eax, fs:[30h]mov al, [eax + 2h]mov IsDbgPresent, al}if(IsDbgPresent){ MessageBox(NULL,...
21 Feb 2013 by Sergey Alexandrovich Kryukov
The 32-bit registers are extended with 'r' registers, so 64-bit extensions of EAX, EBX, ECX, ESP are named RAX, RBX, RCX, RSP, etc. Please see:http://en.wikipedia.org/wiki/X86-64[^],http://forum.codecall.net/topic/52853-x86-64-register-chart/[^].—SA
21 Feb 2013 by Matthew Faithfull
You're correct. Inline assembler is not supported by Microsoft's 64bit compilers and there is no direct equivalent in C or C++ for the inline assembler you show. Partly because there is no way to address the FS register even indirectly from C/C++ code. You can use MASM with a separate assembler...
21 Feb 2013 by parths
Did you try Intrinsics[^]?Something like this could work:unsigned long tmp = __readfsdword(0x30);IsDbgPresent = *((char *)(tmp + 0x2));I'm not sure if the offsets would change for 64 bit code, I tried to search but couldn't find any info on that.
6 May 2010 by LittleYellowBird
It would take a lot of time for someone to go through all your code and try to track down the problem for you, it would help a great deal to isolate the problem further and post a smaller section of code. Also, I notice there are no comments in the code, this also makes it harder for...
21 Jun 2023 by terrable
I have a project that I've been struggling with. Half of my program works and the other half doesn't but there aren't any errors.Process A and B work but C D AND E do not. Can someone please help me. Here is what i'm trying to doPerformance RequirementsWrite a program that will perform...
4 Dec 2021 by Oso Oluwafemi Ebenezer
Trying my hands out in the world of assembly and will like to ask some few questions about FASM before I waste my time and sanity in learning it.1. I read that FASM can output COFF .obj file. Can this .obj file be linked together with other .obj files generated from other programs like GoRC...
4 Dec 2021 by OriginalGriff
Personally, I have never even heard of FASM - I don't even know what processor it targets! I can find out with Google, but ... that's irrelevant, because it's indicative of the problem: this isn't a FASM support site, and it's very unlikely that...
12 Jan 2016 by shijo joseph
An ADO.NET Layer for SQL Server and Oracle which makes it easier for interfacing with database
28 Jun 2023 by Dr. Song Li
This is a note on how compilers implement function calls to pass the parameters to and get the return value from the called functions.
9 Aug 2012 by Dr. APo
This article presents an experimental platform consisting of two computers to conduct hardware programming and research, unrestricted by any Operating System.
20 Oct 2011 by eladweiss06
Hi,Does anyone know if such a program exists, or at least has a googleable name?For example I want to give it input like:5D 5B 8B 4C 24 30And get output:5D pop ebp5B pop ebx8B 4C 24 30 mov ecx, dword ptr [esp+30h]Thanks,Elad
20 Oct 2011 by AspDotNetDev
This is called a disassembler.
5 Aug 2014 by Babu_Abdulsalam
A Simple Profiler for C++ apps on x64 platform
8 Sep 2008 by flyhigh
Introducing a simple method to display a transparent PNG file.
6 Apr 2011 by dariush_ha
heyI am totally new in assembly programming, and I don't know anything about assembly programing and in this stage I'm just trying to get familiar with ADD, MOV, SUB and etc statements but i don't know how can I run my simple codes???In book which I'm studying from it, wrote that i...
6 Apr 2011 by OriginalGriff
Have you installed an assembler? If not, that would be a good start!If so, is it pathed so that Windows can find it? In you command prompt, type "path" and press enter. Is the folder assembler executable is in on that list?"i guess i've been told that every windows has an assembler!! do...
6 Apr 2011 by Fredrik Bornander
One approach is to use a C++ editor, like Visual Studio C++ for example (the express edition is free).By using the __asm keyword you can write assembly code inside your C++ function and this will also give you neat things like the ability to use the debugger and breakpoints.A simple...
4 Jan 2013 by Colin Eberhardt
This article describes the development of a Windows Phone 8 Run Tracking application that uses a number of the new Windows Phone 8 features.
19 Aug 2007 by zhzhtst
This article supplies the source code of the _ValidateEH3RN function in Structured Exception Handling.
16 Oct 2010 by samad_najjar
hi my friend could you explain for me about BCD EBCEDICASCIIin assembelythanks
16 Oct 2010 by OriginalGriff
None of them have anything to do with Assembly: they are ways of encoding information.BCD : Binary Coded Decimal. Each nibble (4 bits) holds the values 1 to 10. The values 11 through 15 are not used and are considered invalid. Not used too much these days, since hardware divide instructions...
3 Apr 2012 by ssssdaaads
hI,do anoyone have links for free downloading avtar and walter book about microprocessor .AND i'am studing microprocessor intel Bbrey but i have problems in its exampledo u have any advice to me and and do u khow any useful book about this subject.please tellmethanks
3 Apr 2012 by OriginalGriff
No.Since this is a book that is currently on sale, any such link would be in breach of copyright, and thus illegal.
3 Apr 2012 by Richard MacCutchan
Yes, I have some advice: if you wish to succeed in this business then you need to be prepared to invest in yourself. That means spending your own money on technical references, rather than expecting everything for nothing.
8 Jul 2013 by JP van Mackelenbergh
Abstracting the ORM Framework via Repository/Unit Of Work patterns
2 Feb 2018 by ed welch
How to accelerate software skinning with VFP assembler
28 Mar 2013 by AshakiranBhatter
Hi,As a very beginner to assembly language all I am trying to do is to access a globally declared string in assembly program and print its content character by character( for now i m trying to print only first character...for testing purpose) but something is really going wrong. Could you...
28 Mar 2013 by Sergey Alexandrovich Kryukov
This is the solution for real mode, DOS (required to use int 0x21, which is the DOS "system call"): http://montcs.bloomu.edu/Code/Asm.and.C/Asm.Nasm/hello-in-assembly.shtml[^].If this is not it, please provide further detail on your platform; please see my comment to the question.You...
5 May 2013 by Rasool Ahmed
Hello guys,I have problem with reading or writing files in C++ and MASM32. The problem is when calling the ReadFile or WriteFile the program give an exception saying "Access violation at address 0000".This is the code in MASM32: ...
5 May 2013 by KarstenK
i guess you havent open an file. Did you check the return codes of the API.Try it first in C and "show your code" ;-)
5 May 2013 by KarstenK
at first i would use a complete path for opening the file and think about all flags.What is the value of BytesWritten?AND CHECK ALL API-RETURN VALUES :mad:
5 May 2013 by Volynsky Alex
Try to use something like: TCHAR Buffer[256] = "Hello"; .... hFile = CreateFile("rw.txt", GENERIC_WRITE, 0, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { printf("ERROR %x \n",GetLastError()); ...
6 May 2013 by Rasool Ahmed
I finally found the problem, the problem was me :)The problem is when I call WriteFile or ReadFile the function will write on BytesRead or BytesWritten which means that I must give the effective address of the variable.In MASM32: PUSH 0 ; /pOverlapped = NULL ...
9 Jun 2010 by ReymonARG
I am making my own Allegro Class so is more easy but I am having problem with ESP, I am getting Access Violation.void RBAllegro::AddText( FONT *f, int x, int y, int color, int bg, const char *format){ //textprintf_ex( m_Buffer, f, x, y, color, bg, format ); __asm { ...
9 Jun 2010 by Niklas L
From the docs:void textprintf_ex(BITMAP *bmp, const FONT *f, int x, int y, int color, int bg, const char *fmt, ...);Aren't you missing something? ... hint ...Why do you use assembler? That's just crazy. You won't be able to optimize a function call.Edit: ...or maybe not that...
9 Jun 2010 by Stephen Hewitt
Firstly, why the hell are you doing this? The compiler will do a getter job with the added advantage that it gets it right.You haven't provided enough information. What's an "Allegro Class"? What's the calling convention of textprintf_ex (e.g. __stdcall, __cdecl or what)? Since the call...
9 Jun 2010 by Aescleal
Look at the va_start, va_args and va_end macros. They're designed explicitly for handling variable parameter lists, including passing them onto other functions taking variable parameter lists.Now the sermon...Why, in C++, are you using variable parameter lists when the prevailing model...
7 Oct 2016 by digital performance
This article shows how to access Windows API with plain x64 assembly programming language (MASM style). It shall also give an overview, how to apply some programming techniques like OOP and multithreading on a low level.
24 Sep 2014 by Member 10853075
.model small.stack 100h.datamsg db 'enter 1st number:','$'msg1 db 'enter 2nd number:','$'msg2 db 'sum is:','$'.codemain procmov ax,@datamov ds,axmov ah,09hlea dx,msgint 21hmov ah,01hint 21hmov bl,almov dx,0ahmov dx,0dhmov ah,09hlea dx,msg1int 21hmov...
24 Sep 2014 by OriginalGriff
Because 30 hex is the code for a '0' character - so it converts '1' to a number one, '2' to a number two and so forth. Do note that this won't help with hex values 'A' to 'F' - it will not give you the right value at all.Google ASCII table for a better idea how characters are different from...
2 Nov 2011 by Rene Pally
Advanced .NET Debugging Extracting Information from Memory
17 Sep 2017 by leon de boer
Introducing SmartStart something like a BIOS for the Pi
22 Aug 2013 by idobry
Hey Guys,I'm trying to fint the AVG of this array : 1742,1065,-67,-2988,-796,-1000,31,-67,-100,1180I belive my method to change the number from POS to NEG is worng.my prog need's to calculate the above array then print massege if the AVG is NEG or POS, and it always print that the AVG is...
22 Aug 2013 by pasztorpisti
ADD works regardless of the sign of numbers. Do the following:- before the loop put zero into ax- in the loop do the following: add the value of [si] to ax and then increase SI with 2- the rest of your code looks fine* using the avg memory location is unnecessary* xor-ing something...
9 Nov 2008 by Joshua Tully
A look into what goes into the area of preventing reverse engineering, and gives developers some functions and ideas about preventing reversing engineering of their programs.
2 Apr 2010 by Nish Nishant, Professor Cuthbert Calculus, Glenn Quagmire
This paper is a summary of a research exercise conducted in conjunction by Nish Sivakumar, Professor Cuthbert Calculus, and Glenn Quagmire.
3 Sep 2008 by RockmanZero
An extendable report editor. You can simply add your own controls without recompiling the program or writing annoying plug-ins.
16 Sep 2015 by minor_28
Masm code editor with syntax highlighting, etc.
5 Sep 2015 by Thinira
In this tip, we will discuss how to setup Angular 2.0 in Visual Studio and write a very basic “Todo” application.
5 Apr 2007 by akyprian
Display simple, animated GIFs in your applications using the AniGIF custom control (packaged as a DLL and a static library).
8 Sep 2004 by Marcello Cantelmo
Simple check for break-points on eXecution of a system debugger!
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!
14 Oct 2008 by AlexAbramov
In this article, I will talk about the theories and implementations of API hooking. API hooking is a powerful technique that allows someone to hijack a function and redirect it to a custom one. Anything can be done in these functions before passing control back to the original API.
24 May 2013 by Rasool Ahmed
Hello guys,I'm using MapViewOfFile to map a file and try to edit its data and save it on the file.The problem I have extra data to the file required to expand its size.So, how to append data to the end of memory mapped file using CreateFileMapping and MapViewOfFile?
24 May 2013 by Santhosh G_
Try to use the below method it create file mapping with large size and update the contents.DWORD nSize = GetFileSize( hFile, &nSizeH ); int nRequiredSize = nSize + nAddedSize;// New size is calculated for file mapping. HANDLE hMapping = CreateFileMapping( hFile, 0, PAGE_READWRITE,...
17 Feb 2015 by Jan Dolinay
This article describes software library for the FRDM-KL25Z board which allows writing programs for this board using the Arduino API.
25 Jul 2015 by Nafees Hassan
Hi!It's my first question on CodeProject (I left Stackoverflow).I've been thinking about making my own programming language for Windows but I don't even know what the exe files actually are(!). Sometime ago, somebody told me that they are binary, but that for sure is wrong, because the same...
25 Jul 2015 by OriginalGriff
Windows exes are written in a range of languages: if it compiles to an EXE file, it's been used.So...assembler, C, C++, C#, VB, Pascal, Fortran, Cobol, BrainF*ck, and probably a couple of dozen others have been used. Even Windows itself is written in C, C++, C#. Some parts probably still in...
25 Jul 2015 by Wendelius
There's actually no single type for an EXE other than it (most often) is an executable file. The actual type of the program is defined in the header in the file. It can be a directly executable file which I believe you mean with binary or it can be a file that is some intermediate language such...
26 Jul 2015 by Richard MacCutchan
Yes, exe files (like all files) are binary. However, the structure of the binary content is in a special format that the Windows OS can read and load into memory to be run. Google will find you papers that explain the structire of intermediate .obj files, which are created from source code. Also...
26 Jul 2015 by Sergey Alexandrovich Kryukov
In addition to existing answers:First of all, files like .EXE and .DLL are not assemblies. They are all executable files in the form of PE file. From the .NET standpoint, they are modules of the assemblies, not assemblies themselves.Please...
20 Feb 2011 by Q8psu
Hello my problem is how to convert from mph to kmh on ARM assembly language by multiply by 1.6 but you cant put a number with decimal point so i figure out with a solution since you cant multiply by 1.6, for example if you have 30mph you want to convert it to kmh solution for...
6 Nov 2019 by Member 11004573
Hello Everyone!i am Trying to Sort The Array In Descending Order In Assembly Language But i Got Still Two Error 1:**Error** Array123.asm(12) Relative jump out of range by 007Fh bytes2:**Error** Array123.asm(119) Relative jump out of range by 0080h bytesBoth Error About the Loop...
10 Dec 2014 by Kornfeld Eliyahu Peter
You have two options:1. Make all your code use far pointers (it means compiler will use word/dword for address computation)Main Proc FAR2. Make only the loop use far pointersjcxz FAR Comp
3 Aug 2016 by deck_bsd
Hello,Somebody can explain me these lines ?buffer: db 'hello, world'times 64-$+buffer db '_'result : "hello, world____________________________________________________"I understand these lines below, it makes sense (addresse where we stand minus addresse of the beginning of...
3 Aug 2016 by Richard MacCutchan
buffer: db 'hello, world'times 64-$+buffer db '_'Assume the location of buffer is 1000, then the location of times (identified by the $ sign) is 1012.So:64 - 1012 = -948-948 + 1000 = 52The expression effectively calculates the number of dashes to add to the previous string to...
29 Jul 2013 by Sergey Alexandrovich Kryukov
Even if such product existed, I would not trust it. Why? Simply because this is a typical incorrect problem.You can "convert" C to ASM (for some fixed instruction-set architecture and OS, of course), but not the other way around. Here is why: on the level of assembly language, one can do...
26 Aug 2014 by Curtdawg99
Hello, I have wanted to do this project for a while and that is to make a boot able kernel from ground up and i mean from literally nothing. I was thinking that maybe 16 bit x86 real mode assembly language would be a good choice for this. This would be for educational purposes and it...
26 Dec 2011 by Drag0nHunter
ASM.Net a assembly x86 emulator which emulates the language the managed way
13 May 2014 by Sumon562
I am using asp .net C#. I can not clear the textbox. I tried the following way:Textbox1.text="";Textbox1.text=string.EmptyBut it does not work. Please help me.
13 May 2014 by Sneha Gupta
Please post the code here that you are using for TextBox.This code will work perfectly. Textbox1.Text = "";
7 Apr 2014 by Archana Venkatramani
I'm using asp Menu Control. I was binding Menu items from database. However, I've got a requirement that each MenuItem's Background color must be different colors(i.e) Each menu will be displayed in different colur. Is this possible to do that? or Suggest me any other method to do.Many...
7 Apr 2014 by Nagaraj Muthuchamy
Yes, same workaround is discussed here.http://stackoverflow.com/questions/705440/asp-net-menuitem-individual-styles[^]
7 Apr 2014 by Nagaraj Muthuchamy
public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { DataTable dt = new DataTable(); dt.Columns.Add("pkid"); dt.Columns.Add("MenuName"); ...
14 Jul 2014 by josh-jw
Hi All,Asp file upload control not working when i get response from handler. first time its working fine, when i clicked on file upload , i can able to select file but after that nothing happening. please help to rectify the issue.
7 Jan 2012 by royayesepeed
if divide zero in assembly happend show this message='SORRY' dont show divide zero;please help me?i need
8 Jan 2012 by Richard MacCutchan
This question[^] may be what you are looking for.
25 Feb 2013 by vishseh
I am a BEng Electronic student,can you find where I can download compilers easily precisely K.E.I.L compiler?Thanks
25 Feb 2013 by Jibesh
I have googled and found this [^] for you this time. do not expect the same next time.Compiler Kit is here[^]
17 Oct 2010 by Sauro Viti
Here you are![^]
18 Oct 2010 by CPallini
NOP ; Do nothing. :rolleyes:
17 Oct 2010 by Maricar Molina
I want a sample code of assembly language with description of each each code.
17 Oct 2010 by Yusuf
Let me Google that for you[^]
9 Oct 2012 by Andrew_Borg
Hi,Lately I have been Studying some Assembly language, I have a question about the DB Decleration on the .Data Segment of an Assembly Application.Till Now, I always declared a Byte by doing So:Number db "Please enter a number : ",0(Name) db (String), 0Today, I found an...
9 Oct 2012 by OriginalGriff
:laugh:They are bytes values added to the end of the string, that cannot be added by normal typing. In this case a carriage return, a line feed and a terminating null character.In C-type languages, this would be the equivalent of writing:char* Hello = "Hello World!\n";It is a good idea to...