Questions tagged [addressing]

153 questions
129
votes
9 answers

Call Activity method from adapter

Is it possible to call method that is defined in Activity from ListAdapter? (I want to make a Button in list's row and when this button is clicked, it should perform the method, that is defined in corresponding Activity. I tried to set…
user1602687
  • 1,477
  • 3
  • 14
  • 13
11
votes
2 answers

What memory is used for storing the reset vector?

from wikipedia: The reset vector for the 8086 processor is at address FFFF0h Where is the reset vector stored?
9
votes
2 answers

Absolute addressing for runtime code replacement in x86_64

I'm currently using some code replace scheme in 32 bit where the code which is moved to another position, reads variables and a class pointer. Since x86_64 does not support absolute addressing I have trouble getting the correct addresses for the…
nux
  • 355
  • 3
  • 10
8
votes
1 answer

x86 and Memory Addressing

I've been reading up on memory models in an assembly book I picked up and I have a question or two. Let's say that the address bus has 32 lines, the data bus has 32 lines and the CPU is 32-bit (for simplicity). Now if the CPU makes a read request…
IM.
  • 317
  • 3
  • 7
8
votes
3 answers

MATLAB: extract submatrix with logical indexing

I'm looking for an elegant solution to this very simple problem in MATLAB. Suppose I have a matrix >> M = magic(5) M = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 …
foglerit
  • 7,792
  • 8
  • 44
  • 64
7
votes
4 answers

How does 32-bit address 4GB if 2³² bits = 4 Billion bits not Bytes?

Essentially, how does 4Gb turn into 4GB? If the memory is addressing Bytes, should not the possibilities be 2(32/8)?
mkatt
  • 433
  • 1
  • 4
  • 11
7
votes
1 answer

PIE disabled. Absolute addressing not allowed in code signed PIE

I'm working with Xcode 4.5 with a deployment target of iOS 5.1 I'm getting the following warning when I compile my app in relation to two specific methods which have significantly increased in size. ld: warning: PIE disabled. Absolute addressing…
6
votes
4 answers

How to offload memory offset calculation from runtime in C/C++?

I am implementing a simple VM, and currently I am using runtime arithmetic to calculate individual program object addresses as offsets from base pointers. I asked a couple of questions on the subject today, but I seem to be going slowly nowhere. I…
dtech
  • 47,916
  • 17
  • 112
  • 190
5
votes
1 answer

Diference between offset and Index in addressing modes?

In http://en.wikipedia.org/wiki/Addressing_mode Indexed absolute +------+-----+-----+--------------------------------+ | load | reg |index| address | +------+-----+-----+--------------------------------+ (Effective…
Tim
  • 1
  • 141
  • 372
  • 590
5
votes
3 answers

how do addressing modes work on a physical level?

I'm trying to learn this basic thing about processors that should be taught in every CS department of every university. Yet i can't find it on the net (Google doesn't help) and i can't find it in my class materials either. Do you know any good…
5
votes
2 answers

If a SNES has 128k memory and in assembly you can reference $FF:FFFF addresses, how does this work?

Am I misunderstanding something here? 128kB is way smaller than 0xFFFFFF bytes.
VJC1288
  • 97
  • 8
4
votes
5 answers

how does pointer adressing work in c++

I am confused about pointer pointing to address of variable it points to last two bytes how does this work #include using namespace std; int main() { int i = 1; short *j = (short*)&i; cout << *j << endl; } .
SRN
  • 2,418
  • 3
  • 22
  • 26
4
votes
1 answer

For dense access, is it better or worse to freeze an array first?

Let's say I have an Data.Array.IO.IOArray i e (from the array package) and I would like to read elements from it, processing each element, one by one, in IO, according to some index ordering: arr :: IOArray I E ordering :: [I] processElement :: I ->…
Cactus
  • 27,075
  • 9
  • 69
  • 149
4
votes
1 answer

Java: Size limitation on direct IntBuffer?

I want to allocate a direct IntBuffer in Java with, say, a billion elements (64-bit system). The only way I know of is creating a direct ByteBuffer and viewing it as a direct IntBuffer. However, 4*1,000,000,000 exceeds Integer.MAX_VALUE, so my…
Flowi
  • 45
  • 4
4
votes
1 answer

What exactly does the granularity bit of a GDT change about addressing memory?

If this bit is zero, then memory is addressed byte by byte? And if it is 1, then memory is addressed 4Kb by 4Kb? So for example, if this bit was set to 0, and i addressed memory location a000h, then i would be addressing the byte at that location…
kbzombie
  • 322
  • 2
  • 12
1
2 3
10 11