getidprom.s

来自「操作系统SunOS 4.1.3版本的源码」· S 代码 · 共 32 行

S
32
字号
/* *	.seg	"data" *	.asciz	"@(#)getidprom.s 1.1 92/07/30" *	Copyright (c) 1986 by Sun Microsystems, Inc. */ 	.seg	"text" 	.align	4IDPROMBASE=0x00000000		! base address of idprom in CTL spaceIDPROMSIZE=0x20			! size of idpromASI_CTL=2			! address space indentifier for CTL space!! getidprom(addr, size)!! Read the ID prom.! This is mapped from IDPROMBASE for IDPROMSIZE bytes in the! ASI_CTL address space for byte access only.! 	.global _getidprom_getidprom:	set     IDPROMBASE, %g1	clr     %g21:	lduba   [%g1 + %g2]ASI_CTL, %g7 ! get id prom byte	add     %g2, 1, %g2		! interlock	stb     %g7, [%o0]		! put it out	cmp     %g2, %o1		! done yet?	bne,a   1b	add     %o0, 1, %o0		! delay slot	retl				! leaf routine return	lduba   [%g1]ASI_CTL, %o0	! return id prom format byte

⌨️ 快捷键说明

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