Questions tagged [addressing]

153 questions
4
votes
2 answers

What is PC-relative addressing and how can I use it in MASM?

I'm following Jack Crenshaw's compiler tutorial (If you look at my profile, that's what all my questions are about lol) and it just got to the point where variables are introduced. He comments that the 68k requires everything to be…
rpatel3001
  • 147
  • 1
  • 11
4
votes
3 answers

Assembler: Calculating a memory address with register base

I have this simple assembler command: mov eax, fs:[30h]; My problem is that I need to know what specific address is really read by this command. I found a lot of documentation about the assembler addressing modes but nothing about the register:…
Robert
  • 39,162
  • 17
  • 99
  • 152
3
votes
3 answers

We use ampersand during user input but Why we don't need this during assignment in C?

We use ampersand(&) operator during user input. It means we are assigning the particular value to the memory address of the particular variable. But during assignment of a value, we don't need ampersand. How is the value being passed without any…
Sohid Ullah
  • 75
  • 1
  • 1
  • 7
3
votes
1 answer

Why does the address of a local variable keeps changing during every execution of the same binary image?

I have small code snippet like below: char global=100; void main() { char p = NULL; printf("%p\n", &p); printf("%p\n", &global); } Once after compiling and generating a binary executable image, on every…
Darshan L
  • 824
  • 8
  • 30
3
votes
2 answers

What is the minimum number of addressing modes necessary for computation?

In x86 Assembler, given that you have Immediate addressing mode for allocating numbers Register addressing mode for registers Direct addressing mode for memory addresses, why do you need Indexed and Base Pointer addressing modes? Each could be…
AdHominem
  • 1,204
  • 3
  • 13
  • 32
3
votes
2 answers

Find the address of a DLL in memory

I have just been getting into low level programming (reading/writing to memory that sort of thing) and have run into an issue i cannot find an answer to. The piece of information i want to read from has an address that is relative to a DLL loaded in…
Paul Harris
  • 5,769
  • 1
  • 25
  • 41
3
votes
2 answers

How does base address register gets address?

I've finished developing a pcie driver for an FPGA under a linux distributiuon. Everything works fine. But I'm wondering where the base address register in the PCI Endpoint of the FPGA gets the base address. When I've generated the PCIe Endpoint I…
user3619609
  • 29
  • 1
  • 3
3
votes
1 answer

MIPS - How to find the address value of branch and jump instructions

I have an exam coming up, and I am completely stuck on this question (see below); even looking at the model answer did not help. I've tried reading our main text for the topic, but still have no idea how to do this. If anyone could provide a…
helencrump
  • 1,351
  • 1
  • 18
  • 27
3
votes
1 answer

Modbus slave count limitation

I have two questions: Why does Modbus allow only 247 slaves to be connected to the same network? How it this limitation overcome by Modbus TCP/IP?
Prem Sanil
  • 128
  • 8
3
votes
1 answer

how to differentiate between memory (heap) - and stack- addresses

my question is: When I have something like this: lea rax, rbp - 8 // Maybe that's an int on my stack, because I have a local "int"-variable in my code. How does the CPU know, where the data is, when I do this: mov qword [rax], 14 I mean, it's just…
Banyoghurt
  • 195
  • 11
2
votes
1 answer

Simpletron machine and indirect addressing

I recently made the Simpletron assignment from the Deitel and Deitel textbook. The Simpletron machine language has only one addressing mode which is direct addressing. (That is, you have to specify the address you want to access in the operand part…
GionJh
  • 2,742
  • 2
  • 29
  • 68
2
votes
2 answers

How can i address parameters arrays so i can avoid getting undefined Error?

I'm not precisely sure about what causes this error in my code but I guess it's the poor approach of addressing a parameter in the resualtValues function. ** thank u all in advance.** const calculator = { sum:[], …
2
votes
1 answer

How to assemble and link with ml64 in true 64-bit mode (with LARGEADDRESSAWARE)?

I am working on reworking an old masm program to true 64-bit x64 mode using Microsoft's ml64 and link on Windows 10. The linker gives an error in code that has a REX.W prefix. The linker's /LARGEADDRESSAWARE option sounds like the right thing for…
2
votes
3 answers

Terms used for addressing modes. [intel 8085]

In the documentation of a processor I am working on it says : Operand addressing modes available are implied, register, immediate, direct and register indirect (using the BC, DE and HL register pairs as 16-bit pointers to memory). Can…
2
votes
2 answers

What is the name for this hash table optimization?

While implementing a custom hash table with open addressing, I discovered that for my application, it helps performance if I swap the probed element in a row of filled slots with the one in the first probe location. (To optimize the table to quicker…
onno
  • 1,291
  • 2
  • 9
  • 7
1
2
3
10 11