Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
193 views

I am using an Ubuntu 16.04 a 32-bit Virtual Machine OS. I executed sysctl -w kernel.randomize_va_space=0 to disable ASLR in root prior to gcc. I have also compiled this using the command: gcc -g -fno-...
Wabba Fett's user avatar
-2 votes
1 answer
91 views

I'm trying to understand how to get memory addresses from the page https://datacrystal.tcrf.net/wiki/Pok%C3%A9mon_Gold_and_Silver/Flags in order to put them in my pyboy project. For instance I want to ...
Paganini's user avatar
0 votes
1 answer
86 views

I want to understand how memory is allocated to function params in c. I compiled the same program twice with gcc -g except I interchanged the first and second params of a function on_menu for the ...
Groot's user avatar
  • 19
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
1 vote
0 answers
77 views

#include <stdint.h> #include <stdbool.h> #include <reg_mg82f6d64.h> #define RegFifo 0x00 #define RegIrqFlags1 0x27 #define RegIrqFlags2 0x28 void wrb(uint8_t dat); ...
osLIII's user avatar
  • 39
4 votes
1 answer
202 views

Program Code - 1 .386 .model flat .data Array1 DWORD 1,2,3,4,5 var1 DWORD $ .code start PROC MOV EAX, OFFSET Array1 MOV EBX, var1 LEAVE RET start ENDP END Program Code - 1 ...
Nalan PandiKumar's user avatar
1 vote
3 answers
380 views

I am learning assembly programming on the 8086 microprocessor, and I would like to understand the difference between the effective address and the physical address My teacher said that the effective ...
OLC Yousra's user avatar
-4 votes
3 answers
242 views

I'm working on code examples that demonstrate how you can "shoot yourself in the foot" using pointers in C++. It's easy to create code that crashes. But now I'm trying to write code that ...
Community College Teacher's user avatar
1 vote
0 answers
145 views

I am currently doing an experiment for S6.828 and I am facing a problem. +------------------+ <- 0xFFFFFFFF (4GB) | 32-bit | | memory mapped | | devices | | |...
YD233's user avatar
  • 11
1 vote
1 answer
91 views

I'm working on a legacy MUD codebase, and I've been getting the bug message in this block of code. I'm trying to understand it, but also I'm wondering how it's even able to ever work? Aren't addresses ...
BrainFRZ's user avatar
  • 407
0 votes
0 answers
88 views

I understood that the & operator is context dependent, int var = 5; int* ptr = &var; In the above code, &var returns the address of var, then gives it to the pointer. On the other hand ...
Anjonimus's user avatar
1 vote
0 answers
185 views

According to this DPDK blog, physical addresses of huge pages are "pinned": Whenever a memory area is made available for DPDK to use, DPDK figures out its physical address by asking the ...
Adhamzhon Shukurov's user avatar
2 votes
2 answers
258 views

The C Standard defines lvalue as: An lvalue is an expression (with an object type other than void) that potentially designates an object;64) if an lvalue does not designate an object when it is ...
user135792's user avatar
0 votes
1 answer
121 views

I wanted to look at the byte-representation of different objects in memory and found this function to do it: template <typename T> void print_bytes(const T& input, std::ostream& os = std:...
a_floating_point's user avatar
0 votes
2 answers
75 views

This code shows that b variable is placed right after a variable: #include <stdio.h> int main(void) { int a; int b; a=15; b=2654; printf("%d %d\n", a, b); &...
Stepan0806's user avatar
1 vote
2 answers
114 views

Is it even possible? I was asked about the values that appear on the stack, in a way that without knowing the var type, just by analyzing the bytes I should be able to recognize if it's an address or ...
Lion12's user avatar
  • 19
0 votes
1 answer
84 views

#include <stdio.h> int main(void){ int a; int b; printf("%d %p %d %p", a, b, &a, &b); return 0; } I have writen this C program trying to explore the ...
Nikos Konstantinidis's user avatar
0 votes
2 answers
177 views

I am practicing on C programming language. I had Win 10 systems and I was practicing on it and I always get addresses which are multiples of 2. Know, I am practicing on Macbook Pro M3 and I get 9 ...
Mert KİREMİTCİ's user avatar
1 vote
0 answers
29 views

I am using a simple shell script to read out data from /proc/pid/mem. Setup: This is done through android studio by using adb shell and su. Then, I use /proc/pid/maps to read out a memory range, ...
gulhilaarhe's user avatar
0 votes
1 answer
152 views

In real mode, an x86 CPU can only see address space that ranges 0x00000 to 0xFFFFF. MBR code is loaded into 0x07C00 by the BIOS. If that MBR code immediately switched into protected mode, where in the ...
Melab's user avatar
  • 2,936
-2 votes
1 answer
101 views

I am trying to decrement a pointer while setting values to what the pointer is poiting to. When setting the values they show that they have been properly set, but when trying to retrieve them again it ...
DaBoat's user avatar
  • 1
1 vote
1 answer
37 views

When viewing memory addresses in Visual Studio, I noticed the arrangement changes depending on how the memory is viewed. Example: int a = 3; int* b = &a; 1 byte: 0x 03 00 00 00 2 byte: 0x 0003 4 ...
sei783's user avatar
  • 11
2 votes
2 answers
158 views

The register for the CAN RX & TX buffer/FIFO start address (F0SA/TBSA) only consider the lower 16 bits of an address but a RAM address can span from 0x20000000 to 0x20040000 (18 bits). Link to ...
Alex Jegers's user avatar
5 votes
2 answers
302 views

I've recently come across Can I take the address of a function defined in standard library? and was shocked by the fact that the answer is fundamentally No. I surely have written &std::...
Enlico's user avatar
  • 30.2k
0 votes
2 answers
109 views

Here is the C code snippet. #include<stdio.h> int N = 10; while (N--) { int *a; printf("%p\n", &a); } The running results(Compiler: tdm-gcc 4.9.2 64-bit release, os: ...
Lukrisum Trvan's user avatar

1
2 3 4 5
37