machine-code Questions
1
Solved
The Intel® 64 and IA-32 Software Developer's Manual, Volume 2A, Section 3.1.1.1 mentions the notation ct to denote a 10-byte value following the opcode. I am however unable to find any instruction ...
Newsstand asked 24/7, 2018 at 13:16
4
Solved
The question might seem odd, but I am still trying to grasp the concepts of virtual machines. I have read several answers, but I still don't get if Java bytecode (and MSIL as well) is the same as a...
Suggs asked 22/8, 2016 at 16:0
1
Solved
I've seen in some posts/videos/files that they are zero-padded to look bigger than they are, or match "same file size" criteria some file system utilities have for moving files, mostly they are eit...
Ariose asked 3/5, 2018 at 8:57
1
Solved
For context I am x86 golfing.
00000005 <start>:
5: e8 25 00 00 00 call 2f <cube>
a: 50 push %eax
Multiple calls later...
0000002f <cube>:
2f: 89 c8 mov %ecx,%eax
31: f7 ...
Kitchenmaid asked 6/4, 2018 at 20:48
1
Solved
To efficiently do x = x*10 + 1, it's probably optimal to use
lea eax, [rax + rax*4] ; x*=5
lea eax, [1 + rax*2] ; x = x*2 + 1
3-component LEA has higher latency on modern Intel CPUs, e.g. 3 cycl...
Insensate asked 18/2, 2018 at 3:44
1
Solved
I am looking at some assembly code and the corresponding memory dump and I am having trouble understanding what is going on. I'm using this as reference for opcodes for x86 and this as reference fo...
Barby asked 5/8, 2017 at 20:37
1
Solved
In an answer, jww points out that 1's complement is still used in encoding vector instructions on intel architectures, and Ruslan clarifies that these instructions are being used more as auto-vecto...
Raddy asked 21/7, 2017 at 18:14
3
Solved
By looking at intel volume of instructions, I found this:
1) 88 /r MOV r/m8,r8
2) 8A /r MOV r8,r/m8
When I write a line like this in NASM, and assemble it with the listing option:
mov al, bl
I ...
Michaeu asked 2/6, 2017 at 18:23
4
I need to read instructions one-by-one from a small code segment in memory and I have to find out the size of the instructions which I have in memory.
The following is just a example of raw disas...
Flambeau asked 21/5, 2014 at 15:55
1
Took a while but finally got to square 1 in 16 bit graphics.
Here I clear the screen and draw a single pixel:
mov ax, 0a000h
mov es, ax ; es - Extra Segment now points to the VGA location
mov ax,...
Youngs asked 16/3, 2017 at 19:55
2
Solved
0x0000000000400507 <main+28>: 74 0c je 0x400515 <main+42>
0x0000000000400509 <main+30>: bf 28 06 40 00 mov $0x400628,%edi
..
0x400507 <main+28>: 0x28bf0c74
I think shows ...
Hosey asked 16/5, 2011 at 13:48
1
Solved
Suppose, I have a program written in C and I have two identical computers, the one is running Windows and the other is linux. Since the computers are identical, their processors have the same...
Histopathology asked 14/12, 2016 at 23:25
8
Solved
What is the assembler syntax to determine which of two numbers is greater?
What is the lower level (machine code) for it? Can we go even lower? Once we get to the bit level, what happens? How is i...
Jacqulynjactation asked 14/7, 2009 at 4:13
2
Solved
I have an assembly test soon, and while preparing, I noticed something strange.
repe movsb was repeating while ZF=0, and I was teached that repe should repeat while CX not equal to zero and while Z...
Heavyarmed asked 24/10, 2016 at 13:17
6
Solved
I'm trying to call native machine-language code. Here's what I have so far (it gets a bus error):
char prog[] = {'\xc3'}; // x86 ret instruction
int main()
{
typedef double (*dfunc)();
dfunc d...
Hoskins asked 5/10, 2016 at 7:2
1
Solved
Are x86 op codes arbitrary?
Is there a reason that hlt is 0xf4 and the nop is 0x90?
Oriental asked 28/8, 2016 at 4:7
1
Solved
For reference: an HTML extract of Intel's documentation for the call instruction.
I am aware that section 3.1.1.3 explains this but I am having trouble understanding the manual, probably because...
Lueluebke asked 7/8, 2016 at 2:50
2
Solved
I see how equality could work by just comparing bit patterns, but how would one write one's own less than and greater than operators? What is the actual process to mechanically compare values to ea...
Solarize asked 9/7, 2016 at 23:5
1
Solved
If you look at documentation of operations like cmp, test, add, sub, and and, you will notice that operations that involve register EAX and its 16 and 8 bit variants as the first operand have a dis...
Nadeau asked 24/6, 2016 at 17:52
3
Solved
Interpreters do a lot of extra work, so it is understandable that they end up significantly slower than native machine code. But languages such as C# or Java have JIT compilers, which supposedly co...
Distortion asked 9/8, 2012 at 10:55
2
What's the "correct" way to call an absolute pointer in x86 machine code? Is there a good way to do it in a single instruction?
What I want to do:
I'm trying to build a kind of simplified mini-JI...
Dioptometer asked 23/10, 2013 at 20:59
1
Solved
I just started learning MIPS and I am having troubles understanding the ranges of jump and branch instructions. I know that there are limits on how "far" PC can jump and branch, but I don't get the...
Windbroken asked 6/4, 2016 at 5:51
4
I've trouble with understanding the difference between assembly and binary.
Just I need to understand what the relation is between linked binary and assembly.
Educator asked 7/2, 2016 at 17:32
2
Solved
I have begun programming an emulator for the Gameboy classic, my next project after a successful Chip 8 Emulator.
As a reference I use the GameBoy CPU Manual.
Now on page 66 it says:
LD A,(HL) 7...
Shuddering asked 4/1, 2016 at 13:19
1
Solved
I was reading this: https://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-dev.pdf
And I read on page 8 the following:
e9 fd ff 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 0...
Jabiru asked 10/12, 2015 at 20:6
© 2022 - 2024 — McMap. All rights reserved.