Jump to content

Address of a variable: Difference between revisions

m
Line 23:
J DS F</lang>
=={{header|8086 Assembly}}==
When programming in assembly language yourself (i.e. not having a compiler do it for you), generally the addresses of variables are known in advance and chosen by the programmer rather than dynamically determined by the compiler. Therefore you pretty much always know a variable's address at all times. However there is a little more work that needs to be done to get the address in 8086 Assembly compared to assembly for other machines.
{{works with|https://www.dosbox.com/|DOSBox}}
 
<lang asm>.model small
Line 30 ⟶ 31:
UserRam 256 DUP (0) ;define the next 256 bytes as user RAM, initialize them all to zero.
 
myString db "Hello World!",255
.code
 
1,489

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.