forked from Samiha-Sadek/Microprocessor-Simulation-Game
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDMem.inc
More file actions
40 lines (36 loc) · 817 Bytes
/
DMem.inc
File metadata and controls
40 lines (36 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.286
DrawMemory MACRO Memory, column
Local WriteMemValues
pusha
mov cl, 16
mov ch, 0
lea di, Memory
WriteMemValues:
mov ax, 0
mov ah, 02 ;SetCursorPosition
mov dl, column ;X coordinated
mov dh, ch ;Ycoordinated
mov bx, 0
int 10h
mov al, [di]
mov bl, 050h ;Color is red
mov bh, 0 ;Display page
mov ah, 0Eh ;Teletype
int 10h
mov ax, 0
mov ah, 02 ;SetCursorPosition
mov dl, column+1 ;X coordinated
mov dh, ch ;Ycoordinated
mov bx, 0
int 10h
mov al, [di+1]
mov bl, 050h ;Color is red
mov bh, 0 ;Display page
mov ah, 0Eh ;Teletype
int 10h
inc ch
add di ,2
dec cl
jnz WriteMemValues
popa
ENDM