I learnt from assembly language some addressing mode. But I find out that for different segment, we have different addressing mode, for example, you cannot use PC-relative addressing for data. Why is that?
Why code and data have different addressing mode?
119 views Asked by JiangFeng At
1
There are 1 answers
Related Questions in MEMORY-ADDRESS
- 9 Digit Addresses in Hexadecimal System in MacOS
- Why does setting the unused bits of a virtual address cause a segfault?
- Understanding virtual to physical memory translation in Android
- Getting the address of list[0].next in Sigma16 and calling it X1
- How Python know that it has to give a new address for a variable?
- Converting virtual address to real address - in hexadecimal
- Where are real mode address contents located in protected mode?
- How do computers store variable addresses?
- Is there any problem in this MIPS code? Like address out of the bounds? What the meaning of the code?
- Why doesnt decremented pointers return the right value?
- Is it UB to reinterpret_cast a T* to a uintptr_t, reinterpret_cast that uintptr_t to a void*, then static_cast that void* back to a T*?
- Why Visual Studio memory addresses shuffle based on view?
- Understanding the interpretation of array labels
- How do I initialize an array at a specific address for CANbus RX/TX FIFO start address register (ATSAME51)?
- Logical address generation is done by the CPU or by the Compiler?
Related Questions in ADDRESSING-MODE
- Need clarification on the dummy read in absolute X indexed
- In MASM what is array[4]
- Struggling to understand 'Zero-Page Indirect Address Indexed by Y' for the 6502 Assembly Language
- How is address arithmetic handled in NASM for x86 in hardware
- Why do parentheses do different things based on context in AT&T syntax?
- 32-bit registers in addressing modes in 64-bit assembly not allowed?
- How to interpret memory reference on right side of assembly equation?
- Is there a way to dereference a pointer stored in memory?
- Confusion about addressing modes - how does a register by itself outside () work as an ADDRESS_OR_OFFSET constant?
- Is "strb w0, [x2, w3, uxtw]" the same as "strb w0, [x2, w3, uxtw #0]"?
- How to read/pronounce a MIPS load-byte instruction in English?
- How to decode or encode cmp instruction in x86 (ATT syntax)? R/M =100?
- String length calculation and print in emu8086
- Load Word in MIPS, using register instead of immediate offset from another register
- Invalid effective address - subtracting two registers
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
For an operating system with properly implemented integrity, code should not be allowed to manipulate its own memory space other than some high level functionality such as loading additional modules, otherwise it would not be possible to debug a program that is changing itself to something else at run-time. A program's data space; however, can be manipulated as required by the program. It is likely best practice for an operating system implementation to clearly separate code space and data space to avoid problems with accidentally manipulating the code space.