forked from Samiha-Sadek/Microprocessor-Simulation-Game
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWScore.inc
More file actions
47 lines (45 loc) · 971 Bytes
/
WScore.inc
File metadata and controls
47 lines (45 loc) · 971 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
41
42
43
44
45
46
47
.286
WriteScore MACRO Score, player
Local playerOneScore
Local DisplayNum
Local NextNum
Local ScoreEnd
pusha
cmp player, 1
je playerOneScore
;Player 2:
mov ax, 0
mov ah, 02 ;SetCursorPosition
mov dl, 24 ;X coordinated
mov dh, 2 ;Ycoordinated
mov bx, 0
int 10h
jmp DisplayNum ;skip player1
playerOneScore:
mov ax, 0
mov ah, 02h ;SetCursorPosition
mov dl, 3 ;X coordinated
mov dh, 2 ;Ycoordinated
mov bx, 0
int 10h
DisplayNum:
lea di, Score
NextNum:
mov al, [di]
cmp al, 24h
je ScoreEnd
mov bl, 0Eh ;Color is red
mov bh, 0 ;Display page
mov ah, 0Eh ;Teletype
int 10h
mov ax, 0
mov ah, 02h ;SetCursorPosition
inc dl ;X coordinated
mov dh, 2 ;Ycoordinated
mov bx, 0
int 10h
inc di
jmp NextNum
ScoreEnd:
popa
ENDM WriteScore