Questions tagged [assembly]

A low-level programming language providing symbolic representation of machine code.

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

Bare metal LED access on RPi 4

I've been playing with the Baking Pi tutorials, getting assembly code to work on the [bare metal] Pi 1 (BCM2835). I'm now interested in adapting the code to work on the Pi 4 BCM2711 but I'm struggling ...
user avatar
  • 198
2 votes
1 answer
137 views

Does the Raspberry Pi 4's processor support ARM's SHA256 instructions?

According to Wikipedia, every Armv8 processor should support sha256 hashing instructions however /proc/cpuinfo doesn't list it. Could there be a failure to identify the feature by the kernel? ...
user avatar
  • 21
0 votes
1 answer
66 views

ArmV7 Assembly returning 1 for basic add function call

I'm trying to get into Assembly development for the purposes of better understanding lower level development and I'm doing this with my Raspberry Pi Model 4B. I am going through this tutorial at the ...
user avatar
4 votes
1 answer
815 views

How do I read the cpuid in aarch64 asm?

In armv7 / 32bit mode I can read the cpuid using uint32_t arm_cpuid; __asm__("mrc p15, 0, %0, c0, c0, 0" : "=r"(arm_cpuid)); This gives 0x410FD034 for RPi3 and 0x410FD083 ...
user avatar
3 votes
1 answer
657 views

BCM2835 GPIO Pins vs. Physical Pin Numbers

Good morning. I am attempting some low-level assembly coding for Raspberry Pi. Using the BCM2835 Peripherals Doc, I have successfully been able to work with the GPIO controller on my RPi Model B rev. ...
user avatar
  • 91
2 votes
1 answer
46 views

BCM2835 datasheet addressing system

I've been interested in writing a kernel for my old Raspberry Pi for quite a while, and managed to make work some ARM assembly code I found on the famous "Baking Pi" course by the University ...
user avatar
0 votes
3 answers
2k views

How can I run 32-bit compiled assembly code on Rasberry PI 4 B, if possible at all?

I bought the PI 4 B for a university project, as I have to make small 32-bit ARM assembly program. However I realized it too late, that it comes with an aarch64 architecture ARM processor. I would ...
user avatar
2 votes
0 answers
353 views

Lighting an LED through Pi 4 Model B using Assembly

I have been struggling to light an LED using my raspberry pi 4 model b but have not been able to find a solution. My assembly code : .section .init .globl _start _start: mov r0, #0xF0000000 orr r0, ...
user avatar
4 votes
1 answer
63 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 ...
user avatar
1 vote
1 answer
91 views

Radio Transmission

Yes, I pretty much a noob, but I was wondering if there is a way to program the Raspberry Pi in Assembly Code to transmit data via radio frequencies (like remote control) between itself and another ...
user avatar
1 vote
1 answer
296 views

Read/Write GPIO

I wrote an assembly code for my Raspberry Pi to read an I/O with a button and switch an LED according to the state of the button. It seems that the I/O with the LED is toggling all the time and I don´...
user avatar
  • 193
2 votes
1 answer
940 views

bootcode.bin RPi 3

I've been reading this document: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/bootflow.md About the boot process of the Raspberry Pi. I want to make a simple "Hello, ...
user avatar
  • 123
3 votes
1 answer
244 views

Why does adding a nop or constant break my code?

I am learning the ARM architecture via bare metal programming on the Raspberry Pi 3. I have a booting "kernel" that prints out some info. I have reached a point that I don't understand what is ...
user avatar
1 vote
2 answers
1k views

Is there a program to execute assembly code and check registers?

In our university we have a computer's technology subject in which we have to program in ARM's assembly language. We have the chance to use a simulator but I was wondering if I was able to execute ...
user avatar
3 votes
1 answer
180 views

OS-less raspberry pi 2 debugging of Assembly language

I have a Raspberry Pi 2 without an OS installed. I have an assignment where I have to create and display some code in assembly language for the Pi 2. The lab that we have set up at school has ...
user avatar
  • 131
0 votes
1 answer
195 views

unable to set GPIO 17 as an output by assembly program

I am trying to st GPIO 17 as an output. I am using Pi 2 model B. By searching for the base address of peripherals, I found that it is 0x3F000000. I want to write a code in assembly language, Following ...
user avatar
  • 97
3 votes
1 answer
285 views

Regarding assembly language programming in Raspberry Pi

I am learning assembly language programming in Raspberry Pi 2 model B. I know about Code::Blocks and gdb. Using assembly language the processor's register can be controlled, but I want to control the ...
user avatar
  • 97
1 vote
0 answers
263 views

RPi2 bare metal blinker

This is my first assembly program. I have a FAT32 formatted SD card with latest bootcode.bin, start.elf, and a flat binary named kernel7.img converted from the following dumped ELF file: build/kernal....
user avatar
  • 11
2 votes
2 answers
1k views

On-board LED connection to GPIO

I stumbled on this tutorial: http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/ok01.html Unfortunately this is only made for the B rev2 board, whereas I got a B+ board and the board setup is ...
user avatar
  • 23
3 votes
1 answer
591 views

Disassemble i386 in Raspbian?

I want to disassemble i386 machine instructions into human readable text in Raspbian. I am a rookie Linux user and don't know the configuration of installed tools, but from what I understand I need ...
user avatar
  • 203
2 votes
1 answer
972 views

Windows IoT Core GpioController - assembly 'Windows' causes a cycle

I am trying my new Raspberry Pi with Windows 10 IoT Core. I have fallowed the steps of the installations and cofigurations, and every thing was fine until I've got to Blanky tutorial http://ms-iot....
user avatar
0 votes
1 answer
78 views

Baking Pi OK05 - Why "ldr" twice to make the pattern work?

I'm carefully following Baking Pi with my model B, making sure I fully understand everything going on. I am now at lesson 5, to flash the SOS Morse code. It works fine, but I am curious why it needs ...
user avatar
  • 21
1 vote
2 answers
2k views

Pi 2 CPU Documentation

I'm interested in processor architecture, and assembly programming, but I can't seem to find any documentation, or even the datasheet on the CPU of the Pi 2 (BCM2836). The document I'm looking for ...
user avatar
  • 156
3 votes
1 answer
810 views

Baking Pi Lesson 02 does not work on B+

I would like to comprehend lesson 2 of Baking Pi, but I am not able to get the LED blinking. I am using Windows and have installed Cygwin and the ARM tool chain. As explained in the requirements, I ...
user avatar
  • 155
3 votes
1 answer
849 views

ASM - how do I write graphics straight to the screen

I have some old RISC OS assembly programmes I wrote a few years back and I want to port them to Raspberry Pi. I ran Mode 28 and wrote output directly to the screen using the memory address where v-...
user avatar
  • 51
2 votes
0 answers
2k views

Assembly - set gpio as input

I have 2 leds and one button. both green and yellow led off when booting from card. When the button is pressed, i want to turn green led off and yellow led on. However, I have to write assembly. I ...
user avatar
  • 21
1 vote
0 answers
173 views

Memory addresses

I am writing an assembly program, assembling it and replacing the kernel.img file on a SD card with raspbian installed on it. Will the memory address of the first instruction be zero? Either because ...
user avatar
  • 121
3 votes
3 answers
4k views

Assembly code on Raspberry Pi

What's the file extension for assembly code? Can it even be written by a text editor? My plan was to use nano to write the program (for syntax highlighting), so would that work? If not, what do I ...
user avatar
2 votes
1 answer
717 views

Run program on Baking Pi ARM ASM OS

I am following the Baking Pi Raspberry Pi ASM OS tutorial here, and I thought that it would be cool if I could create a compiler/runner for like, BASIC or a language I create. I don't have the skill ...
user avatar
0 votes
2 answers
2k views

Kernel module assembly output

I compiled the kernel modules written in C directly on my Raspberry Pi using this Makefile: obj-m := HelloWorld.o all: $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean: ...
user avatar
20 votes
5 answers
27k views

Write an OS for Raspberry Pi in C

I already found the Baking Pi tutorials, but they only use assembly language. I followed the first lessons, but I am already wondering how to use C instead. I mean, there is a reason they invented ...
user avatar
  • 455
1 vote
1 answer
462 views

Assembling Thumb on Rasparian

Has anyone been successful in assembling, compiling and running thumb or thumb-2 on Rasparian. Here is an example of my assembly code: .text .global main .code 16 main: MOV r3,#1 finish: ...
user avatar