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,6 @@
.data
MyVar word 0FFFFh ;the leading zero is just to help the assembler tell that this is a number, it's not actually part of the variable.
.code
mov ax, word ptr [ds:MyVar]

View file

@ -0,0 +1,3 @@
Player1_Lives equ 0100h
mov al,3
mov byte ptr [Player1_Lives],al ;give the player 3 lives to start the game with

View file

@ -0,0 +1,2 @@
mov ax, seg MyData ;the assembler replaces this with the segment MyData is located in prior to assembling the program.
mov ds,ax ;load this segment into the data segment register.