Category "assembly"

Why does SSE/AVX lack loading an immediate value?

As far as I know, there is no instruction in SSE/AVX for loading an immediate. One workaround is loading a value to a normal register and movd, but compilers se

Could anyone help me to read 64 bit from console in 32 bit RISC-V

I am new to assembly, but could anyone teach me how to read 64 bit from console in 32 bit RISC-V? .eqv SYS_EXITO, 10 .eqv CON_PRTSTR, 4 .eqv CON_PRT

how to set Trap flag (TF=1) in c language or assembly?

I used xinu and i want to use single step Interrupt (01H). I have two questions does TF flag equal 1 (TF==1) when xinu system initialize ? if no then how i can

RISC-V: Multiplication of two matrices

---update--- I now have kind of a MMA function but the code still doesn't work. And i know that for example: Mul X28, X6(x11), X7(x12) Ld X29, X5

Is there any software where we can see the content of a register when writing an assembly language program? [duplicate]

I'm learning assembly language but whenever I want to find an error in my code it becomes difficult.

How to multiply three "big numbers" and then divide them by 100 in emu8086?

My class actually has no idea how to use assembly as all we had learned from the past few months is Java, and we were suddenly tasked to do this activity. Pleas

linked lists implementation in MIPS

I have a few questions about the code snippet below. It was part of assigment we had. I've already done it but my questions are regarding the provided code we w

How to multiply three inputted numbers in assembly using emu8086?

I'm sorry for asking this without any code to show you, but my teacher assigned us to make something like this as a surprise quiz, and me and my classmates don'

MIPS string search function

I've been trying to code a search function in MIPS to find a specific string inside of an array and I'm failing miserably. So far I have Find: #offset index

Does `ret` also remove all the function's arguments from the stack?

When ret is executed, it pops the (return) address and puts it in the EIP register. But what about all the function's arguments left on the stack? Are we just i

Writing an LC3 Subtraction subroutine to subtract R3 from R2

I'm just starting to learn LC3. If we want to write a Subtraction subroutine which subtracts the value stored in some register, lets say we want to subtract the

How to respond to this error: #Error 02: Jump>128 [duplicate]

Currently I'm working on an assembly project. For some reason I get the error: #Error 02: Jump>128. The code segment is as follows: morec

Printing an integer in assembly x86

I want to print an integer with this code but when i assemble with tasm and run program.exe in dosbox, nothing happens and i think it goes into an infinite loop

How to traverse memory for the Fibonacci sequence in ARM assembly

I must write the following function in its own assembly file: void fillFibonacciArray(int *array, int n); The function writes into the array the first n Fibonac

How does subtracting 0x1 - 0x80000000 cause an overflow?

MOV R0, #0x80000000 MOV R1, #0x1 SUBS R2, R1, R0 Upon Running this code, Flag N and Z are set. Now, I know N flag is set if the operation results

emu8086 - How do I make the font bigger in the editor

Well, the question is in the title. Tried through edit, there is no such option like settings, as well as tried to change the emu8086.ini file.

Decoding PHP obfuscated payload

Recently I found a malicious PHP payload on my company's server. The code seems to be encoded into two strings claster and x64. The claster string decodes to th

Why doesn't instruction opcode 0xBB exists? [duplicate]

I'm currently writing a virtual machine and I've realised that 0xBB is not a valid instruction when it should be. I tried using shellstorm wit

In Assembler AT&T context: What does movl do in this specified line?

i have a some simple lines of code in C and wanted to disassemble it: #include <stdio.h> int main(){ int i=42; } After compiling it and starting gdb, i

Assembly: Modify a odd number generator into a prime number generator

I have written a PROC to find all odd numbers. I want to transition the existing code into a prime number generator. The intent of the entire program is to take