A low-level programming language providing symbolic representation of machine code.
Questions tagged [assembly]
35 questions
20
votes
5 answers
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 higher-level languages. I tried just compiling the C…
11684
- 455
- 1
- 3
- 13
5
votes
1 answer
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 for RPi4.
What is the equivalent for that in aarch64 / armv8…
Goswin von Brederlow
- 491
- 3
- 12
4
votes
1 answer
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?
processor : 3
BogoMIPS : 108.00
Features : fp…
erolll
- 41
- 2
4
votes
1 answer
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. 2.0 to turn the "ACT" LED on (which I know is raw…
Jacob B.
- 211
- 1
- 6
4
votes
1 answer
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 working. It says that udiv is undefined.
test.s
…
user668074
- 141
- 3
3
votes
1 answer
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 happening. I have two pieces of boot code below, one…
Jacob Calvert
- 141
- 4
3
votes
1 answer
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 hardware/software that allows us to run and test the code…
SeesSound
- 131
- 2
3
votes
1 answer
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 peripheral's registers (BCM2835 peripheral)…
vivek
- 97
- 1
- 7
3
votes
1 answer
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 an architecture for i386 for objdump.
objdump -D…
Statement
- 203
- 1
- 10
3
votes
1 answer
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 have downloaded the latest Raspbian, which works…
ceving
- 197
- 1
- 5
3
votes
1 answer
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-ram started -- i.e., I didn't use an SWI call.
Is…
JohnB
- 51
- 1
3
votes
3 answers
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 need to use?
Can you even compile ARM assembly code?
Beta Decay
- 400
- 4
- 14
2
votes
1 answer
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 yet to create something like that, so hopefully I…
RPiAwesomeness
- 3,021
- 4
- 31
- 52
2
votes
1 answer
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, World!" operating system in AArch64 assembly and was…
Cromulent
- 123
- 5
2
votes
2 answers
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 slightly different.
On the schematics of the rev2…
nemo
- 23
- 5