The origin of the code is x3700
, and you have 12 instructions, so the address of A
will be x3700 + x0C = x370C
. As you guessed, LEA R0,A
loads the address of A
into R0
, so R0
will contain x370C
after that first instruction has been executed.
.ORIG X3700 3700 LEA R0, A 3701 LDI R2, C 3702 LDR R3, R0, 2 ... 370b RET 370c A .FILL X1234 ...
Related Posts:
- lc3 LDR instruction and the value stored
- Why are rbp and rsp called general purpose registers?
- Nasm Error: invalid combination of opcode and operands
- How do AX, AH, AL map onto EAX?
- What are callee and caller saved registers?
- What’s the purpose of the LEA instruction?
- Understanding cmp instruction
- assembly “mov” instruction
- Why shift a bit using sll and such in MIPs Assembly?
- Assembly code vs Machine code vs Object code?
- Understanding how `lw` and `sw` actually work in a MIPS program
- What does the MOVZBL instruction do in IA-32 AT&T syntax?
- What’s the purpose of the LEA instruction?
- How to move ST(0) to EAX?
- The point of test %eax %eax
- Assembly: How does fld st(0) duplicates the top stack value in the following code?
- What does the MOVZBL instruction do in IA-32 AT&T syntax?
- What’s the purpose of the LEA instruction?
- The difference between cmpl and cmp
- x86 cmpl and jne
- MIPS: lw (load word) instruction
- What is the meaning of XOR in x86 assembly?
- What is the function of the push / pop instructions used on registers in x86 assembly?
- What is callq instruction?
- What does the BEQ instruction do exactly?
- What’s the size of a QWORD on a 64-bit machine?
- MIPS assembly for a simple for loop
- mips .word function and differences between 2 codes
- Why doesn’t there exists a subi opcode for MIPS?
- Purpose of ESI & EDI registers?
- What are the ESP and the EBP registers?
- IDIV operation in assembly (understanding)
- Convert C program into assembly code
- What exactly does the lb instruction do?
- What is the difference between la and li in opcodes in MIPS?
- What does movslq do?
- Assembly language je jump function
- What are .S files?
- explanation about push ebp and pop ebp instruction in assembly
- what is the use of ori in this part of MIPS code?
- Storing a user’s input in MIPS
- x86 assembly: How does the ‘subl’ command work in AT&T syntax
- what does the cmpq instruction do?
- Integer absolute value in MIPS?
- Purpose of ESI & EDI registers?
- MIPS Assembly – lui $t0, 4097?
- Bubble sort on array on Assembly Language
- Greater than, less than equal, greater than equal in MIPS
- When and why do we sign extend and use cdq with mul/div?
- Assembly addq clarification
- MIPS program jr $ra instructions and stack handling
- Subtract two input numbers
- writing functions in assembler
- Assembly language (MIPS) difference betweent addi and add
- pop or add esp, 4 ? What is the difference?
- What is the difference between MOV and LEA?
- MIPS Address out of range (MARS)
- Difference between “addi” and “add” for pseudoinstruction “move” in MIPS?
- `testl` eax against eax?
- sorting array in mips (assembly)
- Difference between JE/JNE and JZ/JNZ
- what is a file handle and where it is useful for a programmer?
- Printing out a number in assembly language?
- How does `Skipcond` work in the MARIE assembly language?
- Multiplication by a power of 2 using Logical shifts in MIPS assembly
- What does `dword ptr` mean?
- Difference between JA and JG in assembly
- MIPS instruction and machine code
- Convert from Java to MIPS
- what does the the dword operand do in assembly
- Understanding Assembly MIPS .ALIGN and Memory Addressing
- What’s the difference between a word and byte?
- Difference between movq and movabsq in x86-64
- What is the jmpq command doing in this example
- What does the LEAL assembly instruction do?
- Assembly – JZ instruction after CMP
- [Binary Bomb – Phase 4
- What does bx lr do in ARM assembly language?
- Is it possible to “decompile” a Windows .exe? Or at least view the Assembly?
- need help understanding the movzbl call in this function
- ARM Assembler – How do I use CMP, BLT and BGT?
- C to assembly – leaq instruction
- How to load script with jquery.load()?
- what does .space do in mips?
- Display value found at given address gdb
- Understanding %rip register in intel assembly
- LC-3 STR with R1 as offset
- xorl %eax – Instruction set architecture in IA-32
- Difference between “move” and “li” in MIPS assembly language
- jQuery .load() not working
- Which variable size to use (db, dw, dd) with x86 assembly?
- Assembly x86 – “leave” Instruction
- How can one see content of stack with GDB?
- JNZ & CMP Assembly Instructions
- X86 assembly – Handling the IDIV instruction
- How do I compile the asm generated by GCC?
- error A2022: instruction operands must be the same size
- MIPS to C Translation
- GDB no such file or directory
- What is between ESP and EBP?