Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
145 views

The ELF executable at the end of this question (base64'd) is the result of an experiment with trying to cut the program headers down to the absolute minimum. As far as I am aware, it should be ...
zwol's user avatar
  • 143k
2 votes
0 answers
43 views

I recently started working with STM32 and ARM Assembly. Studying the boot process of the STM32F103C8T6 microcontroller, I came across this line in the startup file generated by STM32CubeMX: .equ ...
strigidie's user avatar
Advice
1 vote
17 replies
92 views

I need to implement an X in the I/O module, and I have some code that worked for me, but I don't know how I could optimize it: make it shorter but maintain the same functionality. I also wanted to ask ...
Clay's user avatar
  • 1
-3 votes
0 answers
113 views

I have old Delphi 7 application with lib FastScript. This application can compile runtime code from text and call imported methods from main application. I need to create this functionality for my web ...
kocapb's user avatar
  • 3
2 votes
2 answers
121 views

Intel instruction VCVTSD2USI (and some similar AVG512 instruction with GPRs) is encoded as EVEX.LLIG.F2.0F.W0 79 /r VCVTSD2USI r32, xmm1/m64{er}, for instance VCVTSD2USI EAX,XMM0 is assembled to 62 F1 ...
vitsoft's user avatar
  • 6,017
Advice
0 votes
2 replies
80 views

How does the stack look like during procedure calls with it's shadow space ( 32 Bytes ) look like? let's say I've this : main : push rbp mov rbp,rsp sub rsp ,0x20 ; 32 Bytes shadow ...
Arcshahi's user avatar
5 votes
1 answer
121 views

I am writing some tests for VBE resolution using x86_16 assembly. I need to test a bitfield for some attribute flags, but I'm not sure of the best way to do so. The best solution I currently have is ...
Sermir's user avatar
  • 107
Advice
0 votes
2 replies
115 views

I am a beginner kernel engineer and I have tried creating an x86-64 Unix-like kernel from scratch using C and assembly for my real machine. I am also trying contributing to the Linux kernel. I am ...
Charlie_23's user avatar
2 votes
0 answers
159 views

I created a kernel with a multiboot header but GRUB fails to boot the if VM firmware is legacy BIOS. Linker script: ENTRY(_start) /* the name of the entry label */ SECTIONS { . = 0x00100000; /* ...
First Person's user avatar
2 votes
1 answer
111 views

I think this might be a already solved issue previously, but I still don't understand why this is happening and how to fix this in a clean and satisfactory way. I am writing a simple, basic GUI window ...
Felipe Dilho's user avatar
2 votes
1 answer
100 views

I'm writing a kernel in rust and assembly for embedded system in RISC-V 32 bits for several month now. I just notice today that when I run some task, after a certain amount of time, my kernel panic ...
Elouan Da Costa Peixoto's user avatar
Advice
1 vote
2 replies
97 views

Consider the following program, where X = Y = 0 initially: T1: T2: STORE X = 1 STORE Y = 1 MFENCE MFENCE LOAD Y LOAD X My understanding ...
RSIMB GO's user avatar
  • 184
Advice
0 votes
13 replies
86 views

STMicro ARM M0+ micro using STM32CubeIDE. I'm attempting to write a function to test some registers in assembly and use the local vars on the stack(or even global variables) to help tie the assembler ...
lynnejohn's user avatar
2 votes
1 answer
105 views

I am building an operating system for the x86_64 ISA. I am at the point in my development where I want to begin display things for the user graphically, and therefore wish to retrieve the monitor/...
Sermir's user avatar
  • 107
Advice
0 votes
9 replies
84 views

Re-asked as a normal question (not opinion-based / discussion) as How Does One Retrieve a Video Output's Preferred Resolution? This version should be deleted.
Sermir's user avatar
  • 107
1 vote
1 answer
139 views

I have recently started assembly programming and I have encountered an issue when assembling into an .exe file and then trying to run the program. For context, I use the FASM assembler, and I use ...
Jumpscare Myers's user avatar
1 vote
2 answers
96 views

I was trying to understand the cases in which forwarding is better than stall and vice-versa to handle data hazards (like RAW) in pipelining (RISC V architecture), I referred several sources to ...
vin's user avatar
  • 61
2 votes
1 answer
120 views

There are several examples in which we want to calculate something based on assembly language labels, but the object format and linker do not offer an operation needed for this particular calculation. ...
ecm's user avatar
  • 3,166
0 votes
0 answers
175 views

Dear Fellow Developers, I am interested in learning how the Portable Executable format works. So far, I have written files in the com-format, which are executable in DosBox. However, I would like to ...
Stefan Björnander's user avatar
2 votes
1 answer
131 views

DOS 6.22. Virtual Machine. Simple code: .model small, stdcall .386 .stack 1024 .code Main proc mov AX, @data mov DS, AX mov EBX, 00F00140h ; ebx contain 00F00140h mov EAX,...
IgorByte's user avatar
4 votes
1 answer
153 views

I was trying to make a RISC V program that was calling a function from another function. I understood that since when we were calling the second function the return address for the first function was ...
vin's user avatar
  • 61
Advice
1 vote
3 replies
104 views

I'm currently working on a DOS Kernel 32 Bits on x86 Assembly I'm looking for help, i want to print out the letter E on the screen to check if my code jump 16-Bits to 32-Bits is working correctly. ...
GoofyKetchup's user avatar
3 votes
1 answer
89 views

I have a macro that %defines a bunch of variables. I need them only for the duration of a single function, then they need to be %undefed at the end of the function. This, for example, doesn't work: %...
John Frickson's user avatar
3 votes
1 answer
101 views

I am learning x86 assembly (Intel syntax) and writing a simple calculator as a .COM program in FreeDOS. The program reads two digits and an operator from the keyboard and performs the operation. ...
Alejandro2007's user avatar
Best practices
1 vote
2 replies
75 views

Environment: Windows, Visual Studio, low level. A bit of context: One of my project is a static library with C functions that export functionalities. Some of those C functions make use of C functions ...
CVO's user avatar
  • 1
3 votes
1 answer
115 views

#include "hardware/regs/addressmap.h" #include "hardware/regs/m0plus.h" .syntax unified @ Specify unified assembly syntax .cpu cortex-m0plus @ Specify CPU ...
Pradhyumna Rao's user avatar
Advice
1 vote
7 replies
181 views

I just learnt that you can implement C (or any compiled language) functions in asm. Maybe to optimize them or to access CPU functionality that is not accessible otherways. I know some MIPS asm from ...
Irra's user avatar
  • 1
4 votes
2 answers
120 views

I am writing simple animation in Turbo C (for VGA, on a NuXT 2, an IBM PC/XT clone). I write the graphics to a buffer and then every frame, I clear the buffer, write the updated objects, then copy ...
PaulM's user avatar
  • 377
2 votes
1 answer
86 views

Context is bare-metal development on STM32H7 (Cortex M7) using arm-none-eabi_gcc v 10.2.1 I'm looking to the assembly code of a basic function void my_function(void) { my_sub_function(); } ...
Guillaume Petitjean's user avatar
4 votes
3 answers
294 views

This question is about binary cross-correlation of 128-bit value (the Haystack) with another 1-128-bit value (the Needle) with the goal of maximizing the throughput of this operation on INTEL/AMD x86 ...
George Robinson's user avatar
Advice
1 vote
3 replies
138 views

I've been looking at the zlib1.dll that comes with Win 11 Pro and I was hoping for some assistance with the following passage: 56b:    b8 71 80 07 80          mov    eax,0x80078071 [570:    41 0f 42 ...
Gyst's user avatar
  • 1
Advice
1 vote
10 replies
140 views

I am working my way through Douglas Comer's Xinu book and in Chapter 3 (Sec. 3.9.1), there happens to be a stack diagram for when a function is called under x86. It looks like: Intel Processor Stack ...
noobman's user avatar
  • 131
Advice
3 votes
9 replies
158 views

I'm an A-level computer science student (AQA). We had a question on assembly code, and the task was to change 0011abcd (abcd are 1s or 0s, just placeholders) to 0000abcd. I wrote the following: EOR R1,...
Paolo Mancini's user avatar
3 votes
2 answers
102 views

I am a beginner in x86 assembly language. I heard that Bios have a technology called big mode for executing or accessing other BIOS code or data in the range exceeding 64KB and far beyond the 0-1M ...
kafka's user avatar
  • 33
2 votes
0 answers
67 views

I tried to make a function that finds all existing PCIe device's functions and saves the physical address of their config space to an allocated memory for my os, but I noticed that I got WAY too much ...
someuser's user avatar
Advice
1 vote
2 replies
126 views

There is a C interface for linux syscalls defined in libc and described in man pages. There are also resources like this https://www.chromium.org/chromium-os/developer-library/reference/linux-...
Daniil Zuev's user avatar
3 votes
1 answer
89 views

I am trying to write a code that generates a random array of 14 day temperature readings; 11 readings per day. Then calculate the daily high/low temperatures for each day and calculate the average ...
Rachelle Brown's user avatar
3 votes
1 answer
90 views

I'm trying to read a float value from the console and print it out. I'm running this on a Raspberry Pi running Debian Bullseye. I started with this code. It has the float value hard coded and prints ...
Andrew H's user avatar
  • 568
Advice
4 votes
6 replies
101 views

I am developing a monolithic 16-bit OS in x86 Real Mode using NASM. I have successfully set up a basic GUI using VGA Mode 13h (320x200, 256 colors) by writing directly to the video memory segment at ...
pedro Sitorus's user avatar
6 votes
1 answer
270 views

The following C function is limited to 16 byte strings and it detects whether one string is contained in another string and if it is not then determines the maximum length of the first string's prefix ...
George Robinson's user avatar
4 votes
3 answers
275 views

I have this simple function which indirectly tests for NaN, and x86-64 gcc 15.2 with -O2 bool self_eq(float num) { return num == num; } Compiled as both C and C++, this produces: self_eq: ...
julaine's user avatar
  • 2,792
1 vote
1 answer
69 views

I wan create a simple EFI application in assembly for RISC-V for the purpose of education. Have want to port a working x86_64 example in assembly to RISC-V, but struggling with the correct calling ...
Johannes Krottmayer's user avatar
1 vote
0 answers
82 views

I'm currently working on an x64 Bootloader for a school project, but can't get it to run my Kernel. Bootloader.asm ;################################### ; Real Mode ;##########################...
Oskar T's user avatar
1 vote
1 answer
84 views

I was trying to manually craft my own windows pe and for some reason cant seem to find out why my program isnt running, ive crossed checked all my alignments, file alignments, section alignments and ...
Daniel's user avatar
  • 71
4 votes
2 answers
89 views

I'm trying to extend the public domain 86-DOS linker, WarpLink. A difficult task I'm considering is to change my debugger, lDebug, from building as a single (NASM) assembly language file (using many %...
ecm's user avatar
  • 3,166
0 votes
0 answers
90 views

Maybe this question has already been answered before, but I couldn't find one with my exact issue. I am consistently running into issues when trying to read my kernel from my stage2 bootloader which ...
Joel Trauger's user avatar
2 votes
1 answer
90 views

The idiv amd64 instruction is not working as I expect. When the dividend is negative, it produces a large positive number. xor rdx, rdx mov rax, -10 mov rbx, 5 idiv rbx push rax ; expected -2, got ...
les-citrons's user avatar
5 votes
0 answers
233 views

Suppose I have a procedure like this: procedure DoSomething; asm .PARAMS 11 // This will auto-generate "push rbp + sub rsp,$60 + mov rbp,rsp" // ... end; Suppose I need to return from ...
Александр Кулагин's user avatar
Advice
2 votes
8 replies
115 views

I have searched all over the internet and I'm beginning to wonder if this is even possible if not incredibly impractical. For using a jump table it looks like you have to hard-code the memory ...
user31862328's user avatar
Best practices
2 votes
8 replies
122 views

I have been reading the amd64 architecture manual available here, especially through integer vector instructions. I don't quite understand the (v)pshufd instruction, though I wonder if this could be ...
user31862328's user avatar

1
2 3 4 5
904