Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,12 @@
.model small
.stack 1024
.data
UserRam 256 DUP (0) ;define the next 256 bytes as user RAM, initialize them all to zero.
.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

View file

@ -0,0 +1,2 @@
mov ax, 0FFFFh
mov [es:di],ax ;store 0xFFFF into the base address of UserRam.

View file

@ -0,0 +1,13 @@
.model small
.stack 1024
.data
UserRam 256 DUP (0) ;define the next 256 bytes as user RAM, initialize them all to zero.
.code
mov ax, @data ; load the data segment into ax
mov ds,ax ; point the data segment register to the data segment.
; (The 8086 can only load segment registers from ax, bx, cx, dx, or the pop command)
mov ax, 0FFFFh ; load the number 65535 (or -1 if you prefer) into ax.
mov word ptr [ds:UserRam] ; store this quantity in user ram.