SNCA:Assembly

From Soyjak Wiki, the free ensoyclopedia
Jump to navigationJump to search
All fun out of the pool for oldfag swim!
"THAT'S WRITE MOTHERFUCKERS, IM GONNA GET IT!
57M GET!
"

Assembly is ARYAN
btw, if that matters

this programming language VVILL make you Feral

Assembly is perhaps one of the most tedious programming languages to learn, but once you do, you can make the most optimised programs you will ever be able to make. It's said that Gigachad codes everything in this language. If you are a nucodecaca we don't recommend you learn this, but instead learn Python, then C, which will eventually give you the knowledge you need to learn this language. Though in the modern day most compilers will generate highly optimised code, and you will most likely just end up writing Assembly that is slower than whatever the compiler would generate from a C or C++ program.

It was created when some soyentists got fed up of writing executable instructions as binary and decided to make text represent each instruction.

Get started[edit | edit source]

If you are thinking of learning assembly from the bald men wiki, you are going to be disappointed. Instead here's how to make a dialog box.

Note that there are several different kinds of "Assembly language", including but not limited to:

  • x86, for Intel and AMD processors, and is one of the most common instruction sets in modern PCs. Example: MOV AX, 1 moves 1 into the AX register.
  • ARM, for ARM-based processors. It is optimised for power efficiency, such as mobile and embedded devices. It is heavily used by Apple. Example: MOV R0, #1 moves 1 into register R0.
  • MIPS, used for embedded systems, networking hardware, and some gaming consoles like PlayStation. It is simple and regular in instructions. Example: add $t0, $t1, $t2 adds the contents of register $t1 and register $t2 and stores the result into register $t0.
  • PowerPC, used in some older Apple computers (before Apple switched to Intel processors) and old gaming consoles like Xbox 360 and Wii. Example: li r0, 10 loads value 10 into register r0.
  • RISC-V, a newer instruction set architecture used in academia and industry, which is simple and modular. Example: addi x1, x2, 5 adds 5 to the contents of register x2 and stores the result in register x1.

1. Get the program[edit | edit source]

masm32[a] takes out a lot of the annoyance in setting up an assembly compiler, like regular masm. It also comes with an IDE, all the while doesn't interfere with any other compilers or DLLs. Get it here and click Next a few times. Also you should install it directly to the C: drive, as it will create a subdirectory. Don't install it into Program Files.

2. The code[edit | edit source]

  • Open C:\masm32\qeditor.exe
  • Save a blank file to C:\masm32\msgboxdir\msgbox.asm, msgboxdir being the project folder
  • paste the code below into the text editor
  • save, go to Project > Build All
  • run C:\masm32\msgboxdir\msgbox.exe
 .386

 .model flat, stdcall 
 option casemap :none 

 include \MASM32\INCLUDE\windows.inc
 include \MASM32\INCLUDE\masm32.inc
 include \MASM32\INCLUDE\user32.inc
 includelib \MASM32\LIB\user32.lib

 .data
 message db "this error is the fuggen jerdee's fault",0
 mestitle db "nigger",0

 .code
 start:
 invoke MessageBox,0,ADDR message,ADDR mestitle,MB_OK
 ret
 end start
 

See also[edit | edit source]

godbolt.org - convert simple C programs to assembly. You can already do this in most compilers but online is just easier for some people. Here's an Assembly tutorial if you are serious about learning this.

Notes

  1. masm32 is a repacked version of Microsoft Assembler that makes it easier to get started and just write code.

Assembly is part of a series on Computer Science.

Languages Low Level AssemblyCC++C#Holy CRust

High Level JavaGoPHPPythonSQLBashJavaScriptPowerShellActionScriptScratchRubyLua

Markup HTMLCSSSVG
Software Imageboards nusoiVichanYotsubaOpenYotsuba

OSes WindowsLinuxAndroidTempleOS

Other BabybotMcChallengeSystemdMS PaintJS PaintPhotoshopFlash
More SoyGNUCGIDDoSVibe codingGame developmentPiracyRegexDoxingMicrosoftAppleGoogleDataminingWebPArtificial soyduelRatio duelingCustomizationRicingFSLWindows debloating