U盘启动并读取dx寄存器的值
2016-11-13 16:35
197 查看
;miOS ORG 0X7C00 JMP ENTRY NOP ;文件系统设置 ;BIOS PARAMETER BLOCK DB "MSDOS5.0" ;OEM DW 512 ;Bytes_per_sector DB 32 ;Sectors_per_cluster DW 38 ;Reserved_sectors DB 2 ;Number_of_FATs DW 0 ;Root_entries DW 0 ;Sectors_small DB 0XF8 ;Media_descriptor DW 0 ;Sectors_per_FAT_small DW 63 ;Sectors_per_track DW 255 ;Heads DD 0 ;Hidden_sectors DD 65536000 ;Sectors ;FAT32 SECTION DD 15993 ;Sectors_per_FAT DW 0 ;Extended_flags DW 0 ;Version DD 2 ;Root_dir_1st_cluster DW 1 ;FSInfo_sector DW 6 ;Backup_boot_sector RESB 12 DB 0 ;BIOS_drive DB 0 DB 0X29 ;Ext_boot_signature DB 0X07 ;Volume_serial_number DB 0XD1 DB 0X99 DB 0X00 DB "HU-OS " ;Volume_label DB "FAT32-HU" ;File_system ENTRY: MOV AX,0 MOV SS,AX MOV SP,0X7C00 MOV DS,AX MOV ES,AX MOV SI,0 CALL GetDiskParam JMP FIN GetDiskParam: MOV AH,0X08 INT 0X13 push dx push ax push bx push si PUSH SI CALL SHOW16 pop si pop bx pop ax pop dx ret SHOW16: ROL DX,1 push ax MOV AX,DX AND AX,1 CMP AX,1 JE AA1 MOV AL,0x30 JMP BB1 AA1: MOV AL,0x31 BB1: MOV AH,0X0E MOV BX,15 INT 0X10 pop ax ADD ax,1 CMP ax,16 JB SHOW16 ret ShowMsg: MOV SI,MSG2 putloop: MOV AL,[SI] ADD SI,1 CMP AL,0 JE EXIST MOV AH,0x0e MOV BX,15 INT 0x10 JMP putloop EXIST: ret FIN: HLT JMP FIN MSG: DB 0x0a, 0x0a DB 0 MSG2: db "0" db "1" DB "1Hellow World!" DB 0x0a,0x0a DB "Hellow World!" DB 0 RESB 510-($-$$) DB 0X55,0XAA
相关文章推荐
- U盘启动以及int 13h扩展读取U盘内容
- U盘启动以及int 13h扩展读取U盘内容
- U盘安装linux开机无法启动解决方法
- Thinkpad T440S笔记本如何设置U盘启动
- xp系统下用U盘装的Linux系统,但启动时必须插入U盘设置从U盘启动才是Linux系统
- 测试U盘启动安装系统之安装CentOS6.3及PXE网络安装Centos 6.3
- Windows 7 操作系统制作启动U盘
- 制作原版电脑系统iso格式U盘启动教程
- linux 上挂载硬盘或者读取u盘数据
- 简单制作 OS X Yosemite 10.10 正式版U盘USB启动安装盘方法教程 (全新安装 Mac 系统)
- cenos6.4u盘启动安装盘
- win7系统安装ubuntu:ultraISO写u盘安装盘时,load iso文件时只有1个efi目录; 用Universal-USB-Installer写的u盘安装盘在启动后一直黑屏闪光标;
- Fedora13 U盘启动+硬盘安装
- u盘安装linux,将grub安装到了u盘,将U盘拔掉后系统无法引导启动的解决方法
- 用Xboot制作多系统启动U盘
- android通过usb读取U盘的方法
- [zz]用UltraISO制作U盘启动盘
- 读取U盘 PID,VID,序列号等信息.
- scsi inquiry 读取U盘的基本信息
- 制作U盘启动盘,用U盘安装windows7全过程