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

📄 setbs.s

📁 mips架构的bootloader,99左右的版本 但源代码现在没人更新了
💻 S
字号:
/************************************************************* * File: lib/setbs.s * Purpose: Part of C runtime library * Author: Phil Bunce (pjb@carmel.com) * Revision History: *	970304	Start of revision history */#include "mips.h"/* * This is the module for setting the block refill size on the * HTP board. The block size is controlled by aux outputs on the * 2681 duart. */#ifdef MIPSEB#define SCCBASE 0xbe000003#else#define SCCBASE 0xbe000000#endif	SETOCR = 0x38	CLROCR = 0x3c	.globl setibs	.ent setibssetibs:	# values of a0 are: 0,1,2,3 = bs2,4,8,16	# bits 1&0 in the OCR control ibs	# 00 = bs16 01=bs8 10=bs4 11=bs2	li	t1,SCCBASE	move	t0,a0	sb	t0,CLROCR(t1)	not	a0	and	a0,0x3		# mask	sb	a0,SETOCR(t1)	j	ra	.end setibs	.globl setdbs	.ent setdbssetdbs:	# values of a0 are: 0,1,2,3	# bits 3&2 in the OCR control dbs	# 00 = bs16 01=bs8 10=bs4 11=bs2	li	t1,SCCBASE	move	t0,a0	sll	t0,2		# OCR bits 3&2	sb	t0,CLROCR(t1)	not	a0	and	a0,0x3		# mask	sll	a0,2		# OCR bits 3&2	sb	a0,SETOCR(t1)	j	ra	.end setdbs

⌨️ 快捷键说明

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