LUI (load upper immediate) is used to build 32-bit constants and uses the U-type format. LUI places the U-immediate value in the top 20 bits of the destinati
I'm doing some operating system tutorials from the book "Operating systems from 0 to 1". One of the exercises is to set the cursor to a position on the screen i
According to Intel in x64 the following registers are called general purpose registers (RAX, RBX, RCX, RDX, RBP, RSI, RDI, RSP and R8-R15) https://software.inte
I want to practice using switch/cases and JumpTables in MIPS. Currently, I am able to achieve a similar logic via stacking several BEQ commands after each other
I'm trying to write an assembly procedure to get the SMARTDrive version on a given system. The code to detect if SMARTDrive is loaded works correctly, but I ca
Suppose we have a variable in memory, which is constantly being updated by a thread of execution by doing something like MOV into it with alternating values (si
I have got a little problem of understanding how is suppose to work. Basically all what I need is to light up a led on each side of 7 segment display. They over
SORRY if i make you confuse about the question, but i don't know a better to describe it i'm trying to write a NASM program to reverse a string in place. i ha
I have a very basic knowledge about IDA and patching. From my understanding, I can change a line of code by doing Edit -> Patch program -> Assembly. But h
Is there a tool to compare the control flow of some disassembly and some C? Here's my situation: I started with the disassembly (x86_64) of a function. In some
I was studying the x86_64 assembly for the following function: /// Returns the greatest power of two less than or equal to `self`, or 0 otherwise. pub const fn
Is there an instruction or efficient branchless sequence of instructions to figure out the INDEX of (not the value of) the largest (or smallest) element of an u
I'm looking at the following disassembled AArch64 instruction: 65 6E 20 2B adds w5, w19, w0, uxtx #3 According to the ARM manual, uxtx zero-extends w0 to an
How do I create a text file that updates values inputted to by the user using Irvine's library? for example for my data I have: .data frstValue BYTE "Enter f
I want to inspect the assembly output of applying boost::variant in my code in order to see which intermediate calls are optimized away. When I compile the fol
I'm new to C++ programming and have always wanted to write a system information program for MS-DOS. I'm currently using the latest DigiMars C++ compiler and MA
Are x64 registers interchangable, in the sense that any instruction that works with one combination of them will work with any other? Is there performance diffe
I was originally trying to generate the bytes for an immediate move into a 64 bit register.The specific operation I wanted was mov rdi, 0x1337 Using https://ww
Going through the shellcode article on wikipedia, it gives an example as follows: B8 01000000 MOV EAX,1 // Set the register EAX to 0x000000001 To
When I try to build my source into a 32-bit static executable for Linux with nasm -f elf -F dwarf -g loop.asm ld -m elf_i386 -o loop loop.o I get this R_386_