⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m68kif.s

📁 Coldfire MCF5282 DBug bootloader
💻 S
字号:
/*
 * File:		m68kif.s
 * Purpose:	MC68000 and MCF5200 system call handler for dBUG.
 *
 * Notes:
 *
 * Author:	Eric DeVolder
 * Date:		
 *
 * Modifications:
 *
 */

/*
 * This file contains the low level interrupt service routines
 * for implementing a user system call interface into the monitor.
 */

	.global _dbug_sc_handler

	.text

/*
 * NOTE:  This handler uses the convention that D0,D1,A0,A1 are
 * scratch registers.  Thus these registers are not preserved.
 */

_dbug_sc_handler:
		lea			-12(sp),sp		/* room for used regs */
		movem.l		d2/a0-a1,(sp)
		extw.l		d0

		/* Serial I/O routines, port A */
		cmpi.l		#0x0010,d0
		beq.w		in_char
		cmpi.l		#0x0013,d0
		beq.w		out_char
		cmpi.l		#0x0014,d0
		beq.w		char_present

		/* Not a supported system call, jump back to monitor */
		movem.l		(sp),d2/a0-a1
		lea			12(sp),sp
		move.l		sp,-(sp)
		jsr			_asm_sc_exit_to_dbug



in_char:
		jsr			_board_getchar	/* char returned in D0 */
		move.l		d0,d1
		moveq.l		#0,d0
		bra.w		done

out_char:
		move.l		d1,-(sp)
		jsr			_board_putchar
		lea			4(sp),sp
		moveq.l		#0,d0
		bra.w		done

char_present:
		jsr			_board_getchar_present	/* value returned in D0 */
		bra.w		done

done:
		movem.l		(sp),d2/a0-a1
		lea			12(sp),sp
		rte

	.end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -