OS building int 13h ah=3(hex) cf打开ah变成B(hex)或12(dec)
OS building int 13h ah=3(hex) cf turns on and ah become B(hex) or 12(dec)
我正在尝试构建自己的操作系统,您知道,是为了好玩...
我正处于非常早期的阶段....我现在正在尝试制作一种安装软盘,一种将自身复制到主硬盘驱动器的引导扇区的软盘。
这是我的安装过程(我正在使用nasm):
install:
MOV ax,0201h
mov cx,0001h ;; my drive destinated boot sector is written on the second sector of the floppy
mov dx,0000h
mov bx, buffWrt
int 13h ;;jc doesnt turn on here
jc errorIns
mov ax,0303h
xor cx,cx
mov dx,0080h
mov bx, buffWrt
int 13h
jc errorIns1;; jc turn on and ah become B
stopped:
mov si, insMsg
call print
ret
我在网上看到,当 B 开启时,这意味着类似 "bad fixed disk cylinder" 的事情。这是什么意思?
顺便说一句,我在具有 64 mb 内存和 2 gig 虚拟硬盘驱动器的 oracle 虚拟机上模拟了我的 os。
提前致谢!
CHS addressing 从 C=0, H=0, S=1 开始。
xor cx, cx
将扇区设置为 0,这不是有效的扇区号。
在同一行,mov cx, 1
读取软盘的 第一个 扇区。
我正在尝试构建自己的操作系统,您知道,是为了好玩... 我正处于非常早期的阶段....我现在正在尝试制作一种安装软盘,一种将自身复制到主硬盘驱动器的引导扇区的软盘。
这是我的安装过程(我正在使用nasm):
install:
MOV ax,0201h
mov cx,0001h ;; my drive destinated boot sector is written on the second sector of the floppy
mov dx,0000h
mov bx, buffWrt
int 13h ;;jc doesnt turn on here
jc errorIns
mov ax,0303h
xor cx,cx
mov dx,0080h
mov bx, buffWrt
int 13h
jc errorIns1;; jc turn on and ah become B
stopped:
mov si, insMsg
call print
ret
我在网上看到,当 B 开启时,这意味着类似 "bad fixed disk cylinder" 的事情。这是什么意思? 顺便说一句,我在具有 64 mb 内存和 2 gig 虚拟硬盘驱动器的 oracle 虚拟机上模拟了我的 os。
提前致谢!
CHS addressing 从 C=0, H=0, S=1 开始。
xor cx, cx
将扇区设置为 0,这不是有效的扇区号。
在同一行,mov cx, 1
读取软盘的 第一个 扇区。