Address of a variable: Difference between revisions
Added 8086 Assembly
Drkameleon (talk | contribs) (Added Arturo implementation) |
Puppydrum64 (talk | contribs) (Added 8086 Assembly) |
||
Line 22:
MYDSECT DSECT
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}}==
|