Questions tagged [assembler]

For questions pertaining to compiling code.

Filter by
Sorted by
Tagged with
0 votes
1 answer
454 views

I want to mmap the GPIO on Raspberry Pi 4b+ but get invalid argument. (Running Raspbian Buster)

// The c code shown here works: int fd = open("/dev/gpiomem", O_FLAGS); printf("fd = %d\n", fd); long int* addr = mmap(0, 0x1000, PROT_RDWR, ...
jschwartzman's user avatar
4 votes
1 answer
83 views

gcc does not compile code that compiles in 'as'

I'm trying to learn assembly using the raspberry pi. I have code that compiles using as but will not compile with gcc. I thought that as was the backend for gcc assembly so I'm confused why it is not ...
user668074's user avatar
2 votes
1 answer
363 views

Flat Assembler Binary

I am trying to compile a program using Flat Assembler (fasm) but I can't find a binary that works for the RPi. I have tried the regular and arm versions which both complain of "Exec Format Error". ...
Scoder12's user avatar
8 votes
1 answer
1k views

Locked (Atomic) Register read/write

I'm coding something using direct control of GPIO, there are some good resources around for this, such as http://elinux.org/RPi_Low-level_peripherals#GPIO_hardware_hacking ; the process involves open("...
greggo's user avatar
  • 621
2 votes
1 answer
1k views

ARM dissasembler

I'm attempting to do an object dump of an assembled program for the pi. I have main.o main.s main.elf and main.bin otool -tV main.o This results in main.o: is not an object file What am I doing ...
Paul Meier's user avatar
5 votes
1 answer
4k views

Bare Metal Assembly/C(++) Programming

I'm trying to make a small os on my Raspberry Pi. I have good assembly and strong c/c++ knowledges but I need some help. For my first experiments I worked with Qemu and it's serial output but now I ...
abidon's user avatar
  • 153
20 votes
5 answers
22k views

Writing ARM Assembly code

After getting my Raspberry Pi, I decided that I wanted to learn how to write ARM assembly code. My question is, what do I need to get started? I assume that there is already a compiler installed but I ...
ohblahitsme's user avatar
15 votes
1 answer
704 views

Is the Raspberry Pi a good teaching tool for students learning assembler?

When I took an assembler course, we used a NIOS II Altera board which had a display, some LED lights and programmable buttons. One of the more useful exercises was to write a binary calculator using ...
keyser's user avatar
  • 255