Program Assembler untuk ngetest Printer dot Matrix

Aku bikin program untuk mencetak tulisan dari mikrokontroler ke printer dot matrix, kenapa gak jalan ya hiks 🙁
programnya adalah :


;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;Program untuk mencetak tulisan
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
P0		equ	080h
P1		equ	090h
P2		equ	0A0h
P3		equ	0B0h

dpl		equ	082h		;
dph		equ	083h		;
acc		equ	0E0h		;
STBPRN		BIT	P3.1
BUSYPRN		BIT	P3.2


		ORG 00H
		LCALL 	printout
		jmp	SELESAI

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PRNBUSY:	SETB	BUSYPRN
		JB	BUSYPRN,$
		RET


;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PRNSTB:		CLR	STBPRN
		NOP
		SETB	STBPRN
		RET


;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CHECKPRINT:	LCALL	PRNBUSY
		RET


;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PRINT:		PUSH	ACC
		LCALL	CHECKPRINT
		MOV	P2,A
		LCALL	PRNSTB
		POP	ACC
		RET

;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
;
;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
DATAP0:		DB	201,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,187,00
DATAP1:		DB	186,'                                ',186,00
DATAP2:		DB	186,'       SAHIR 9901060389         ',186,00
DATAP3:		DB	186,' TEKNIK ELEKTRO FAKULTAS TEKNIK ',186,00
DATAP4:		DB	186,'     UNIVERSITAS BRAWIJAYA      ',186,00
DATAP5:		DB	186,'                                ',186,00 
DATAP6:		DB	200,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,188,00

PRINTP:		MOV	A,#00H
		MOVC	A,@A+DPTR
		JZ	PP000
		LCALL	PRINT
		INC	DPTR
		LJMP	PRINTP
PP000:		RET

CRLF:		MOV	A,#0DH
		LCALL	PRINT
		MOV	A,#0AH
		LCALL	PRINT
		RET

PRINTOUT:	MOV	A,#0FH
		LCALL 	PRINT
		MOV	DPTR,#DATAP0
		LCALL	PRINTP
		LCALL	CRLF
		MOV	DPTR,#DATAP1
		LCALL	PRINTP
		LCALL	CRLF
		MOV	DPTR,#DATAP2
		LCALL	PRINTP
		LCALL	CRLF
		MOV	DPTR,#DATAP3
		LCALL	PRINTP
		LCALL	CRLF
		MOV	DPTR,#DATAP4
		LCALL	PRINTP
		LCALL	CRLF
		MOV	DPTR,#DATAP5
		LCALL	PRINTP
		LCALL	CRLF
		MOV	DPTR,#DATAP6
		LCALL	PRINTP
		LCALL	CRLF
		LCALL	CRLF
		LCALL	CRLF
		RET

SELESAI:
		END

adakah yang salah dengan program ini ya? ada yang bisa bantu gak ya?

3 thoughts on “Program Assembler untuk ngetest Printer dot Matrix

  1. BS BANTUIN BIKIN PROGRAM ASSEMBLY BUAT NAMPILIN ‘ELEKTRO’ DI DOT MATRIK???

Leave a Reply

Your email address will not be published. Required fields are marked *