-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtryagain.asm
84 lines (61 loc) · 1.87 KB
/
tryagain.asm
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
public tryagainDashboard
extrn MAINGAMEDASH:FAR
.model small
.stack 100h
.data
TryAgain db "Try Again (Enter)$"
exit db "Exit (Esc)$"
.code
SetCursor MACRO x, y
PUSH ax
PUSH dx
mov ah,2
mov dl, x
mov dh, y
int 10h
POP dx
POP ax
ENDM
CLEAR_SCREEN Proc NEAR
; Open graphical mode 13h (320x200, 256 colors)
push ax
push bx
mov al, 13h
mov ah, 0
int 10h
MOV AH,0bh
mov bx,00
int 10h
mov al, 03h
mov ah, 0
int 10h
pop bx
pop AX
ret
CLEAR_SCREEN endp
tryagainDashboard PROC FAR
mov ax, @data
mov ds, ax
CALL CLEAR_SCREEN
SetCursor 13, 5
mov ah, 9
LEA dx, TryAgain
int 21h
SetCursor 13, 10
mov ah, 9
LEA dx, exit
int 21h
tDashLoop:
mov ah, 0
int 16h
CMP al, 0Dh ;Enter
JE tBEGIN_GAME
CMP al, 1BH ;Esc
JE tDashExit
tBEGIN_GAME:
CALL MAINGAMEDASH
tDashExit:
mov ah,4ch
int 21h
tryagainDashboard ENDP
END tryagainDashboard