Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
79 views

I want to create a skeleton for a project in which there are multiple cuda and cpp files. They will be compiled individually and then linked together to form a single executable. Currently I have the ...
ThErOmAnEmPiRe's user avatar
1 vote
0 answers
145 views

I am implementing my own SW for getting data from DS18B20, but I've been stuck on decoding address for a while - "receiving" only zeros as a result. Here is my code: #include <avr/io.h>...
David David9's user avatar
2 votes
1 answer
101 views

I know the stack pointer can be used to find stack allocated objects, but how does the cpu find global/static objects? From what I could tell from the disassembly, it uses absolute/immediate ...
Badasahog's user avatar
  • 1,025
2 votes
1 answer
148 views

So in risc-v, for a virtual memory system, I imagine it's up to the kernel to decide if 0 is a valid memory address or not? But for machine mode, or supervisor mode, is memory address 0 valid to ...
CocytusDEDI's user avatar
1 vote
0 answers
78 views

I'm building a virtual keyboard using Tauri and pure JavaScript. My application is already set up, but I want to insert the character from the virtual keyboard into the focused window when a key is ...
Commodore64's user avatar
2 votes
0 answers
77 views

I’m developing a custom OS and facing a chicken-and-egg problem with my page frame allocator. I need to map a specific page, but if the corresponding PML4 entry is NULL, I must allocate a PDPT. ...
Viliam Holly's user avatar
2 votes
1 answer
121 views

I am trying to solve a problem from the K&R C programming book that requires one to write a low level I/O program which reads text from a file and prints it on screen, if no input file is given in ...
Vinayak Deshmukh's user avatar
1 vote
0 answers
178 views

I am trying to control GPIO pins of a Raspberry Pi 3/4 running FreeBSD, using direct access to the BCM2835 registers. My code is based on Mike McCauley's C library. It works fine on Linux (Raspberry ...
Vimsent's user avatar
  • 11
94 votes
10 answers
7k views

The issue In a low level bare-metal embedded context, I would like to create a blank space in the memory, within a C++ structure and without any name, to forbid the user to access such memory ...
J Faucher's user avatar
  • 988
66 votes
12 answers
92k views

Is it possible to divide an unsigned integer by 10 by using pure bit shifts, addition, subtraction and maybe multiply? Using a processor with very limited resources and slow divide.
Thomas O's user avatar
  • 6,290
1 vote
1 answer
69 views

I am writing a world simulator for a turn-based game. The key feature is that there will be many NPCs with detailed psychology modelling, perhaps 20,000 - 30,000 of them. I want all NPCs to make their ...
Asparuh's user avatar
  • 23
-1 votes
2 answers
1k views

I'm a student at an engineering college, and I have encountered a problem while working on a project. In this project, I am designing a microcontroller. I opted to use the Z80 CPU due to its ...
Nani D's user avatar
  • 1
1 vote
1 answer
103 views

I'm experimenting with the stack in C to test some things and learn more in the language. I know that a function has a stack frame created by moving the rsp/rbp pointer. What I don't understand is ...
Architek's user avatar
  • 135
82 votes
8 answers
55k views

Any portable code that uses bitfields seems to distinguish between little- and big-endian platforms. See the declaration of struct iphdr in linux kernel for an example of such code. I fail to ...
Leonid99's user avatar
  • 1,317
1 vote
2 answers
111 views

I'm using MARS 4.5 like editor to coding in Assembly Mips. Today I'm learning BEQ, however I have a problem with this code: .data Message_1: .asciiz "I numeri sono uguali" Stampa: li $...
Gabriele's user avatar
2 votes
0 answers
111 views

I want to do the typical Hello World in assembler from my Windows with 64-byte architecture, and it simply doesn't show me anything when running the executable program. extern printf ...
LazhyCros5's user avatar
1 vote
1 answer
170 views

I am learning assembly development on Windows 10 (64-bit) and using IntelliJ IDEA to write my assembly code. I'm trying to log multiple outputs using WriteConsoleA, but only the first log message ...
kavi castelo's user avatar
3 votes
1 answer
425 views

I already learned that on the x86-64 platform using any 64-bit register would need a REX prefix, and any address less than 64 bits would require an address-size prefix. On x86-64 bit: E3 rel8 is jrcxz ...
Ex-Kyuto's user avatar
35 votes
25 answers
52k views

A friend and I are going back and forth with brain-teasers and I have no idea how to solve this one. My assumption is that it's possible with some bitwise operators, but not sure.
user23126's user avatar
  • 2,071
49 votes
25 answers
24k views

Creating an OS seems like a massive project. How would anyone even get started? For example, when I pop Ubuntu into my drive, how can my computer just run it? (This, I guess, is what I'd really ...
stalepretzel's user avatar
2 votes
1 answer
266 views

I want to learn assembly, but the kind of tutorials i com across seem to adhere to one of two sides: either [relatively] high level or everything built from scratch. Personally, i want to learn from ...
Gajej's user avatar
  • 23
0 votes
1 answer
269 views

I don't really understand where the first data sector is supposed to be on a FAT formatted disk (especially for FAT-12 and FAT-16). I already read the Microsoft documentation for FAT systems, which ...
Alexandre Boissière's user avatar
0 votes
1 answer
66 views

I have recently created a tool, that allows me to access struct from anywhere in the code, just by the structs name. The way it works is pretty simple, allocate enough space to hold the desired ...
PappAdam's user avatar
2 votes
0 answers
591 views

I use the library fffmpeg_next from crates.io/ffmpeg-next in my project, which is a bindings to ffmpeg. I compile it on windows 11 with msys2 ucrt64 and windows-gnu compiler of rust. I would like to ...
anonymous's user avatar
1 vote
1 answer
240 views

I am making my own basic operating system and I obviously face some bugs, until now I have been just using the build logs but as the OS gets more complex it becomes very hard to debug. That's why I ...
user avatar

1
2 3 4 5
15