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

I am making my own UNIX like OS called Connor's UNIX and I am implementing kernel and userspace separation and I have been all day and this is as far as I can get it to work and if you need any more ...
Connor Thomson's user avatar
-1 votes
0 answers
67 views

I'm following the barebones guide on OSDev Wiki and I'm trying to compile my kernel.c file with i686-elf-gcc -ffreestanding -O2 -m32 -c kernel.c -o kernel.o but I constantly get the following ...
James Cho's user avatar
Tooling
4 votes
3 replies
94 views

I'm starting to learn x86 Assembly but Visual Studio refuses to be installed ("Sorry, something went wrong. The install operation failed") on my (Windows 10) machine; I've researched and ...
student signup's user avatar
-2 votes
0 answers
109 views

I have added some stuff in the new-stuff branch, and when I try to boot, it gets to the last "Entering protected mode..." step, but if I revert my kernel to how it was, it works just fine ...
Connor Thomson's user avatar
-7 votes
0 answers
90 views

You are given an assembly program that generates a CRC-32 lookup table and then computes a CRC-32–style hash over four input bytes. The task is to: Understand how the table is generated Follow the ...
Rusalina Begu P-2212's user avatar
-2 votes
0 answers
55 views

I'm going to take part in a competition like CoreWars8086. I know basic assembly, but I need sources to prepare to this specific type of contest. I did'n find a lot of information in the Internet and ...
ArtemiyPank's user avatar
Advice
0 votes
4 replies
184 views

Title: Why does GCC transform a >= 4 into a > 3 at -O0? JG seems more complex than JGE I'm analyzing a simple C code on godbolt and found GCC's code generation puzzling: long a; a = a >= 4; ...
Alexandr's user avatar
2 votes
2 answers
117 views

As you can see down at bottom on my stage 2 boot loader, I have a VGA write thing (Prints out "Starting kernel...", but when I use it, the system starts to boot loop, I have no idea why this ...
Connor Thomson's user avatar
1 vote
0 answers
77 views

I'm trying to compile code in OpenWatcom 1.9 written in assembly. On Windows, utils in use: wasm msys2 command: /d/Maksym/WATCOM/binnt/wasm.exe -5p kstart.asm -fo=kstart.obj output: Open Watcom ...
Maksym Semenii's user avatar
2 votes
1 answer
56 views

I would like to make a very simple qemu test with a generic powerpc 32 cpu, bare metal (no ROM or bios) I have a (stupid) BIOS code (it doesn't matter how simple and non-functional it is, as I'm not ...
Jean-François Fabre's user avatar
2 votes
1 answer
84 views

During debugging of some native code, I jumped into the assembly of calloc() on my MacOS (ARMv8). And I see some interesting technique, that seems to be checking if the instructions are defined at ...
Stanislav Bashkyrtsev's user avatar
2 votes
2 answers
175 views

I am trying to use an MSP-EXP3430G2ET with a Buzzer and a potentiometer on CCS. The goal of the program is to have 2 modes, a high frequency mode and a low frequency mode. If you press the button, it ...
Sofia Happy Banya Ceregido's user avatar
5 votes
1 answer
78 views

I am having a problem with a bootloader I made. Mostly used code snippets from wiki.osdev.org, and screeck (on Github and Youtube) . The issue is: the bootloader cannot jump farther than 0xFFFFF, and ...
Alexbrine's user avatar
2 votes
1 answer
84 views

%macro mov_dd 2 push eax push ebx mov dword eax, [%1] mov ebx, [eax] mov dword [%2], ebx pop ebx pop eax %endmacro section .data text db "Enter first Number: &...
user31887642's user avatar
1 vote
1 answer
110 views

I wonder if Intel (and Intel compatible) CPUs have an instruction (for diagnostic/debugging purposes) which, for a given linear address, returns the result of paging translation (i.e. the ...
Ruslan's user avatar
  • 144
Best practices
1 vote
2 replies
100 views

My assembly program reads characters in a text file by loading them one by one in register 'al'. However I sometime need to use rax fully, and I think this causes a partial register stall. Now I think ...
Kun Xiang's user avatar
-1 votes
0 answers
82 views

I am making a Brainfuck clone and my interpreter isn't working: // _ dicrement the instruction pointer by 3 if the current cell value is 0 // <, >, +, -, ,, . are the same as in bf .global ...
Isaac Luft's user avatar
0 votes
1 answer
90 views

I am trying to understand this LDA instruction. After the fetch instruction, IR holds LDA S. 1 - In the first step, DIN = [IR], IR is supposed to be interpreted as an address (because of the brackets),...
Mohamed Badis Kerdellou's user avatar
3 votes
1 answer
113 views

Consider the following MSR register (the register's value is for the sake of example): 0x0400000000000000 -> MSR[58] = 1 -> Instruction Relocation for MMU is activated. Now imagine I want to ...
manili's user avatar
  • 650
5 votes
1 answer
69 views

I'm brand new to Assembly, and I'm trying to figure out how to get my fibonacci program to work. However, it only prints 0's, no matter what I put in the x1 register. What am I doing wrong (or ...
Thomas Gorgij's user avatar
Advice
2 votes
1 replies
82 views

Does anyone know where I can find the definition of the DEFINE keyword/instruction used in the source code of the Microsoft BASIC interpreter released to the public by Microsoft here: https://github....
CountWobula's user avatar
4 votes
1 answer
108 views

im trying to make a simple bootloader that loads a simple kernel and the problem is that the kernel code doesnt run i do see prints from the bootloader but not from the kernel here is my code: boot....
someuser's user avatar
Advice
1 vote
2 replies
132 views

What is the difference between an interrupt and a context switch? I understand the concept of an interrupt and how it occurs. However, I'm digging deeper into the topic. I studied Computer ...
Gabriele's user avatar
4 votes
1 answer
118 views

Consider the following snippet: ldr q0, [x0] cmeq v0.16b, v0.16b, #0 shrn v0.8b, v0.8h, #4 fcmp d0, #0.0 This is a common way to implement functions such as strlen with SIMD. According to the Arm64 ...
alexisrdt's user avatar
  • 524
2 votes
1 answer
65 views

I am quite new to the PICs and especially with XC8 pic-as and MPLAB-X I have a ultra minimal project i am working on, and i have some questions regarding the OSCCAL values located at the reset vector, ...
nipil's user avatar
  • 140
0 votes
1 answer
72 views

I'm using STM32F103C8T6 to receive the signal from INMP441 with I2S. Using Standard Periph Library with keilC. I configured GPIO, I2S, Usart, I want to get data from INMP441 then send it to esp32 ...
Do Quang Vinh's user avatar
Advice
1 vote
2 replies
147 views

I was curious and wondering how many registers are on an x64 processor. I know there are 16 general purpose registers available to the user, but there are supposedly general purpose alias registers ...
misInformationSpreader's user avatar
Best practices
2 votes
10 replies
288 views

In C, when I pass a pointer to a function, the compiler always seems to assume that the data pointed to by that pointer might be continuously modified in another thread, even though in actual API ...
Moi5t's user avatar
  • 465
-2 votes
1 answer
73 views

I have a file with the literal Hex content vectors.bin = "12345678900000000" .data .align 1 vectors: .incbin "vectors.bin" .text # main variables we don't want changed by ...
Xander's user avatar
  • 1
0 votes
1 answer
66 views

I’m experimenting with LEGv8 assembly and trying to build a 64-bit constant using MOVZ and MOVK MOVZ x2, #0x10, LSL 32 MOVK x2, #0x0600, LSL 16 MOVK x2, #0xC614 Decimal: 100714004 So if I ...
Turhan Ergene's user avatar
0 votes
0 answers
60 views

I successfully implemented a keypad matrix in an atmega328 through polling in the main loop and now my goal is to do it only on key press (using pin change interrupt). I'm using PORTB[3...0] for rows ...
Nabil's user avatar
  • 116
5 votes
1 answer
142 views

I am currently developing software for the Atmel AVR32 AT32UC3C0512C. The software consists of C modules (.c files) as well as standalone assembler modules (.S files). My IDE is Microchip Studio 7.0....
Binarus's user avatar
  • 4,547
2 votes
0 answers
214 views

I am creating heap allocated memory with execute rights using windows.h VirtualAlloc and VirtualProtect. void* write_into_executable(uint8_t code[]) { SYSTEM_INFO info; GetSystemInfo(&info)...
Horlou's user avatar
  • 29
3 votes
1 answer
116 views

I'm writing hello-world program for Minix 3.3.0 i386 in assembly. The exit(2) call works (and the exit code is propagated), but the write(2) call doesn't work. What am I doing wrong, and how do I fix ...
pts's user avatar
  • 88.7k
2 votes
1 answer
183 views

I am trying to call idiv r/m8 using MSVC2022's current Microsoft Visual C++ Compiler 17.4.33403.182 and C++. Using the most straightforward approach: struct cdiv_t { // char std::int8_t quot; ...
JohannesWilde's user avatar
4 votes
1 answer
150 views

I'm trying to write a simple hello world bios for Qemu as an academic exercise, and I've gotten Qemu to believe the display is initialized. I see a black screen upon boot, but writing to character ...
Matthias Birkemeier's user avatar
1 vote
2 answers
161 views

My question is focused specifically on assembly (intel). In C for example, recursion can be done with a simple return command but in assembly I feel like there's a lot more things going on, especially ...
Danilo Jonić's user avatar
-2 votes
4 answers
207 views

I have a case where I have a bitfield that I know starts off as all zeros. And then I then I have something like: if (isTrue) bitfield |= flag; And what I wanted to do was to set it without ...
Zebrafish's user avatar
  • 16.3k
1 vote
1 answer
107 views

I am working on an assembly kernel, using the OSDev Wiki and a PDF from Nick Blundell. I have set up my GDT and it seems to work fine. I am also able to load the IDTR as well. However, when I try to ...
HAXBABA's user avatar
  • 35
2 votes
2 answers
150 views

Consider the assembly program below: .section .data .section .text .global _start _start: pushl $85 #make it obvious in memory popl %ebx movl $1, %eax int $0x80 It ...
Hoax's user avatar
  • 25
2 votes
1 answer
137 views

I've followed the book OS01 by Tuhdo, kind of made a simple bootloader, that loads the kernel. Then I tried to add some code to set up GDT, but I've witnessed unusual behavior in gdb. Here I stopped ...
nhanphamdev's user avatar
2 votes
2 answers
148 views

Using CMAKE_BUILD_TYPE="Debug" my MSVC 2022 [17.4.33403.182] produced one idiv call for the quotient and an identical idiv call for the remainder. The code was simply [see here for the ...
JohannesWilde's user avatar
0 votes
0 answers
65 views

We were assigned to write an 8085 assembly language program to multiply two 2-digit decimal numbers after being introduced to the DAA instruction in our microprocessor course. Here are the example ...
M.B.'s user avatar
  • 279
4 votes
0 answers
412 views

I've been investigating the assembly output for a simple C++ loop involving a const array and const size, and I've encountered peculiar version-specific behavior with GCC on Compiler Explorer. My ...
BullRMachineR's user avatar
3 votes
2 answers
154 views

I'm learning Assembly through the "Easy 6502 by skilldrick" website. I have one question. I'm in the part about branching. I wrote the following code: LDA #$FA ADC #$01 BCS ...
Federico Egidi's user avatar
3 votes
1 answer
146 views

I'm experimenting with measuring CPU's instructions latency and throughput on P and E cores using RDPMC on Win 11, something like that: MOV ECX, 0x40000000 ; Instructions Counter RDPMC ; Read ...
Andrey Dmitriev's user avatar
1 vote
0 answers
43 views

I’m learning SIC/XE assembly and I ran into a confusing behavior with addressing modes. Consider these two examples: MOJPRG START 0 +JSUB #WRREC HALT J HALT WRREC RSUB MOJPRG START 0 +JSUB ...
ab55's user avatar
  • 38
0 votes
1 answer
148 views

writing some simple assembly code, the program segfaults at the second call of subroutine _printint. This only happens if i remove push rdx and pop rdx from either the _printint subroutine or the ...
idkmanjustfixmycode's user avatar
2 votes
0 answers
77 views

I'm having trouble writing what should be a simple character counting program. Here's the file with the .data section, as given by the author of Learn to Program with Assembly, which I'm following (I ...
Andrew Boone's user avatar
2 votes
2 answers
123 views

I'm writing a little toy program to try to help myself better understand this language (AT&T syntax, x86_64 assembly language). Consider this code, if you'll be so kind: .section .data mystring: ....
Andrew Boone's user avatar

1
2 3 4 5
904