Skip to content

ncellar/asm-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I dabbled a tiny little bit in assembly, mostly for my own enjoyment. Here are a few exemples I made that use the Win32 API and the C standard library.

You should know what assembler is already and have some notions about it : the basic instructions, the registers, calling conventions (cdecl / stdcall) and their stack frames and entry/exit sequences).

All my examples use the GNU assembler (gas) and the GNU toolchain. It is free software and available on all three major platforms (Unix, Windows and Mac).

On Windows, you can get the tools by installing mingw (minimalist GNU for Windows) then make sure that mingw\bin is added to the %PATH% environment variable. In particular the tools we will use to program in assembler form the core of what is called the "binutils".

I will use the following conventions in the documentation of my assemby "functions":

  • %eax -> means that %eax is an input of the function.
  • -> %eax means that %eax is an output of the function.
  • ~~ %eax means that %eax is modified by the function (but is neither an input or an output).

Contents

  1. box Windows Dialog in Assembler
  2. console Windows Console Message in Assembler with win32 API
  3. printf Windows Console Message in Assembler with C Standard Library
  4. dll Producing a DLL from Assembler
  5. shared Shared Memory in DLLs and Executables
  6. static Producing a static library from Assembler

Assembly Links

Reference

Explanations & Tutorial

Linkers

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published