machine-code Questions
1
Solved
From Intel's SDM, section 2.2.1 specifies that the REX prefix is used to:
Specify GPRs and SSE registers.
Specify 64-bit operand size.
Specify extended control registers
But what do the letters...
Pledge asked 3/12, 2019 at 20:39
10
Solved
What is the difference between object code, machine code and assembly code?
Can you give a visual example of their difference?
Crumpton asked 21/1, 2009 at 20:17
1
Solved
In the table below extracted from Intel's docs we have for the opcodes E8 cw and E8 cd that the displacement is relative to the next instruction.
Why the next instruction? Why isn't the displaceme...
Selfdevotion asked 5/11, 2019 at 23:24
10
I just need a hello world demo to see how machine code actually works.
Though windows' EXE and linux' ELF is near machine code,but it's not PURE
How can I write/execute PURE machine code?
Onega asked 11/3, 2011 at 1:21
9
Solved
Are assembly language and machine language (for the same underlying system) really the same? Are there any differences between these two concepts?
Gaylenegayler asked 10/8, 2009 at 5:50
1
Solved
I'm reading, in parallel, various books on computer architecture and I'm confused. Some book state that assembly instructions are just mnemonics for machine instructions, and each instruction corre...
Blatman asked 1/8, 2019 at 18:28
3
Solved
I'm working on an exercise in x86 assembly (using NASM) that has the niche requirement of limiting each instruction to a maximum of 3 bytes.
I'd like to call a label, but the normal way to do this...
Trilateration asked 29/7, 2019 at 21:23
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
7
Solved
I just begin to study ARM assembly language, and am not clear about how to use MOV to transfer an immediate number into a register.
From both the ARM reference manual and my textbook, it's said tha...
Empyema asked 12/4, 2010 at 18:40
5
Solved
So i was reading a paper, and in it, they said that statically disassembling the code of a binary is undecidable, because a series of bytes could be represented as many possible ways as shown in pi...
Enterotomy asked 30/5, 2019 at 21:43
5
Solved
Just out of interested I would like to write a small program in machine code.
I am currently learning about registers, ALU, buses and memory and I'm slightly fascinated that instructions can be wr...
Mullein asked 25/5, 2011 at 17:53
1
Solved
Why was nop assigned to 0x90 on intel x86 assembly?
Intuitively I would expect that 0x00 would map to nop (which is also xchg eax, eax at intel x86) as it is the case for ARM A32 and some other ar...
Unready asked 1/5, 2019 at 19:54
1
Solved
I'm trying to write a decoder stub and I'm running into a restriction on 0xFF as a bad character. I'm using the jmp-call-pop method to get the address of my encoded shellcode into a register. Here'...
Gawky asked 21/4, 2019 at 0:17
1
Solved
I was curious what would happen if I put db 0x41 in the .text section, instead of in .data where it would normally belong. It segfaults, but why exactly?
The bits of code below were compiled, linke...
Rhombic asked 11/4, 2019 at 23:42
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
7
Solved
It's the weekend, so I relax from spending all week programming by writing a hobby project.
I wrote the framework of a MOS 6502 CPU emulator yesterday, the registers, stack, memory and all the opc...
Diffractometer asked 21/9, 2008 at 18:50
1
Solved
GAS gives the following encodings for the following instructions:
push rbp # 0x55
push rbx # 0x53
push r12 # 0x41 0x54
push r13 # 0x41 0x55
From the AMD64 spec (Page 313):
PUSH reg64 50 +rq&n...
Heartworm asked 4/2, 2019 at 15:35
4
Solved
I've been reading that in most cases (like gcc) the compiler reads the source code in a high level language and spits out the corresponding machine code. Now, machine code by definition is the code...
Kiaochow asked 20/10, 2018 at 0:2
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
3
How can I determine what an array of bytes will translate into in machine code?
I understand that if I see 0f at the start it's a 2 byte instruction, but I see other prefixes and in some dis...
Disproportionate asked 25/12, 2018 at 12:14
2
Solved
Have a doubt regarding the hex code conversion of JMP machine instruction. I have the absolute address I want to jump to, say "JMP 0x400835".
First of all, is this allowed? If yes, what would be t...
Bursa asked 22/3, 2012 at 1:58
3
Solved
I understand the gist of how JIT compilation works (after reading such resources as this SO question). However, I am still wondering how does it actually execute the machine code at runtime?
I don...
Pregnancy asked 23/12, 2014 at 20:3
1
Solved
I'm quite new to x86-64 binary encoding. I'm trying to fix some old "assembler" code.
Anyways, I'm trying to do something like this (Intel syntax):
mov [rbp+rcx], al
The assembler is currently ...
Brownnose asked 26/9, 2018 at 16:42
2
Solved
I was wondering if it is possible to decode x86-64 instructions in reverse?
I need this for a runtime dissembler. Users can point to a random location in memory and then should be able to scroll u...
Manno asked 20/9, 2018 at 0:12
1
I am guessing that a Wasm binary is usually JIT-compiled to native code, but given a Wasm source, is there a tool to see the actual generated x86-64 machine code?
Or asked in a different way, is th...
Lawabiding asked 31/8, 2018 at 8:3
© 2022 - 2024 — McMap. All rights reserved.