RosettaCodeData/Task/Pointers-and-references/8086-Assembly/pointers-and-references-1.8086
2023-07-01 13:44:08 -04:00

14 lines
456 B
Text

.model small
.stack 1024
.data ; data segment begins here
UserRam byte 256 dup (0) ; the next 256 bytes have a value of zero. The address of the 0th of these bytes can be referenced as "UserRam"
tempByte equ UserRam ;this variable's address is the same as that of the 0th byte of UserRam
tempWord equ UserRam+2 ;this variable's address is the address of UserRam + 2
.code
start:
mov ax, @data
mov ds, ax
mov ax, @code
mov es, ax