
Basic Data Operation

This is a basic data operation. It represents a fundamental action on a basic data type.
You may see other such operations in the Basic Data Operations category, or:


Integer Operations
Arithmetic |
Comparison
Boolean Operations
Bitwise |
Logical
String Operations
Concatenation |
Interpolation |
Comparison |
Matching
Memory Operations
Pointers & references |
Addresses




Task

Demonstrate how to get the address of a variable and how to set the address of a variable.




.model small
.stack 1024
.data
UserRam 256 DUP (0) ;define the next 256 bytes as user RAM, initialize them all to zero.
 
.code
 
mov ax, seg UserRam         ;load into AX the segment where UserRam is stored.
mov es, ax                  ;load that value into the Extra Segment register
 
mov ax, offset UserRam      ;load into AX the address of UserRam
mov di, ax                  ;load that value into the destination index register