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

📄 em_inn.s

📁 minux的源代码,一个非常小的操作系统
💻 S
字号:
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define .inn

	! #bytes in ecx
	! bit # in eax
.inn:
	xor     edx,edx
	mov     ebx,8
	div     ebx
	mov     ebx,esp
	add	ebx,4
	add     ebx,eax
	cmp     eax,ecx
	jae     1f
	movb	al,(ebx)
	mov	ebx,edx
	testb   al,bits(ebx)
	jz      1f
	mov	eax,1
	jmp	2f
1:
	xor	eax,eax
2:
	pop	ebx
	add     esp,ecx
	! eax is result
	jmp     ebx

	.sect .rom
bits:
	.data1 1,2,4,8,16,32,64,128

⌨️ 快捷键说明

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