首页 > 代码库 > 输出一个寄存器的二进制值

输出一个寄存器的二进制值

;miOS

		ORG		0X7C00
		
		JMP		ENTRY
		DB		0x90
		DB		"HARIBOTE"		
		DW		512				
		DB		1				
		DW		1				
		DB		2				
		DW		224				
		DW		2880			
		DB		0xf0			
		DW		9				
		DW		18				
		DW		2				
		DD		0				
		DD		2880			
		DB		0,0,0x29		
		DD		0xffffffff		
		DB		"HARIBOTEOS "	
		DB		"FAT12   "		
		RESB	18	



ENTRY:		
		MOV	AX,0
		MOV 	SS,AX
		MOV	SP,0X7C00
		MOV	DS,AX
		MOV	ES,AX		


INFO:	
		MOV	SI,0
		MOV	DL,0XFC
		
;输出DL的二进制值
LOOP:		
		ROL	DL,1
		MOV	AL,DL
		AND	AL,1
		CMP	AL,1
		JE	AA
		MOV	AL,"0"
		JMP	BB
AA:		MOV	AL,"1"
BB:		MOV	AH,0X0E
		MOV	BX,15
		INT	0X10
		ADD	SI,1
		CMP	SI,8
		JE	FIN
		JMP	LOOP
		

FIN:		HLT
		JMP	FIN



		RESB	0X7DFE-$
		DB	0X55,0XAA

输出一个寄存器的二进制值