	.CODE
Delay_100mS		EQU	016EH
Delay_500mS		EQU	0165H
Delay_1detik		EQU	015CH

;DF-88 Routines
Init_MT8888		EQU	0682H
Kirim_DTMF		EQU	0695H
KirimPulse_Dial		EQU	0730H

Alamat_DF88		EQU	6000H


	Org	2000H			;Reset Vector
	Ajmp	Start			;
	Org	2003H			;External Interrupt 0 Vector
	Reti				;
	Org	200BH			;Timer 0 Interrupt Vector
	Reti				;
	Org	2013H			;External Interrupt 1 Vector
	Reti				;
	Org	201BH			;Timer 1 Interrupt Vector
	Reti				;
	Org	2023H			;Serial Interrupt Vector
	Reti				;

Start:
	Mov	DPTR,#Alamat_DF88	;Reset_MT8888
	Lcall	Init_MT8888		;
	Clr	P1.1			;Off Hook

	Lcall	Delay_500mS		;Delay 1/2 detik
	Mov	DPTR,#Nomor_Telephone	;Data Pointer menuju ke alamat tabel
					;nomor telephone

LoopPutar_Nomor:
	Movx	A,@DPTR			;Ambil nomor telephone yang ditunjuk
					;oleh Data Pointer
	Cjne	A,#0FH,Putar_Nomor	;Data <> 0F, putar nomor berikutnya
	Ajmp	*			;

Putar_Nomor:
	Lcall	Delay_1detik		;Delay 1 detik
	Lcall	KirimPulse_Dial
	Inc	DPTR			;Tunjuk ke tabel nomor telephone berikut
	Ajmp	LoopPutar_Nomor		;

Nomor_Telephone:
	DB	05,00,02,00,02,01,00,0FH
