Questions tagged [assembly]

Tag for questions regarding the wide family of assembly languages both low and high level. It should be used for both the languages themselves as well as their assemblers.

The term assembly (aka asm) refers to any low-level language characterised by a strong congruence of their instructions to those of the machine code. Thus assemblies depend highly on the target architecture. The conversion of assembly into machine code is called assembling and is performed by an assembler.

Related tags

Related links

Related shell commands

  • as - AS - the portable GNU assembler.
71 questions
100
votes
11 answers

How to view a binary file?

From what I understand, a compiler makes a binary file that consists of 1's and 0's that a CPU can read. I have a binary file but how do I open it to see the 1's and 0's that are there? A text editor says it can't open it... P.S. I have an assembly…
Martin Zeltin
  • 1,151
  • 2
  • 8
  • 6
20
votes
1 answer

Why can the kernel not use SSE/AVX registers and instructions?

This post from StackOverflow has this, In some environments there there is a restriction on certain instructions or using certain registers. For example, in the Linux kernel, use of SSE/AVX or FP registers is generally disallowed. Therefore most of…
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
17
votes
4 answers

Why some operating systems event handling is written in asm instead of c?

My question is why nowadays some operating system event handling is still written in assembly language instead of a higher level language such as C, when the kernel itself is written mostly in C?
MAKZ
  • 273
  • 1
  • 8
13
votes
1 answer

How do I cross-compile Chromium for ARM?

Goal I need to install Chromium on FriendlyARM mini210s running Linux 3.0.8 armv7l Environment Vagrant box with Ubuntu Precise64 Installed depot_tools following these guidelines Get-the-code and Linux Chromium ARM Toolchain depot_tools After…
zabumba
  • 904
  • 10
  • 28
  • 50
11
votes
1 answer

Where in GRUB2 source code is the handover/jump to kernel code?

I'm looking for the line of code where GRUB2 finally jumps to kernel code and thus hands over execution on x86 systems? I guess it's in an assembler file since this is very low architecture stuff. I looked at the source files in…
JohnnyFromBF
  • 3,476
  • 10
  • 32
  • 42
10
votes
2 answers

How do I debug a kernel module in which a NULL pointer appears?

I have a custom kernel module that I compiled from this patch that adds support for the logitech G19 keyboard among other G series devices. I compiled it just fine against Ubuntu's maverick kernel's master branch (2.6.35). I can boot and load the…
Falmarri
  • 12,897
  • 17
  • 58
  • 71
6
votes
1 answer

How to understand this TMG's assembly code from the Version 6 Unix?

Early versions of Unix included Doug McIlroy's tool tmg ("transmogrifier"), an early compiler-compiler. TMG was implemented in Dennis Ritchie's assembly language as well as in TMGL itself (the language that TMG translates into assembly). Here is…
Andriy Makukha
  • 548
  • 4
  • 14
6
votes
1 answer

Unable to run an executable built with NASM

I am attempting to assemble the assembly source file below using the following NASM command: nasm -f elf -o test.o test.asm This completes without errors and I then try to link an executable with ld: ld -m elf_i386 -e main -o test test.o -lc This…
Nathan Osman
  • 6,170
  • 10
  • 40
  • 51
6
votes
3 answers

Generate MIPS architecture assembly code on a X86 machine

I need to generate MIPS specific code on my machine when I run my C program. When I simply run, gcc -O2 -S -c hello.c On my system, I get the hello.s which seems to generate some assembly code but it doesn't seem to be MIPS specific code. The…
Ramesh
  • 38,687
  • 43
  • 140
  • 215
5
votes
4 answers

8086 emulator for unix-like OSs?

Is there any 8086 emulator (free or paid) for Fedora 17? I am learning assembly language using AT&T style.
KawaiKx
  • 445
  • 1
  • 6
  • 9
4
votes
1 answer

QEMU for ARM programs with GDB

I want to emulate an ARM processor for running the assembly programs using QEMU in RHEL. I have installed QEMU but I still have problems in running the assembly program. I got the assembly program, memory map and the makefile from this link.…
Ramesh
  • 38,687
  • 43
  • 140
  • 215
4
votes
1 answer

How to disassembly multiple functions using Linux utility objdump?

After a program is compiled and the binary file is generated, we can use objdump to disassemble the binary file and extract the assembly code and a lot of information. However, using -j .text with objdump, it will disassembly the whole functions…
4
votes
2 answers

Running assembly program as ring 0

I'm writing an application which reports back readings from CPU temperature sensors, and the fan speed monitor. However, according to the Intel documentation on PECI, the instructions required must be run in ring 0 mode, i.e. kernel mode, or an…
4
votes
1 answer

What is not accessible from userspace?

I read somewhere (3.1.3) that there's a high ring (supervisor mode) and a low ring (user mode) and that some "things" can be run only from the highest ring. What do they mean by "things"? I'd guess that includes what syscalls (read/write/open... )…
Thomas
  • 883
  • 2
  • 12
  • 25
3
votes
3 answers

Moving compiled assembly code to the boot sector of a USB device

I have written a simple operating system and I am trying to test it. I have VirtualBox installed and an eight GB flash drive, so I thought I would just use those. I am not sure how to make the USB drive bootable, however. I have followed a lot of…
Justin
  • 173
  • 1
  • 8
1
2 3 4 5