Address of a variable: Difference between revisions

Content added Content deleted
(Added Arturo implementation)
(Added 8086 Assembly)
Line 22: Line 22:
MYDSECT DSECT
MYDSECT DSECT
J DS F</lang>
J DS F</lang>
=={{header|8086 Assembly}}==
{{works with | https://www.dosbox.com/ DOSBox}}

<lang asm>.model small
.stack 1024
.data
UserRam 256 DUP (0) ;define the next 256 bytes as user RAM, initialize them all to zero.

myString db "Hello World!,255
.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</lang>









=={{header|AArch64 Assembly}}==
=={{header|AArch64 Assembly}}==