Skip to main content
1 vote
0 answers
49 views

I’m learning SIC/XE assembly and I ran into a confusing behavior with addressing modes. Consider these two examples: MOJPRG START 0 +JSUB #WRREC HALT J HALT WRREC RSUB MOJPRG START 0 +JSUB ...
ab55's user avatar
  • 48
4 votes
0 answers
183 views

I am looking for information about the following preprocessor #pragma directive: #include <string> class Base { public: void Test(); }; int main() { Base b; b.Test(); return 0; ...
Kerbiter's user avatar
  • 102
3 votes
2 answers
185 views

In my computer architecture class, we learned about registers (intel 8086 microprocessor) and were given exercises about determining the physical address from a line of assembly. Something like: MOV [...
Jeremiah Boey's user avatar
1 vote
1 answer
101 views

Running clang-as on this code produces "error: index must be an integer in range [-256, 255]" .section __TEXT,__text,regular,pure_instructions .p2align 2 _foo: ...
Charlie Burns's user avatar
8 votes
1 answer
304 views

My understanding is that RIP-relative addressing should work for offsets up to 2GB in size, but for some reason GCC (14.2) and Clang (19.1.0) stop using it when grabbing values more than 16MB away. ...
Joseph Garvin's user avatar
2 votes
1 answer
114 views

In X86 assembly, what type of operations use the addressing mode with this format? IndexReg * ScaleFactor + Offset mov rax, [r15 * 8 + 56]
Dess's user avatar
  • 2,739
4 votes
0 answers
126 views

I have assembled the (somewhat weird) instruction ADD EAX, DWORD PTR [RBP + RAX*1] with GCC, FASM and NASM. All of them produce the following suboptimal output 0: 03 44 05 00 add eax,...
NyxCode's user avatar
  • 808
0 votes
1 answer
164 views

While messing around with an emulator, I came across the following note (see here): Note on the MOS 6502: The value at the specified address, ignoring the the addressing mode's X offset, is read (and ...
Jere's user avatar
  • 3,646
1 vote
1 answer
88 views

I have a code in MASM, which contains mov bx, 4 mov ax, array[bx] + 4 So array[4] here is the fifth element of the array or 4 bytes and then we add 4 bytes ? What will be the value of AX then?
Muhab Joumaa's user avatar
2 votes
1 answer
2k views

This is specifically for the NES console which uses a slightly modified 8-bit 6502 microprocessor. Below follows the code with my comments explaining what each line does as far as my basic ...
Dainank's user avatar
  • 2,623
1 vote
2 answers
306 views

If I have an address in the rbx register and use an instruction like mov rax, [rbx+1] Is rbx+1 computed in hardware during runtime? If so are some registers used or is there a dedicated hardware ...
Tim's user avatar
  • 169
1 vote
2 answers
244 views

I'm taking a class that deals with assembly. A few friends and I are debating what the difference between %rdi and (%rdi) in the following contexts: Let's say RDI holds the character value 'w' in ...
JBatswani's user avatar
  • 113
3 votes
1 answer
440 views

What is wrong with the following instruction: movb $0xF, (%ebx) The answer states that %ebx cannot be used as an address register. I am new to assembly so can someone explain what this means? If the ...
Haider's user avatar
  • 39
1 vote
1 answer
178 views

I am trying to chase down an exception within some previously existing ARM assembly code. The line in question is: ldr x0, [x21, x19, lsl #3] The result of the above equation is x0 having an ...
thecooperman's user avatar
0 votes
1 answer
275 views

I'm trying to store a pointer in a variable located on memory. How could I dereference it? I'm trying to do it like this: pointer: db 0 ; the pointer variable var: db 44 ; the normal variable ...
batatinha_espacial's user avatar

15 30 50 per page
1
2 3 4 5
21