Category "assembly"

How does the EBP register get saved?

I couldn't find much information or specification that suits me, so I have no choice but to ask here. When we call some function with the call instruction and t

Hack assembly language - finding the maximum number in RAM

as a task I have to find the maximum number in the RAM locations 10 to 20 and we have to write the solution into RAM[0]. I have a big problem with getting the i

Debugging NASM in VS code

I have a simple C++ program that calls some NASM code: main.cpp: #include <iostream> extern "C" int foo(); int main() { std::cout << "The result

Check for keypress without blocking if no key was pressed

I'm creating an application to view the current time and I created a loop to update the time each second. The loop looks like this UPDATE: ;The code to be re-

I don't know why the division produces a quotient and a remainder that are wrong

How to fix this one: I don't know why both the quotient and the remainder are wrong. My DOSBox Code: .model small .stack 100h .data Dividend db 0dh,0ah,

What calling convention does printf() in C use?

So I've been practicing to write simple subroutines in FASMW using the CDECL and STDCALL calling conventions and it got me wondering about what the printf funct

Allocate a vector of bytes on stack in assembly x86

I try to put on stack the values contained by array_output but every time I print the values from the stack it prints just 0s. If I try to print the array simpl

Client socket coded in ASM (FASM) does not connect to Server

I am creating a communication between a client and a server via tcp/ip socket. I am developing the client in ASM (FASM) and I cannot connect to the server. The

Not adding the stack bytes to the .EXE file with MASM 5.0

I'm writing two assembly files for DOS: hm2.asm: .8086 DGROUP group _DATA, STACK ; Required by MASM 3.0 and 4.0. ; MASM 4.0 doesn't support USE16 (but MASM

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.

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.

Custom bootloader booted via USB drive produces incorrect output on some computers

I am fairly new to assembly, but I'm trying to dive into the world of low level computing. I'm trying to learn how to write assembly code that would run as boot

Execute system command in x64 bit assembly?

I recently been trying to execute system commands using pure assembly. I managed to achieve it in a x32 bit binary as posted here: execute system command (bash)

How do you enter command line arguments in SPIM

I am trying to make programs using argc and argv in MIPS simulator SPIM. This is my code: .data nl: .asciiz "\n" .globl main .text main: # print argv[0] lw

Why does GCC include an "empty" XOR

I have following piece of code: typedef struct { int x; int y; int z; int w; } s32x4; s32x4 f() { s32x4 v; v.x

error in partition function (mips assembly)

This is the code I wrote trying to implement the c partition function in mips. There seems to be an error because the program doesn't work, yet I can't find whe

C++ - How to debug SIGILL ILL_ILLOPN

Recently I ran into a crash while the following statement is getting executed static const float kDefaultTolerance = DoubleToFloat(0.25); where DoubleToFloat

How to divide two unsigned long 64 bit values in x86 assembly and then returning the quotient and remainder to a C program

In a separate C program, I have passed 4 parameters to an x86 ASM program. dividend divisor Quotient pointer Remainder pointer dividend = 0xA divisor = 0x3 Whic

why is my assembly program (changing background color with keyboard) not working [duplicate]

I am writing a program in assembly that changes the background color from clicks on the keyboard but I can't seem to make it work, anyone know

What does it take for pacman to function correctly?

I'm experiencing 2 problems: the "you win" screen does not show up the pacman has a trail. IDEAL p286 MODEL small STACK 100h DATASEG pacman db " _ __ _