instruction-encoding Questions
7
Solved
I was looking at the different instructions in assembly and I am confused on how the lengths of different operands and opcodes are decided upon.
Is it something you ought to know from experience, ...
Breana asked 31/12, 2010 at 3:33
2
Solved
Mostly of a historical interest and if I were to implement 8086 compatibility for assembler, what operands are considered valid for ESC instruction?
ESC opcode, source
From 8086 Programmer's manu...
Crossbeam asked 1/3, 2017 at 23:11
1
Solved
I'm trying to wrap my head around the x86 instruction encoding format. All the sources that I read still make the subject confusing. I'm starting to understand it a little bit but one thing that I'...
Dygall asked 23/8, 2021 at 20:48
1
Solved
Playing around a bit with Turbo Assembler and Turbo Debugger, I was surprised about opcodes. More precisely, I have some assembled binary in which Turbo Debugger disassembles the word
29 C3
...
Domenech asked 22/8, 2021 at 15:0
1
Solved
I used a website to encode this:
movw $8, 4(%r8d,%esi,4)
and got:
encoding (hex): 67 66 41 C7 44 B0 04 08 00
Thanks to you I nearly understand everything except 2 small points:
Here we are movin...
Weltanschauung asked 31/7, 2021 at 19:23
1
Solved
In instruction encoding Default sizes are:
operand size is 32 bit
address size is 64 bit
We can use the legacy prefix:
0x66 – Operand-size override prefix
to make operand size 16. What if I want...
Purify asked 31/7, 2021 at 17:54
1
Solved
In instruction encoding we have an optional field REX prefix which is split like this:
Field contains
0100 – fixed constant value
W – 1 when using 64-bit data
R – expands the Reg field to 4 bit
X...
Haga asked 31/7, 2021 at 17:25
2
Solved
We know that jal specifies a 21-bit offset. However, it does not encode a 21-bit offset but a 20-bit one. The reason is that the least significant bit of an address is always zero because the small...
Ladyfinger asked 25/12, 2019 at 18:12
1
Solved
I am reading Intel doc, vol. 1 and There is a chapter of 3.6.1
Operand Size and Address Size in 64-Bit Mode. There are three prefixes REX.W, operand-size 66 and address-size 67 prefix. And there is...
Isogloss asked 21/1, 2020 at 21:25
1
Solved
So I am learning how x86 works and have come across people saying that it is byte-addressable, yet can read words, double words, etc.
How does the processor decide which method to use and when?
E.g...
Allness asked 30/10, 2019 at 14:56
1
Solved
I'm writing my own assembler and trying to encode the ADC instruction, I have a question about immediate values, especially when adding 8-bit value into the AX register.
When adding 16-bit value: ...
Kiely asked 10/6, 2019 at 9:51
1
Solved
I am reading the ia-32 instruction format and found that ModR/M is one byte if required, but how to determine if it is required, someone says it is determined by Opcode, but how? I want to know the...
Cookhouse asked 23/3, 2019 at 9:44
3
Solved
I am reading some material which quotes Intel's vol.2 SDM x86 manual about opcodes and machine-code encoding of assembly instructions, but I cannot understand what things like cw, cd, /2, cp, or /3...
Evulsion asked 22/2, 2013 at 5:43
1
Solved
looking at http://ref.x86asm.net/coder32.html I found two opcodes that match for the statement
xor eax,eax
1) opcode 31 XOR r/m16/32 r16/32
2) opcode 33 XOR r16/32 r/m16/32
both refers to 32bi...
Orelia asked 14/5, 2018 at 17:52
1
How does the CPU distinguish CALL rel16 (E8 cw) and CALL rel32 (E8 cd)?
According to this site, mirroring the Intel architecture manuals, the opcodes for CALL rel16 and CALL rel32 are E8 cw and E8...
Lundell asked 3/7, 2017 at 9:40
1
As a small recall, the x86 architecture defines 0x0F 0x1F [mod R/M] as a multi-byte NOP.
Now I'm looking at the specific case of an 8-byte NOP: I have got
0x0F 0x1F 0x84 0x__ 0x__ 0x__ 0x__ 0x__
...
Nomarchy asked 31/12, 2014 at 0:21
2
Is there a way to 'mov'e a specific immediate byte-size number into a direct memory location? I.e.
MOV 10h,ffffh
to write the value 16 into the memory address 65535? If so, which opcode is that,...
Handy asked 13/9, 2011 at 21:49
3
Solved
As I use objdump -D to disassemble a binary, the typical code of jmpq is like e9 7f fe ff ff, which is used for representing a negative offset. However, the address of x86-64 is 64(48)-bit (to my k...
Eastbourne asked 16/11, 2014 at 8:31
4
Solved
I am new to Assembly language. I was reading about the MIPS architecture and I am stuck with the Jump Target Address and Branch Target Address instructions and how to calculate each of them.
Yelp asked 5/8, 2011 at 0:40
2
Solved
For example, given a hex: 83 E4 F0
By looking at the intel developer's manual, I can figure out that 83 means and and FO means the -16. Looking at E4, I can decode that the source/destination regi...
Marhtamari asked 19/2, 2013 at 16:47
3
Solved
Suppose I want to do a short jump using the EB opcode, jmp rel8 short jump
Intel manual entry for it:
EB CB or JMP rel8
"Jump short, RIP = RIP + 8-bit displacement sign
extended to 64-bits&qu...
Riana asked 15/2, 2013 at 6:54
1
© 2022 - 2024 — McMap. All rights reserved.