This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Include files in assembly...

Hi all,
I have two files,as follows...when I simulate the sub routine is never executed.

file 1(main.asm)

#include "rs_485.asm"


	org 0000h
	ljmp on_reset


	org 002bh
on_reset:
	mov ie,#00h
	mov sp,#07h
	lcall rs_485_init	;initailise the serial communication

	end

file2(rs_485.asm)
rs_485_init:

	mov tmod,#20h		;timer 1 in mode2(auto reload)
	mov th1,#-3		;reload value for 9600 baud rate
	mov scon,#50h		;8 bit,1 start,1 stop and REN enabled
	clr ti			;clear transmit interrupt flag
	clr ri			;clear receive interrupt flag
	setb tr1		;Start timer 1
	ret

0