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

📄 hpi.asm

📁 程序为达盛实验箱所带
💻 ASM
字号:
;the HPI space in our system
;0x8000 	HPIC0
;0X8001		HPIC1
;0X8002		HPID0(AUTO)
;0X8003		HPID1(AUTO)
;0X8004		HPIA0
;0X8005		HPIA1
;0X8006		HPID0(NO AUTO)
;0X8007		HPID1(NO AUTO)

;A0-->HBIL
;A1-->HCNTL0
;A2-->HCNTL1
;A15-->HCS

;other pins connection
;HAS-->1
;HDS1-->IOSTRB
;HDS2-->1
;HINT-->INT0
;HREADY-->BREADY
;HR/W-->R/W

	.global _main
	.mmregs
	
_main:
	stm		0x1000,ar1  
	st		0x00,*ar1
	portw	*ar1,0x8000 ;write 0x00 to HPIC0
	
	st		0x00,*ar1
	portw	*ar1,0x8001 ;write 0x00 to HPIC1
	
	st		0x10,*ar1
	portw	*ar1,0x8004 ;write 0x10 to HPIA0
	
	st		0x20,*ar1
	portw	*ar1,0x8005 ;write 0x20 to HPIA1
	;then the address is:0x1020
	 
	st		0x55,*ar1
	portw	*ar1,0x8006 ;write 0x55 to HPID0(NO AUTO)
	
	st		0xaa,*ar1
	portw	*ar1,0x8007 ;write 0xaa to HPID1(NO AUTO) 

	stm		0x1002,ar1
	portr	0x8006,*ar1 ;read data from HPID0(NO AUTO)
	
	stm		0x1003,ar1
	portr	0x8007,*ar1 ;read data from HPID1(NO AUTO) 
	
	b	_main
	nop
	nop
	

	
	
	

⌨️ 快捷键说明

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