Skip to content
Advertisement

Tag: nasm

mov edx overwrites cx register

I’m trying to print Hi 10 times. This is my code. gdb reports that mov edx, 3 overwrites the cx register to some crazy value and so the loop keeps going forever. What am i doing wrong? Is it because they are the same register? How does one program in assembly with so few registers? Compiling on centos with nasm

Clean console on assembly

Is there anything similar to system(“cls”); that exists on C for Assembly? I’m using NASM to compile and I’m working on a x86 linux. UPDATE 1: Here’s my modified code to integrate sugestion: Cheers Answer To imitate the terminals clear command have in a .data section: then whenever you want to clear the terminal do:

Getting digit instead of Ascii in nasm assembly intel x86

I’m trying to learn the basics of assembly but can’t get across on how to display results stored in memory. What I’m trying to do is get the dot product of the two list of numbers and display it on the screen. However, I keep getting random letters which I believe are hex representations of the real decimal value. How

Printing an integer with x86 32-bit Linux sys_write (NASM)

I’m new to this forum. I have a little experience with high-level languages (really little). Nearly one month ago I thought it would be a good idea to see how assembly worked so after choosing nasm (IA-32) on linux I started learning from a tutorial. Now, after ending it, I tried to write a simple program where you get the

nasm assembly linux timer or sleep

I’m trying to find a way to make my code wait for two seconds before proceeding. I’m using nasm for Linux in protected mode, so I can only use int 80h. I found a syscall called “alarm” (27) and another called “pause” (29). However, when I try to use those, the program waits and finishes instead of continuing execution. I’ve

How to clear screen on protected mode

I’m using NASM for Linux and I’d like know how, in the protected mode, you can clear the screen. I found a solution using the int10h, but on the protected mode I can only use int80h. Thanks in advance. Answer You can write x1b[2J to the standard output so the terminal get cleared and fix the cursor position using x1b[H,

Advertisement