Questions tagged [assembler]

For questions pertaining to compiling code.

Filter by
Sorted by
Tagged with
0
votes
1answer
28 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, ...
4
votes
1answer
51 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 ...
8
votes
1answer
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("...
20
votes
5answers
20k 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 ...
2
votes
1answer
169 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". ...
13
votes
1answer
680 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 ...
5
votes
1answer
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 ...
2
votes
1answer
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 ...