Skip to content
Advertisement

Tag: x86

Convert from ascii to integer in AT&T Assembly

How can I convert from ascii to integer? The code is writing an ascii value, and I think that if I can add 48 to value. I can write, but I can’t print, a two-stage number “for example 53 or 156”. How can I print? Answer It’s usually best to think about a high level language version first. If the

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

Accessing errno.h in assembly language

I want to access errno present in errno.h in assembly language in order to handle errors of write function call. I found somewhere that make call to _error in assembly language for this purpose but it is throwing errors as : My assembly code : ExitNewShell.asm How to access errno in assembly language? Answer You’re making x86 Linux syscalls from

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

Prohibit unaligned memory accesses on x86/x86_64

I want to emulate the system with prohibited unaligned memory accesses on the x86/x86_64. Is there some debugging tool or special mode to do this? I want to run many (CPU-intensive) tests on the several x86/x86_64 PCs when working with software (C/C++) designed for SPARC or some other similar CPU. But my access to Sparc is limited. As I know,

How do I get the interrupt vector number on Linux?

When I run “cat /proc/interrupts”, I can get the following: How can I get the interrupt number of “NMI” “LOC” “SPU” “PMI”, etc. Answer On x86 NMIs are always on interrupt vector 2. The number is hard-coded just as common exceptions (division by 0, page fault, etc). You can find this in the CPU documentation from Intel/AMD. If the APIC

Advertisement