Questions tagged [data-segment]
54 questions
2
votes
2 answers
Data segment vs stack
A global variable is allocated in the data segment, while a local one stays in the stack. I know that accessing a variable stored in the heap is slower than accessing a local variable, but I don't know if accessing a local variable is faster than…

Francesco Di Lauro
- 618
- 7
- 22
2
votes
1 answer
Legal data segement constructions
I would like to get some help with this questions:
what is correct and legal in following definition of the data segment:
data segment
x db -23, 3 or 4, not -3, 9 xor 15, 129, $+x, SEG x, -128 LT 80h
db -129, x+1, b2h, 256, 7852h, byte…

Bogdan M.
- 2,161
- 6
- 31
- 53
1
vote
1 answer
How to handle data type conversation in python?
I am doing the data segmentation using python for some csv data. I have below columns like Actionid, name, title.
The data in given column is like;
Currently I am getting below error
My code is ;
import pandas as pd # for dataframes
import…

Amaze_Rock
- 163
- 3
- 16
1
vote
0 answers
Matplotlib: How can i use a column as data segmentation on matplotlib?
i've a question about matplotlib.
I have a table just like this.
data = pd.Dataframe(alldata)
print(data)
index | id | type | date | value |
---------------------------------------
0 | 1 | apples | 01-01-15| 100.00|
0 | 1 | apples …

Diego Luchetti
- 11
- 1
1
vote
2 answers
apply heat map to the opencv rectangle
iam trying to apply a heat map on a selected portion[people's face] of my picture. Here is what i had done so far...
the rectangle will be applied to the face .
the face will be cropped
heat map will be applied to the cropped image.
# Draw a…

natasha
- 41
- 2
1
vote
0 answers
Cannot set more segment Assembly
I Cannot set more segment or array. Assembly
i think is because i dont have space or something
IDEAL
MODEL huge
P386
STACK 256
DATASEG
pcxA DB 65200 DUP(?)
SEGMENT pcx para public 'DATA'
DB 65200…

Gad
- 154
- 8
1
vote
2 answers
Memory allocation layout issues in C (64-bit)
I wanted to understand how a "C" program runs and store the data in machine.
So I looked into Memory Layout of C from here and I followed the same instructions in my machine which is 64-bit.
First when I wrote the program (main has only return 0;)…

heeat
- 128
- 2
- 9
1
vote
1 answer
uninitialized variables of a object file not showing in linux size command
Created a source file test1.c with the following code :
#include
#include
int x = 15;
int d = 15;
int m = 18;
int k = 0;
int c = 0;
int l;
int main()
{
int y = 5;
int ma = 10;
int am = 10;
printf("Hello…

New_Bee
- 81
- 4
1
vote
2 answers
Two Stacks in Assembler?
I am coding in 8086 assembler and I have ran into an interesting question. The topic is to evaluate parentheses. If this was a question in Java or C, I would simply define two stacks - one for numbers, and another for operands. Can I do something…

DoronZor
- 11
- 2
1
vote
2 answers
Does QEMU have restriction on executing a command from DATA section?
I'm using QEMU to simulate an ARM11 CPU.
My program is too complicated to explain here, so i'll project the issue into a simpler program.
So my program contains 2 c files:
main.c
some_code.c
I'm compiling some_code.c (into some_code.o) and then i…

OmriR
- 13
- 3
1
vote
1 answer
Why global variables are stored in heap?
Why in the following example the global variables are stored in the heap segment, instead of the data/bss segment?
From the following output of the maps pseudo-file, the data/bss segment is the 3rd line. This is because it is read/write, and…

Paschalis
- 11,929
- 9
- 52
- 82
1
vote
3 answers
How to get Data Segment Size in C++
I need to do analysis of memory requirements of one library written in C++, because HW engineers need get some idea about memory requirements of our hardware, there are working on. I can measure heapsize peak, I can measure stack size, but I don't…

Tomas Kubes
- 23,880
- 18
- 111
- 148
1
vote
0 answers
data in data segment not accessible
I have some problems when accessing data when it is located in
section .data
I wrote a small program in assembler (using NASM) which consists of a bootloader that loads some 'kernel' code. This kernel code is then executed once loaded in…

Chris
- 117
- 1
- 5
1
vote
1 answer
Assembly: data segment when called from C or created as an independent program
I'm confused about this; I don't think that there should be any difference
in both cases , the program ends up as exe file.
Please help if you think a differ....
Let me clarify my question:
Is there is a difference in the data segment …

aristotaly
- 11
- 2
1
vote
1 answer
How can I read data from data segment using x86 assembly?
Im using nasm32, x86 assembly language. I want to read some number from data segment.
.model small
.stack
.data
DATA1 DB 53H,"$"
DATA2 DB 17H,"$"
.code
.startup
mov dx, @data
mov dx, offset DATA1
add dl,30h
mov ah, 02h
int 21h
mov…

Flask_KR
- 269
- 1
- 6
- 14