Tampilan menu utama
Tampilan halaman pertolongan (Help)
Tampilan program game
DAN BERIKUT ADALAH SOURCE CODE PROGRAM GAME ASEMBLY
=================================================================
BERSIH_WAR MACRO WARNA
MOV AX,0600h
XOR CX,CX
MOV DX,284Fh
MOV BH,WARNA
INT 10h
MOV AH,02
XOR BX,BX
MOV DH,0
MOV DL,0
INT 10h
ENDM
Cetak MACRO KAL
MOV AH,09h
LEA DX,KAL
INT 21H
ENDM
Tulis_Kar MACRO X,Y,Kar
MOV AX,0B800h
MOV ES,AX
MOV AH,Y
MOV AL,160
MUL AH
MOV BX,AX
MOV AH,X
MOV AL,2
MUL AH
ADD BX,AX
MOV AL,Kar
MOV ES:[BX],AL
ENDM
Tes MACRO X,Y,N1,N2
LOCAL CIP
CMP X,N1
JNE CIP
CMP Y,N2
JE Gagal
CIP:
Tulis_Kar X,Y,1
ENDM
.MODEL SMALL
.STACK 100h
.DATA
.CODE
TData: JMP Proses
Pembuka1 DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10,'$'
Pembuka2 DB 178,219,219,178,' ',178,219,219,178,' ',178,219,219,178,' ',201,35 DUP (205),187, ' ',178,219,219,178,' ',178,219,219,178,13,10
DB 178,219,219,178,' ',178,219,219,178,' ',178,219,219,178,' ',186,' Berikut Adalah Game Labirin ',186,' ',178,219,219,178,' ',178,219,219,178,13,10
DB 178,219,219,178,' ',178,219,219,178,' ',178,219,219,178,' ',186,' Menu Utama: ',186,' ',178,219,219,178,' ',178,219,219,178,13,10
DB 178,219,219,178,' ',178,219,219,178,' ',178,219,219,178,' ',186,' Tekan M : Untuk Memulai Permainan ',186,' ',178,219,219,178,' ',178,219,219,178,13,10
DB 178,219,219,178,' ',178,219,219,178,' ',178,219,219,178,' ',186,' Tekan T : Untuk Petunjuk Permainan ',186,' ',178,219,219,178,' ',178,219,219,178,13,10
DB 178,219,219,178,' ',178,219,219,178,' ',178,219,219,178,' ',186,' Tekan Q : Untuk Keluar ',186,' ',178,219,219,178,' ',178,219,219,178,13,10
DB 178,219,219,178,' ',178,219,219,178,' ',178,219,219,178,' ',200,35 DUP (205),188, ' ',178,219,219,178,' ',178,219,219,178,13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10,'$'
Rintangan DB 0b2h, 15 DUP (0b2h),0b2h,13,10
DB 0b2h,' ',0b2h,' ',0b2h,' ',0b2h,0b2h,0b2h, 0b2h, 13,10
DB 0b2h,,0b2h,0b2h,' ',0b2h,' ',0b2h,' ',0b2h,0b2h,' ',0b2h,0b2h, 0b2h, 13,10
DB 0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ', 0b2h, 13,10
DB 0b2h,' ',0b2h,0b2h,0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ',0b2h,0b2h,0b2h,' ',0b2h, 13,10
DB 0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ', 0b2h,' ',201,36 DUP (205),187, 13,10
DB 0b2h,' ',0b2h,' ',0b2h,0b2h,0b2h,' ',0b2h,0b2h,0b2h,' ',0b2h,' ', 0b2h,' ',186,' ',186,13,10
DB 0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ', 0b2h,' ',186,' ',186,13,10
DB 0b2h,' ',0b2h,' ',0b2h,0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ', 0b2h,' ',186,' ARIF MUJAHIDIN ',186,13,10
DB 0b2h,' ',0b2h,0b2h,0b2h,0b2h,' ',0b2h,' ',0b2h,' ',0b2h,' ', 0b2h,' ',186,' ',186,13,10
DB 0b2h,' ',0b2h,' ',0b2h,' ',0b2h,0b2h,' ',0b2h,' ', 0b2h,' ',186,' ',186,13,10
DB 0b2h,' ',0b2h,0b2h,0b2h,0b2h,' ',0b2h,' ', 0b2h,' ',186,' ',186,13,10
DB 0b2h,0b2h,0b2h,' ',0b2h,' ',0b2h,0b2h,0b2h,' ',0b2h,0b2h, 0b2h,' ',186,' ',186,13,10
DB 0b2h,' ',0b2h,' ',0b2h,0b2h,' ',0b2h,' ',0b2h, 0b2h,' ',200,36 DUP (205),188, 13,10
DB 0b2h,' ',0b2h,' ',0b2h,' ',0b2h,0b2h,' ',0b2h,' ',0b2h, 0b2h, 13,10
DB 0b2h,' ',0b2h,' ',0b2h,0b2h,0b2h,0b2h,' ',0b2h,0b2h,' ', 13,10
DB 0b2h, 15 DUP (0b2h),0b2h,13,10,'$'
Tulung1 DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10
DB 4 DUP(178,219,219,178,' ',178,219,219,178,' '),178,219,219,178,' ',13,10,'$'
Tulung2 DB 201,77 DUP (205),187,13,10
DB 186,' Cara Bermain: ' ,186,13,10
DB 186,' Jalankan pemain dengan menekan tombol arah (',27,24,25,26,') ',186,13,10
DB 186,' ' ,186,13,10
DB 186,' ' ,186,13,10
DB 186,' Berhasil: ' ,186,13,10
DB 186,' Game ini akan Berhasil jika pemain telah berada pada jalan keluar pada ' ,186,13,10
DB 186,' bagian kanan bawah ' ,186,13,10
DB 186,' ' ,186,13,10
DB 186,' Game Over: ' ,186,13,10
DB 186,' Game ini akan Game Over jika Pemain menabrak rintangan/tembok. ' ,186,13,10
DB 186,' ' ,186,13,10
DB 186,' ' ,186,13,10
DB 186,' SELAMAT MENCOBA !!!! (Tekan M untuk kembali ke Menu Utama)' ,186,13,10
DB 200,77 DUP (205),188,13,10,'$'
GO DB 'Game over...',7,7,7,7,7,'$'
Selamat DB 'SELAMAT!',13,10,'Anda berhasil!!!!!!$'
X DB 1
Y DB 1
Proses:
MOV AX,@DATA
MOV DS,AX
BERSIH_WAR 11110000b
CETAK Pembuka1
CETAK Pembuka2
ban:
MOV AH,0
INT 16H
PUSH AX
CMP AH,32H ;M
JE Cetak
CMP AH,14H ;T
JE Bantuan
CMP AH,10H ;Q
JE Akhir
JMP ban
Bantuan:
BERSIH_WAR 00001010B
Cetak Tulung1
Cetak Tulung2
Cetak Tulung1
ban2:
MOV AH,0
INT 16H
PUSH AX
CMP AH,32H ;M
JE Proses
JMP ban2
Cetak:
BERSIH_WAR 00001010b
;Cetak Rintangan
CETAK Rintangan
MOV DX,28
Tulis_Kar X,Y,1
Jalan:
MOV AH,0
INT 16h
PUSH AX
CMP AH,77
JE Kanan
CMP AH,75
JE Kiri
CMP AH,72
JE Atas
CMP AH,80
JE Bawah
JMP Jalan
Kanan:
Tulis_Kar X,Y,32,248
INC X
CMP Y,15
JNE wuih
CMP X,16
JE Sukses
wuih:
CMP X,16
JE Gagal
JMP Ngecek
Kiri:
Tulis_Kar X,Y,32,248
DEC X
CMP X,0
JE Gagal
JMP Ngecek
Atas:
Tulis_Kar X,Y,32,248
DEC Y
CMP Y,0
JE Gagal
JMP Ngecek
Bawah:
Tulis_Kar X,Y,32,248
INC Y
CMP Y,16
JE Gagal
JMP Ngecek
Ngecek:
;=====================Baris 1
Tes X,Y,4,1
Tes X,Y,8,1
Tes X,Y,13,1
Tes X,Y,14,1
Tes X,Y,15,1
;=====================Baris2
Tes X,Y,1,2
Tes X,Y,2,2
Tes X,Y,4,2
Tes X,Y,8,2
Tes X,Y,10,2
Tes X,Y,11,2
Tes X,Y,14,2
Tes X,Y,15,2
;====================Baris3
Tes X,Y,4,3
Tes X,Y,6,3
Tes X,Y,8,3
Tes X,Y,10,3
Tes X,Y,12,3
;====================Baris4
Tes X,Y,2,4
Tes X,Y,3,4
Tes X,Y,4,4
Tes X,Y,6,4
Tes X,Y,8,4
Tes X,Y,10,4
Tes X,Y,12,4
Tes X,Y,13,4
Tes X,Y,14,4
;===================Baris5
Tes X,Y,4,5
Tes X,Y,6,5
Tes X,Y,8,5
Tes X,Y,12,5
;==================Baris6
Tes X,Y,2,6
Tes X,Y,4,6
Tes X,Y,5,6
Tes X,Y,6,6
Tes X,Y,8,6
Tes X,Y,9,6
Tes X,Y,10,6
Tes X,Y,12,6
;=================Baris7
Tes X,Y,2,7
Tes X,Y,4,7
Tes X,Y,8,7
Tes X,Y,10,7
Tes X,Y,12,7
Tes X,Y,14,7
;=================Baris8
Tes X,Y,2,8
Tes X,Y,7,8
Tes X,Y,8,8
Tes X,Y,10,8
Tes X,Y,12,8
Tes X,Y,14,8
;================Baris9
Tes X,Y,2,9
Tes X,Y,3,9
Tes X,Y,4,9
Tes X,Y,5,9
Tes X,Y,8,9
Tes X,Y,12,9
Tes X,Y,14,9
;===============Baris10
Tes X,Y,2,10
Tes X,Y,4,10
Tes X,Y,10,10
Tes X,Y,11,10
Tes X,Y,14,10
;===============Baris11
Tes X,Y,4,11
Tes X,Y,5,11
Tes X,Y,6,11
Tes X,Y,7,11
Tes X,Y,11,11
;===============Baris12
Tes X,Y,1,12
Tes X,Y,2,12
Tes X,Y,4,12
Tes X,Y,9,12
Tes X,Y,10,12
Tes X,Y,11,12
Tes X,Y,14,12
Tes X,Y,15,12
;===============Baris13
Tes X,Y,4,13
Tes X,Y,6,13
Tes X,Y,7,13
Tes X,Y,12,13
Tes X,Y,15,13
;===============Baris14
Tes X,Y,2,14
Tes X,Y,4,14
Tes X,Y,9,14
Tes X,Y,10,14
Tes X,Y,12,14
Tes X,Y,15,14
;===============Baris15
Tes X,Y,2,15
Tes X,Y,6,15
Tes X,Y,7,15
Tes X,Y,8,15
Tes X,Y,9,15
Tes X,Y,12,15
Tes X,Y,13,15
JMP Jalan
Gagal:
MOV AH,9h
LEA DX,GO
INT 21h
JMP Akhir
Sukses:
MOV AH,9h
LEA DX,Selamat
INT 21h
MOV AH,0
INT 16h
Akhir:
MOV AH,4Ch
INT 33
END
Copyright Arif 2011
Tidak ada komentar:
Posting Komentar
ketikan komentarmu disini!!!