Click here to Skip to main content
15,885,216 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 Score

ASM 

1 May 2014 by codestarman
X86/ARM emulator written using C++ and assembler for the .NET environment.
28 Mar 2023 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.
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.
1 Nov 2017 by Jose A Pascoa
Rolling up a practical solution
8 Jun 2017 by CMalcheski
How to Create a Complete DirectX Game in Assembly Language
17 Sep 2017 by leon de boer
Introducing SmartStart something like a BIOS for the Pi
5 Feb 2017 by Gregory Morse
UTM based on mov is Turing-complete paper x86 and x86-64
26 Jun 2018 by CMalcheski
A Full DirectX Sample Application Created in Pure Assembly Language
31 Aug 2016 by Sheshnath Kumar
This article will find out a solution to serialize/deserialize object by reference at server and client, also will serialize/deserialize objects having circular references.
11 Dec 2016 by Russ Osterlund
Code Obfuscation in 64-Bit Land
9 Jul 2012 by perilbrain
A simple technique to integrate a custom build tool in VS 2010.
18 Jan 2017 by leon de boer
Third in the series of frustrations and adventures with the Raspberry Pi
8 Jun 2017 by David A. Gray
Historically, ETW has been portrayed as having a very steep learning curve, along the lines of the effort required to summit Everest. Realizing its potential value, I set about to reduce the effort to that required to summit Pike's Peak.
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.
23 Apr 2019 by Member 13737597
This article shows how to automatically catch memory access (read /write) for some memory region and log these changes into file
14 Dec 2019 by Alexandre Bencz
With this new OrangeC/C++ compiler back-end, you can compile your C code to .NET.
5 Mar 2017 by Jose A Pascoa
14 Jun 2017 by CMalcheski
Part II - Laying the Foundation for the Migration to Assembly
4 Mar 2016 by JorgeLuisOrejel
This article is based on Chapter 2 of my unpublished textbook “Applied Algorithms and Data Structures.”
28 Dec 2020 by CPallini
Fast integer square root computation in 8051 assembly
13 Feb 2013 by nick.p.everdox
Working alongside Windows KPP (patchguard) and hooking system services
12 Jul 2016 by David A. Gray
Share Win32 string resources without the risk of conflicting resource IDs
5 Jun 2019 by altomaltes
This code calculates square root of an integer on a few assembler code lines.
14 Nov 2019 by CPallini
An assembly implementation of the AES-128 cipher algorithm for the 8051 microcontroller
28 Mar 2017 by Kristoffer Blasiak
Automated proxy DLL generation with 64 and 32 bit DLL support
30 Jun 2009 by siyahdeniz
How to use debug
17 May 2011 by Omar Al Zabir
Silverlight webservice references get harcoded in ServiceReference.ClientConfig. The URLs get set to your development servers. But when you deploy live, the URLs don't match. Here's a way to dynamically change the URL of the service based on which website the Silverlight app is loaded from.
27 Mar 2013 by nick.p.everdox
Usage of Intel/AMD extended processor features.
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...
23 May 2013 by Sergey Alexandrovich Kryukov
Very briefly:Generics: it depends on platform and technology. In all cases, generics are not represented in machine code. In technologies like Ada or C++ (not for .NET), it is like preprocessing. As all the instantiations of generic types and methods are statically known through the whole...
7 Dec 2013 by Sergey Alexandrovich Kryukov
I'm afraid the Solution 1 and Solution 2, correct in principle, did not uncovered the essence of things. Here is the trick: the binary representation of integer numbers is specially designed the way ignoring the difference between unsigned numbers. This representation is dominated in almost all...
2 Oct 2015 by Farhad Reza
Here, we will create a simple Window using Assembly Programming Language and also gather knowledge about various assembly language instructions.
5 Mar 2010 by Sandeep Mewara
1. If your website was not Ajax Enabled earlier, then you can still convert into one by adding necessary configurations in your web.config file. Easiest way would be to create a dummy 'Ajax enabled website' and copy the missing tags from this website into old one that you want as Ajax...
27 Dec 2010 by OriginalGriff
Try declaring them with the volatile keyword - It should be a good little compiler then... :laugh:
7 Feb 2011 by Nish Nishant
C# targets the CLR, so the closest assembly language equivalent from a .NET perspective would be MSIL. And yes, you can convert C# to readable MSIL. There are several tools that do that including free ones.If you really want to learn assembly language, then you need to pick up a good book...
25 Apr 2011 by OriginalGriff
Phew! You get my 5 for the most ambitious, sensible question I have yet seen! :laugh:That is a heck of a lot of work, and in a lot of disciplines. Some of those 5 areas are the subject of university courses all on their own...My suggestion is: start small.Look at getting a pre-built...
25 Mar 2013 by SoMad
This question caught my eye. I think it is great that you are interested in exploring the low level universe of programming. It can be a frustrating experience, but when you get something working and you understand what you just did, it is a great feeling.I used Turbo C many years ago when...
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
28 Apr 2010 by CPallini
Josh Gray wrote:* Is there likely to be a tangible benefit to doing this or would a compiler (gcc in my case) make this optimisation?VC++ compiler takes care of such optimization (I see no div operation).I guess gcc do the same, you may verify it using the -S switch and looking at the...
25 Apr 2011 by Sergey Alexandrovich Kryukov
I am not really sure you are serious. I even suspected this is a kind of trolling.But if you are serious…I really sympathize with you and respect your thirst for knowledge and understanding.First of all, you should understand you're going to live a very difficult like, and not...
15 Jun 2011 by Sergey Alexandrovich Kryukov
This is not a simple topic; you cannot hope you can get on the road after you got few simple answers.You should understand that the kernel mode is closed for application programmers in nearly all modern operating system. You can only access kernel mode through device driver or bootstrap code...
15 Jun 2011 by LloydA111
Here is an extremely useful site: http://www.osdev.org/[^]You will also need to learn Assembler, for controlling hardware etc.
1 Dec 2011 by Yvan Rodrigues
This is called an assembler. An assembler converts mnemonics and opcodes to binary machine language.An assembler targets a specific microprocessor or microcontroller, so the one you need will depend on the processor on which the code needs to run.If I assume you're targeting Intel x86...
29 Oct 2012 by Richard MacCutchan
There is no need to do it, but it may be a very useful device in lots of places.
1 Feb 2013 by zaphoed
Hiyour code compiles fine on my win7/x64/vs2010 system, but it crashes and I think this is because you are using indirections on registers which aren't loaded with proper addresses.I brought the example to life by initializing withInit: __asm { //instead of mov EAX,...
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.
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()); ...
4 Nov 2013 by CodeProject
Dave Butler, VP and Senior Business Leader at MasterCard, offers developers insight into the company’s worldwide OpenAPI platform.
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
8 Nov 2018 by Member 13737597
This article shows you how to implement trampolines on x64, introduces the idea of sync and async hooks, and dynamically added runtime filters and loggers.
20 Nov 2019 by Jeremy Likness
Blazor and WebAssembly examples (part of a Blazor presentation)
5 Mar 2010 by DX Roster
first use the script manager likethen use update panel and in update panel use content template like//put text box and other control hereIf you get your answer then please don not forget to rate/vote me...thanksdx-army
26 Apr 2010 by Not Active
Look here, Using Unmanaged code and assembler in C#[^]
28 Apr 2010 by User 583852
When performing division by a constant that is a multiple of 2 we can optimise the operation by performing a right shift.eg i = i >> 3;is equivalent to i = i / 8;My questions are:* Is there likely to be a tangible benefit to doing this or would a compiler (gcc in my case)...
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...
16 Jun 2010 by Aescleal
From the assembly you've posted my Microsoft Intellisense paperclip leaps up and says: "Hey, it looks like you're wanting to set bytes in a 32 bit value! Do you want to do it with unions, bit-masks or disgusting casting?"Starting with the disgusting casting... What you do is tell the...
13 Jul 2010 by Sauro Viti
Try having a look to the _ecvt (CRT)[^] and _fcvt (CRT)[^] functions: they make exactly the job you are working on.They are faster than sprintf because they don't need to parse the format string.You can also get their disassembly to get an idea on how to do (use the RELEASE version): the...
14 Dec 2010 by Henry Minute
It is 4 because the processor that the book was referencing used 'standard' sizes.A word is two bytes and a double-word is therefore 4 bytes.Therefore to allow room on the stack the pointer has to be decreased by 4 bytes - the size of a double-word.
25 Dec 2010 by Phil J Pearson
It would be quite possible to write a dll in assembly language and P/Invoke that from C# but you would be making life inordinately difficult for yourself.I would just hack together a dll in C++ and write the assembler stuff in there.
7 Feb 2011 by Sergey Alexandrovich Kryukov
Surprise! There are not octal or hexadecimal or decimal numbers in programming, so there is nothing to "convert". If in you programming language they are written in different base, in machine they are all "binary". You do not "convert" them, you simply assign one to another, no matter how are...
7 Feb 2011 by Espen Harlinn
There is this: Static Compilation in Mono[^] - I would recommend learning a bit about assembly anyway, it's fun - and you'll end up with a far better understanding of programming in general :)You'll probably have to disassemble the generated executable to see any assembly - or check other...
6 Feb 2011 by #realJSOP
Ummm, all of those are integer types, just with different bases. The point at which they become "hex" or "octal" is when they're displayed, but their internal representation are always the same.
7 Feb 2011 by Nish Nishant
The code you posted is real mode 16 bit assembler. Those days, it was perfectly okay to invoke interrupts directly, and you could even do it from languages like C, Pascal and Basic (depending on the compiler you used).Btw, the assemblers themselves do not invoke any interrupts, they just...
13 Mar 2011 by OriginalGriff
Three things say you aren't going to get a useful answer here.1) You are asking for code, rather than doing any research yourself.2) Overclocking utilities are dependent on the interfaces and APIs that the CPU and motherboard manufacturer provides. If your motherboard has features that let...
25 Apr 2011 by Tarakeshwar Reddy
thexcodec wrote I want to program my own OS, from scratchLooks like you are on the right track ;). I started of with the same aim and as time passed I realised that I did not need a new OS (you could be different and end up writing one), but I did learn a lot of stuff which made me a good...
20 May 2011 by i.flower
this instruction must be executed at a privilege level of 0.
21 May 2011 by Richard MacCutchan
I think you're out of luck unless you can elevate yourself to Kernel Mode[^].
27 Aug 2011 by Ivan Ivanov 83
I found the perfect solution.Everyting I needed to do is to declare those variables as extern in a H file without giving them definitions. something like this:// thest.hextern int iEAX;extern int iEBX;extern int iECX;extern int iEDX;then in the right spot in the CPP...
20 Oct 2011 by AspDotNetDev
This is called a disassembler.
1 Dec 2011 by BrainlessLabs.com
If you want an API to do it, you can use a just in time API. https://developer.mozilla.org/En/Nanojit[^]http://code.google.com/p/asmjit/[^]http://code.google.com/p/blitjit/[^]These are a few examples of the program.
23 Mar 2012 by senguptaamlan
Getting Assembly full name from Visual Studio
15 Apr 2012 by Russ Osterlund
A totally new version of the article I wrote many years ago called "There and Back Again or Stepping Through the JIT Thunk Layer" but this time examines 64-bit processes and V4.0 of Microsoft's .NET runtime.
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
22 May 2012 by Sergey Alexandrovich Kryukov
Did you try to simply find it? Please see this CodeProject article showing how to do exactly what you want: Implement a WinForms TrackBar Control in ASP.NET[^].—SA
15 Sep 2012 by OriginalGriff
BXThe destination is always on the left.The syntax of ADD is:add ,add ,add ,add ,add ,And the destination always comes first.
15 Sep 2012 by Mehdi Gholam
Read this lecture : http://opencourseware.kfupm.edu.sa/colleges/ces/ee/ee390/files%5C3-Handouts_Lecture_6.pdf[^]
23 Sep 2012 by CPallini
Here at CodeProject there is an article series on the argument. Check out the first article: Beginning Operating System Development, Part One[^].
25 Sep 2012 by CPallini
Coding a disassembler is not a very complex task (at least compared to developing a decompiler: in principle, a rough disassembler is just a table driver translator, converting numbers into mnemonic opcodes). However it depends on the target architecture (for instance with RISC CPUs your job...
29 Oct 2012 by michaelmel
One example would be timers. Timers are often arranged as linked lists.That way, only one value has to be decremented under a clock interrupt.For example, if you have timers due to expire in 10, 30 and 100 seconds, you will have3 values in a linked list, which looks like this:10, 20...
6 Dec 2012 by Richard MacCutchan
The assembler does not produce executable code, let alone bootable. The .bin file will need to be linked into an executable and then possibly post-processed into a bootable image. You also need to understand that you cannot make system calls (such as int 0x10) in a bootloader as there is no...
7 Jan 2013 by CPallini
We have an article series on this topic: "Beginning Operating System Development"[^] by 0x3c0.
17 Jan 2013 by Espen Harlinn
Have a look at Booting[^]Best regardsEspen Harlinn
3 Feb 2013 by Matthew Faithfull
All computer languages 'work with binary' or rather wouldn't work without it. If you're going to be doing bit 'twiddling', for example writing your own ieee754 floating point implementation then 'C' is the traditional language of choice but these days C++ is a better option in my opinion or of...
24 Feb 2013 by Richard MacCutchan
The printf is part of the standard C library so it does not have a simple offset. You need to load the CRT library by the LoadLibrary function[^], and find the specific function address by GetProcAddress[^].
13 Apr 2013 by Dave Kreskowiak
Sooooo..... you're asking us to help you make a virus??That's just not going to happen. Doing such is actually illegal in some parts of the world and we're not going to be complicit (and liable) in your little schemes.
22 Aug 2013 by CPallini
You are usingSUB AL,31hThis way 'A' becomes 16 (decimal), you should instead useSUB AL,37h
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...
11 Mar 2014 by Sergey Alexandrovich Kryukov
No way you can do so. All executable files are protected form any modification and deletion when they are loaded in any of the loaded and executing processes. This is the important security feature of most systems, and the important fool-proof feature . So, it's important not to try to play the...
1 Jul 2014 by JIANGWilliam
This article introduces a handy way to get the calling Testing Assembly from a called Assembly
10 Dec 2014 by OriginalGriff
No.We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.Try it yourself, you may...
24 Jun 2015 by CPallini
In order to output the number 11 to the display you have to call the interrupt 21h two times, providing the character '1' (that is the value 31h) as dl argument.Generally speaking, in order to ouput (in decimal representation) the content of a 8bit register you have to:divide (integer...
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...
10 Apr 2019 by Patrice T
Quote: It seems that the push is actually moving the stack pointer by 4 bytes, whereas the pop is only moving it back by 2, yet the register is supposed to be a single byte, the lower half of a 16bit thing. What's going on? al register is 1 byte, so push and pop are moving stack pointer 1 byte....
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. ...
21 Oct 2023 by OriginalGriff
First off, you don't need to clear eax, ebx, or ecx - your function always overwrites what is there so it's irrelevant what they contain on entry. Secondly, your assembly code is within a function body, so the assembler label LOC_FUN just marks...
5 Mar 2010 by Raghavendra HG
I think whatever 'DX Roster' told is correct. If it is working then it is fine. But still your page is getting refreshed, I think you have not used "AJAX Enabled Website" while creating your project. Select "AJAX Enabled Website" while creating new project. Just try this once...