forked from Samiha-Sadek/Microprocessor-Simulation-Game
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWReg.inc
More file actions
66 lines (58 loc) · 1.39 KB
/
WReg.inc
File metadata and controls
66 lines (58 loc) · 1.39 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.286
WriteRegCont MACRO regcontent, regpos
Local WriteRegValues
pusha
mov cl, 4
mov ch, 7
lea di, regcontent
WriteRegValues:
mov ax, 0
mov ah, 02 ;SetCursorPosition
mov dl, regpos ;X coordinated
mov dh, ch ;Ycoordinated
mov bx, 0
int 10h
mov al, [di]
mov bl, 055h ;Color is red
mov bh, 0 ;Display page
mov ah, 0Eh ;Teletype
int 10h
mov ax, 0
mov ah, 02 ;SetCursorPosition
mov dl, regpos+1 ;X coordinated
mov dh, ch ;Ycoordinated
mov bx, 0
int 10h
mov al, [di+1]
mov bl, 055h ;Color is red
mov bh, 0 ;Display page
mov ah, 0Eh ;Teletype
int 10h
mov ax, 0
mov ah, 02 ;SetCursorPosition
mov dl, regpos+2 ;X coordinated
mov dh, ch ;Ycoordinated
mov bx, 0
int 10h
mov al, [di+2]
mov bl, 055h ;Color is red
mov bh, 0 ;Display page
mov ah, 0Eh ;Teletype
int 10h
mov ax, 0
mov ah, 02 ;SetCursorPosition
mov dl, regpos+3 ;X coordinated
mov dh, ch ;Ycoordinated
mov bx, 0
int 10h
mov al, [di+3]
mov bl, 055h ;Color is red
mov bh, 0 ;Display page
mov ah, 0Eh ;Teletype
int 10h
add ch, 2
add di ,4
dec cl
jnz WriteRegValues
popa
ENDM