Create an object at a given address: Difference between revisions
Create an object at a given address (view source)
Revision as of 10:43, 12 September 2021
, 2 years agono edit summary
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) No edit summary |
||
Line 62:
<lang 68000devpac>MOVE.L #$FFFFFFFF,myVariable</lang>
=={{header|8086 Assembly}}==
<lang asm>.model small
.stack 1024
.data ;data segment
UserRam BYTE 256 DUP (0) ;allocate 256 bytes of user RAM, initialized to zero.
tempByte equ UserRam
tempWord equ UserRam+2
tempLong_LoWord equ UserRam+4
tempLong_HiWord equ UserRam+6
.code ;code segment
mov ax, @data
mov ds, ax
mov ax, @code
mov es, ax ;load segment registers with the appropriate segments.
; now there is no need to use "mov ax, seg UserRam" since we've already loaded the data segment into DS
mov ax, 1000h ;load the value 0x1000 into AX
mov word ptr [ds:tempWord],ax ;store 0x1000 into tempWord</lang>
=={{header|Ada}}==
|