[自制简单操作系统] 2、鼠标及键盘中断处理事件[PIC\GDT\IDT\FIFO]
1、大致介绍:
>_<" 大致执行顺序是:ipl10.nas->asmhead.nas->bootpack.c
PS: 这里bootpack.c要调用graphic.c、dsctbl.c、fifo.c、int.c实现功能,其中有些函数还必须汇编来写,所以单独写一个汇编文件naskfunc.nas,为了方便看全部函数和结构体,所以写一个bootpack.h来写一些结构体和函数声明~
>_<" 下面是编译图解:最终生成的haribote.img可放在软盘来启动电脑,加载操作系统~
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtoAAAJGCAIAAADqKLVcAAAgAElEQVR4nOy972sbWZb/f/6FeqInArEeDMGEEDA0hCSTmIwJ3dlsnCaeNG5MfrTbCMfOUjQJmB3TjnYaT3q0qMfd6W53z+yE9pLBO2ESbzYbOk6w4rVxxrMmHY8QRkjg+k/8eXC+qW9FVXVVKt1S3Vv1fj2yVKWqc07VvfdVt0oy7QMAAAAAxAoJiDs2AICioN8AAIRA5BzoVgAA7YJ+AwAQAugIAEAm6DcAACGAjgAAZIJ+AwAQAugIAEAm6DcAACEI6h8DAwOzDm4BAIAXs/7EHRoAQF2cfUULHRkYGMBVDgBADGZHAAAhsDsK6AgAQALQEQBACKAjAACZQEcAACEQ6YhzvXK5XC6XYwoSAAAAAKng1q1bTe9ARwAAAADQVaAjAAAAAIgZ6AgAAAAAYgY6AgAAAICYgY4AAAAAIGagIwAAAACIGegIAAAAAGIGOgIAAACAmIGOAAAAACBmoCMAAAAAiBnoCAAAAABiBjoCAAAAgJiBjgAAAAAgZqAjAAAAAIgZ6AgAAAAAYgY6AgAAAICYgY4AAAAAIGagIwAAAACIGegIAAAAAGIGOgIAAACAmIGOAAAAACBmoCMAAAAAiBnoCAAAAABiBjoCAAAAgJiBjgAAAAAgZqAjAAAAAIgZ6AgAAAAAYgY6AgAAAICYgY4AAAAAIGagIwAAAACIGegIAAAAAGIGOgIAAACAmIGOAAAAACBmoCMAAAAAiBnoCAAAAABiBjoCAAAAgJi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U8IpyxHp2eCQSkccZyY9zNL8eCoU+fvwo73V4eGgukl+RAyRWhmGk02khhKqqpR730p/LOL/YjnTt2jVyBABM5IhEjlTF9UXii948PDxMJpPpdFp+aqL1wI4Lh3HYl66urv748UPTtJWVFesZMScnJ/KyvsvLyxeOhd7b29M0Tc7dSEdHR6lUStO0paUleYxqPp9Pp9Pmdc8ctsr55tevXzVNW1tby+Vy1r4pEzkCoFnpur64uJhpeYuLi+SIe1RtpVZWVoQQd+/ereheGXIEQJM6OzvToeu6rp+dnTn8osgRJzo5UobBwcFYLKZp2uTkpBwaOTw8rGgN5AgAtDhyxAk5Uo7bt2/Lz97r7Oycmpr69etXpWsgRwCgxZEjTsiRxiBHAKDFkSNOyJHGIEcAoMWRI07IkcYgRwCgxZEjTsiRxiBHAKDFkSNOdM4Xb4hLz0cHADQ3csQJ54s3jPP56ACA5kaOAAAAj5EjAADAY+QIAADwGDkCAAA8Ro4AAACPkSMAAMBj5AgAAPAYOQIAADxGjgAAAI8VyRGraDQajUbNm55sIgD/E6V5vWkA/MvcUSQSCYfdCDkCoCzkCAAXKsiRe/fuRc/V5dNKAARftDSvNw2Af5k7iktypK2tjd0KgEuRIwBcsO4rnHKEQVcA5WC/AcCFChKE3QqAS7HfAOACOQKglthvAHCBHAFQS+w3ALhAjgCoJfYbAFxw2HX8D+vpQxJW7g8mAAAAAElFTkSuQmCC" alt="" />
OBJS_BOOTPACK = bootpack.obj naskfunc.obj hankaku.obj graphic.obj dsctbl.obj \
int.obj fifo.obj TOOLPATH = ../z_tools/
INCPATH = ../z_tools/haribote/ MAKE = $(TOOLPATH)make.exe -r
NASK = $(TOOLPATH)nask.exe
CC1 = $(TOOLPATH)cc1.exe -I$(INCPATH) -Os -Wall -quiet
GAS2NASK = $(TOOLPATH)gas2nask.exe -a
OBJ2BIM = $(TOOLPATH)obj2bim.exe
MAKEFONT = $(TOOLPATH)makefont.exe
BIN2OBJ = $(TOOLPATH)bin2obj.exe
BIM2HRB = $(TOOLPATH)bim2hrb.exe
RULEFILE = $(TOOLPATH)haribote/haribote.rul
EDIMG = $(TOOLPATH)edimg.exe
IMGTOL = $(TOOLPATH)imgtol.com
COPY = copy
DEL = del # 设置默认命令为产生img default :
$(MAKE) img # 正常执行过程
# 将ipl10.nas编译为ipl10.bin文件
ipl10.bin : ipl10.nas Makefile
$(NASK) ipl10.nas ipl10.bin ipl10.lst # 将asmhead.asm编译为asmhead.bin
asmhead.bin : asmhead.nas Makefile
$(NASK) asmhead.nas asmhead.bin asmhead.lst # 将字库hankaku.txt编译为hankaku.bin
hankaku.bin : hankaku.txt Makefile
$(MAKEFONT) hankaku.txt hankaku.bin # 将字库转换为.obj
hankaku.obj : hankaku.bin Makefile
$(BIN2OBJ) hankaku.bin hankaku.obj _hankaku # 将OBJS_BOOTPACK的obj编译为.bim映像文件,这里的前提条件是有OBJS_BOOTPACK,所以会自动执行把naskfunc.nas和其它.c文件编译为obj文件
bootpack.bim : $(OBJS_BOOTPACK) Makefile
$(OBJ2BIM) @$(RULEFILE) out:bootpack.bim stack:3136k map:bootpack.map \
$(OBJS_BOOTPACK)
# 3MB+64KB=3136KB # 将bootpack.bim映像编译为.hrb文件
bootpack.hrb : bootpack.bim Makefile
$(BIM2HRB) bootpack.bim bootpack.hrb # 将.hrb映像和asmhead.bin 合并做成haribote.sys系统文件
haribote.sys : asmhead.bin bootpack.hrb Makefile
copy /B asmhead.bin+bootpack.hrb haribote.sys # 把ipl10.bin和haribote.sys结合做成操作系统文件haribote.img
haribote.img : ipl10.bin haribote.sys Makefile
$(EDIMG) imgin:../z_tools/fdimg0at.tek \
wbinimg src:ipl10.bin len: from: to: \
copy from:haribote.sys to:@: \
imgout:haribote.img # 对c文件进行编译
# 把.c文件编译为.gas文件,需要.c bootpack.h 和 Makefile文件,然后调用cc1.exe进行处理
%.gas : %.c bootpack.h Makefile
$(CC1) -o $*.gas $*.c # 把.gas文件转换为.nas文件,其他类似上面的说明
%.nas : %.gas Makefile
$(GAS2NASK) $*.gas $*.nas # 把.nas转为.obj文件并输出.lst文件
%.obj : %.nas Makefile
$(NASK) $*.nas $*.obj $*.lst # 根据不同的命令分别执行下面的情况,默认为img img :
$(MAKE) haribote.img run :
$(MAKE) img
$(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin
$(MAKE) -C ../z_tools/qemu install :
$(MAKE) img
$(IMGTOL) w a: haribote.img clean :
-$(DEL) *.bin
-$(DEL) *.lst
-$(DEL) *.obj
-$(DEL) bootpack.map
-$(DEL) bootpack.bim
-$(DEL) bootpack.hrb
-$(DEL) haribote.sys src_only :
$(MAKE) clean
-$(DEL) haribote.img
Makefile文件,负责编译全过程
>_<" 此外还需要一个make.bat的脚本程序,这样把相应的编译器和上面的文件放到对应的位置(参看Makefile文件),运行DOS窗口输入:make run就能直接编译,打包,导入,运行在虚拟机上了~为了在UE上调试方便,我把make run命令也写成了脚本.bat,这样可在UE中直接调试运行~
..\z_tools\make.exe % % % % % % % % %
make.bat
@ECHO OFF
cd/d C:\Users\LiTao\Desktop\30OS\aaaa\A20110738\tolset\副本
make run
脚本.bat[UE的高级,工具配置]
2、代码详解:
; haribote-ipl
; TAB=4
CYLS EQU ; 定义读的柱面数
ORG 0x7c00 ; 指明程序装载地址 ; 以下这段是FAT12格式软盘专用代码 0x7c00--0x7dff 125字节 用于启动区
JMP entry
DB 0x90
DB "HARIBOTE" ; 启动区的名字可以是任意的,但必须是8字节
DW ; 每个扇区(sector)的大小必须为512字节
DB ; 簇(cluster)的大小必须为1个扇区
DW ; FAT的起始位置(一般从第一个扇区开始)
DB ; FAT的个数(必须为2)
DW ; 根目录的大小(一般设为244项)
DW ; 该磁盘的的大小(必须为2880扇区)
DB 0xf0 ; 磁盘的种类(必须为0xfd)
DW ; FAT的长度(必须为9扇区)
DW ; 一个磁道(track)有几个扇区(必须为18)
DW ; 磁头数(必须为2)
DD ; 不使用分区(必须为0)
DD ; 重写一次磁盘大小
DB ,,0x29 ; 意义不明,固定
DD 0xffffffff ; (可能是)卷标号码
DB "HARIBOTEOS " ; 磁盘名称(11字节)
DB "FAT12 " ; 磁盘格式名称(8字节)
RESB ; 先腾出18字节 ; 程序核心
entry:
MOV AX, ; 初始化寄存器
MOV SS,AX
MOV SP,0x7c00
MOV DS,AX ; 读磁盘(从软盘中读数据装到内存中0x8200--0x83ff 125字节的地方)
MOV AX,0x0820 ; ES:BX=缓冲地址
MOV ES,AX
MOV CH, ; 柱面0
MOV DH, ; 磁头0
MOV CL, ; 扇区2
readloop:
MOv SI, ; 记录失败次数的寄存器
retry:
MOV AH,0x02 ; AH=0x02 : 读盘
MOV AL, ; 1个扇区
MOV BX,
MOV DL,0x00 ; A驱动器
INT 0x13 ; 调用磁盘BIOS
JNC next ; 没出错就跳转到next继续读下一个做准备
ADD SI, ; SI++
CMP SI, ; 比较SI和5
JAE error ; SI>=5时,跳转到error
MOV AH,0x00
MOV DL,0x00 ; A驱动器
INT 0x13 ; 重置驱动器
JMP retry
next:
MOV AX,ES ; 把内存地址后移0x200
ADD AX,0x0020
MOV ES,AX ; 因为没有ADD ES,0x200指令,所以这里绕个弯
ADD CL, ; 往CL里加1 (所读扇区标号,开始是2,见初始化部分)
CMP CL, ; 和18比较
JBE readloop ; 小于18就跳转到readloop继续读
MOV CL, ; 扇区1
ADD DH, ; 磁头+1
CMP DH, ; 判断磁头是否超过2
JB readloop ; 没有超过就继续读
MOV DH, ; 超过2就转为0
ADD CH, ; CH记录读取的柱面数
CMP CH,CYLS ; CYLS在前面定义 CYLS EQU 10
JB readloop ; 磁盘内容装载内容的结束地址告诉haribote.sys
MOV [0x0ff0],CH ; 将CYLS的值写到内存地址0x0ff0中
JMP 0xc200 error:
MOV SI,msg ; 循环输出msg里面的内容 putloop:
MOV AL,[SI]
ADD SI, ; 给SI加1
CMP AL,
JE fin
MOV AH,0x0e ; 显示一个文字
MOV BX, ; 指定字符颜色
INT 0x10 ; 调用显卡BIOS
JMP putloop
fin:
HLT ; 让CPU停止等待指令
JMP fin ; 无限循环 msg:
DB 0x0a, 0x0a ; 换行2次
DB "load error"
DB 0x0a ; 换行
DB RESB 0x7dfe-$ ; 0x7dfe傑偱傪0x00偱杽傔傞柦椷 DB 0x55, 0xaa
ipl10.nas
PS: 负责读盘到内存,读完盘之后跳转到0xc200处,即asmhead.nas
; haribote-os boot asm
; TAB=4 BOTPAK EQU 0x00280000 ; bootpack的内存首址
DSKCAC EQU 0x00100000 ;
DSKCAC0 EQU 0x00008000 ; ; BOOT_INFO相关
CYLS EQU 0x0ff0 ; 设定启动区
LEDS EQU 0x0ff1
VMODE EQU 0x0ff2 ; 关于颜色的信息颜色的位数
SCRNX EQU 0x0ff4 ; 分辨率X
SCRNY EQU 0x0ff6 ; 分辨率Y
VRAM EQU 0x0ff8 ; 图像缓冲区的开始地址 ORG 0xc200 ; 这个程序要装在到什么位置,在ipl10读盘结束的地方转到该处 MOV AL,0x13 ; VGA显卡,320X200X8位色彩
MOV AH,0x00
INT 0x10
MOV BYTE [VMODE], ; 记录画面模式
MOV WORD [SCRNX],
MOV WORD [SCRNY],
MOV DWORD [VRAM],0x000a0000 ; 用BIOS获得键盘上各种LED指示灯的状态
MOV AH,0x02
INT 0x16 ; keyboard BIOS
MOV [LEDS],AL ; PIC关闭一切中断
; 根据AT兼容机的规格,如果要初始化PIC(Programmable Interrupt Controller)
; 必须在CLI之前进行,否则有时会挂起
; 随后进行PIC的初始化
; 这段等价于:
; io_out8(PIC0_IMR,0xff);禁止主PIC的中断
; io_out8(PIC1_IMR,0xff);禁止从PIC的中断
; io_cli();禁止CPU级中断 MOV AL,0xff
OUT 0x21,AL
NOP ; 如果连续执行OUT指令有些机种会无法执行
OUT 0xa1,AL CLI ; 禁止CPU级别中断 ; 为了让CPU访问1MB以上的内存空间,设定A20GATE
; 相当于
; #define KEYCMD_WRITE_OUTPORT 0xd1
; #define KBC_OUTPORT_A20G_ENABLE 0xdf
; wait_KBC_sendready();
; io_out8(PORT_KEYCMD,KEYCMD_WRITE_OUTPORT);
; wait_KBC_sendready();
; io_out8(PORT_KEYDAT,KBC_OUTPORT_A20G_ENABLE);
; wait_KBC_sendready();
; 该程序和init_keyboard完全相同,仅仅是向键盘控制电路发送指令,这里发送的指令,是指令键盘控制电路的附属端口输出0xdf
; 这个附属端口,连接着主板上的很多地方,通过这个端口发送不同的命令,就可以实现各种各样的控制功能了
; 这次输出所要完成的功能,是让A20GATE信号变成ON状态,是让1MB以上的内存变成可用状态 CALL waitkbdout
MOV AL,0xd1
OUT 0x64,AL
CALL waitkbdout
MOV AL,0xdf ; enable A20
OUT 0x60,AL
CALL waitkbdout ; 切换保护模式
; INSTRSET指令是为了386以后的LGDT,EAX,CR0
; LGDT指令把随意准备的GDT读出来,对于这个暂定的GDT我们今后还要重新设定,然后将CR0这一特殊的32位寄存器的值带入EAX
; 并将高位置0,低位置1,再将这个值返回给CR0,这就完成了模式转化,进入到不用颁的保护模式。
; CR0是control register 0是一个非常重要的寄存器,只有操作系统才能操作它
; protected virtual address mode 受保护的虚拟内存地址模式,在该模式下,应用程序不能随便改变段的设定,又不能使用操作系统的段。操作系统受CPU保护
; 在保护模式中主要有受保护的16位模式和受保护的32位模式,我们要使用的是受保护的32位模式
; 在讲解CPU的书上会写到,通过带入CR0而切换到保护模式时,马上就执行JMP指令。所以我们也执行这一指令。为什么要jmp呢?因为变成保护模式后,机器语言的解释发生变化,
; CPU为了加快指令的执行速度而使用了管道(pipeline)这一机制,也就是说前一条指令还在执行时,就开始解释下一条甚至是再下一条指令,因为模式变了就要重新解释一遍,so..
; 而且在程序中,进入保护模式后,段寄存器的意思也变了(不是*16再加算的意思),除了CS以外所有的段寄存器的值都从0x0000变成了0x0008.CS保持不变是因为CS如果变了就乱了
; 所以只有CS要放到后面处理。这里的0x0008相当于gdt+1的段 [INSTRSET "i486p"] ; ”想要使用486指令"的叙述 LGDT [GDTR0] ; 设定临时的GDT(Global Descriptor Table)
MOV EAX,CR0
AND EAX,0x7fffffff ; 设bit31为0(为了禁止颁)
OR EAX,0x00000001 ; 设bit0为1(为了切换保护模式)
MOV CR0,EAX
JMP pipelineflush
pipelineflush:
MOV AX,* ; 可读写的段32bit
MOV DS,AX
MOV ES,AX
MOV FS,AX
MOV GS,AX
MOV SS,AX ; bootpack传送
; 简单来说,这部分只是在调用memcpy函数(大概意思是:下面表达仅为了说明意思,可能不正确)
; memcpy(转送源地址 ,转送目的地址,转送数据大小);大小用双字,所以用字节/4、
; memcpy(bootpack ,BOTPAK ,512*1024/4 );//从bootpack的地址开始的512kb内容复制到0x00280000号地去[512kb比bootpack.hrb大很多]
; memcpy(0x7c00 ,DSKCAC ,512/4 );//从0x7c00复制512字节到0x10000000是将启动扇区复制到1MB以后的内存去,[启动区的0x00007c00-0x00007dff,125字节]
; memcpy(DSKCAC+512 ,DSKCAC+512 ,cyls*512*18*2/4-512/4);//从始于磁盘0x00008200的内容,复制到0x00100200内存去[从磁盘读取数据装到0x8200后的地方]
; bootpack是asmhead的最后一个标签,因为.sys是通过asmhead.bin和bootpack.hrb连接而成,所以asmhead结束的地方就是bootpack.hrb最开始地方
MOV ESI,bootpack ; 转送源
MOV EDI,BOTPAK ; 转送目的地
MOV ECX,*/
CALL memcpy ; 磁盘的数据最终转送到它本来的位置去 ; 首先从启动扇区开始 MOV ESI,0x7c00 ; 转送源
MOV EDI,DSKCAC ; 转送目的地
MOV ECX,/
CALL memcpy ; 所有剩下的 MOV ESI,DSKCAC0+ ; 转送源
MOV EDI,DSKCAC+ ; 转送目的地
MOV ECX,
MOV CL,BYTE [CYLS]
IMUL ECX,**/ ; 从柱面数转为字节数/4
SUB ECX,/ ; 减去IPL
CALL memcpy ; 必须由asmhead来完成,至此全部完毕
; 以后就交给bootpack来完成 ; bootpack的启动
; 还是执行memecpy程序,将bootpack.hrb第0x10c8字节开始的0x11a8字节复制到0x00310000号地址去
; 最后将0x310000代入到ESP中,然后用一个特殊的JMP指令,将2*8代入到CS里,同时移动到0x1b号地址,这里的0x1b是指第二个段的0x1b号地址
; 第2个段的基址是0x280000,所以是从0x28001b开始执行,即bootpack.hrb的0x1b号地址
MOV EBX,BOTPAK
MOV ECX,[EBX+]
ADD ECX, ; ECX += 3;
SHR ECX, ; ECX /= 4;
JZ skip ; 没有要转送的东西时
MOV ESI,[EBX+] ; 转送源
ADD ESI,EBX
MOV EDI,[EBX+] ; 转送目的地
CALL memcpy
skip:
MOV ESP,[EBX+] ; 栈初始值
JMP DWORD *:0x0000001b
;----------------------------------------------------------------------------------------------------
;内存分配:
; 0x00000000-0x000fffff:虽然在启动中会多次使用,但之后就会变空(1M)
; 0x00100000-0x00267fff:用于保存软盘的内容(1440KB)
; 0x00268000-0x0026f7ff:空(30KB)
; 0x0026f800-0x0026ffff:IDT(2KB)
; 0x00270000-0x0027ffff:GDT(64KB)
; 0x00280000-0x002fffff:bootpack.hrb(512KB)
; 0x00300000-0x003fffff:栈及其他(1MB)
; 0x00400000- :空
;---------------------------------------------------------------------------------------------------- ; 和wait_KBC_sendready相同,但加入了0x60号设备进行IN处理,也就是如果控制器里有键盘代码,或已经积累了鼠标数据,就顺便读出来
waitkbdout:
IN AL,0x64
AND AL,0x02
JNZ waitkbdout ; AND偺寢壥偑0偱側偗傟偽waitkbdout傊
RET ; 复制程序
memcpy:
MOV EAX,[ESI]
ADD ESI,
MOV [EDI],EAX
ADD EDI,
SUB ECX,
JNZ memcpy ; 减法运算的结果如果不是0,就跳转到memcpy
RET ; GDT0也是一种特定的GDT,0是空区域(null sector),不能在那里定义段,1号和2号分别由下式设定:
; set_segmdesc(gdt + 1, 0xffffffff, 0x00000000, AR_DATA32_RW);//设定全局段
; set_segmdesc(gdt + 2, LIMIT_BOTPAK, ADR_BOTPAK, AR_CODE32_ER);//设定bootpack512字节的段 ALIGNB ;一直添加DBO,直到地址能被16整除,如果GDT0地址不是8的倍数就会慢一些,所以...
GDT0:
RESB ; NULL selector
DW 0xffff,0x0000,0x9200,0x00cf ; 可以读写的段(segment) 32bit
DW 0xffff,0x0000,0x9a28,0x0047 ; 可执行的段(segment) 32bit (bootpack用) DW
GDTR0: ;是LGDT指令,通知GDT0有了GDT,在GDT0写入了16位的段上限和32位段其实地址
DW *-
DD GDT0 ALIGNB
bootpack: ; 也就是说,最初的状态时,GDT在asmhead.nas里并不在0x00270000-0x0027ffff的范围里。IDT连设定都没设定,所以仍处于中断禁止状态
; 应当趁着硬件上积累过多的数据而产生的错误之前,尽快开放中断,接受数据。因此,在bootpack.c的hariMain里,应该在进行调色板的
; 初始化之前及画面准备之前,赶紧重新建立GDT和IDT,初始化PIC,并执行io_sti();
asmhead.nas
PS: 负责显示模式及分辨率设置及从16位转换为32位保护模式,是c语言和汇编语言的桥梁,所以称为asmhead文件,执行到最后就转到bootpack.c的主函数
/* bootpack文件*/ #include "bootpack.h"
#include <stdio.h> struct MOUSE_DEC {//鼠标移动结构体
unsigned char buf[], phase;
int x, y, btn;//鼠标移动距离,鼠标点击信息[低3位从高到低依次:LMR]
}; extern struct FIFO8 keyfifo, mousefifo;
void enable_mouse(struct MOUSE_DEC *mdec);//使能鼠标
void init_keyboard(void);//初始化键盘
int mouse_decode(struct MOUSE_DEC *mdec, unsigned char dat);//鼠标消息处理 void HariMain(void)
{
struct BOOTINFO *binfo = (struct BOOTINFO *) ADR_BOOTINFO;
char s[], mcursor[], keybuf[], mousebuf[];
int mx, my, i;
struct MOUSE_DEC mdec; init_gdtidt();//在dsctbl.c中,负责分区和中断分区初始化[包括键盘和鼠标中断设定]
init_pic();//在int.c中,负责中断初始化(硬件)
io_sti(); //在naskfunc.nas中,仅仅执行STI指令,是CLI的逆指令,前者是开中断,后者是禁止中断
fifo8_init(&keyfifo, , keybuf);//在fifo.c中,负责缓冲区初始化(缓冲区结构体,大小,缓冲区首址)
fifo8_init(&mousefifo, , mousebuf);
/*这里IMR是(interrupt mask register),意思是“中断屏蔽寄存器”,是8位寄存器,分别对应8路IRQ信号,如果一路是1则该路被屏蔽
因为键盘中断是IRQ1,鼠标中断是IRQ12,且PIC分主从2个,从PIC连接主PIC的IRQ2,所以想要有鼠标和键盘中断,要PIC0的IRQ1和IRQ2,和PIC1的IRQ4*/
io_out8(PIC0_IMR, 0xf9);
io_out8(PIC1_IMR, 0xef); init_keyboard();//在这个文件夹内:鼠标和键盘模式设置 init_palette();//在文件graphic.c里,初始化调色板,建立静态16个颜色映射,然后调用set_palette进行设置
init_screen8(binfo->vram, binfo->scrnx, binfo->scrny);//在文件graphic.c里,初始化屏幕,画矩形,形成最初的窗口界面
mx = (binfo->scrnx - ) / ; /* 画面中央的坐标计算 */
my = (binfo->scrny - - ) / ;
init_mouse_cursor8(mcursor, COL8_008484);//在文件graphic.c里,存放鼠标颜色信息的字符指针,窗口背景颜色
putblock8_8(binfo->vram, binfo->scrnx, , , mx, my, mcursor, );//在文件graphic.c里,绘制鼠标
sprintf(s, "(%3d, %3d)", mx, my);//将鼠标位置坐标转换为字符串s
putfonts8_asc(binfo->vram, binfo->scrnx, , , COL8_FFFFFF, s);//在文件graphic.c里,显示字符串在0,0位置 enable_mouse(&mdec);//使能鼠标,在本文件内 for (;;) {
io_cli();//关闭中断,汇编函数
if (fifo8_status(&keyfifo) + fifo8_status(&mousefifo) == ) {//如果键盘和鼠标的缓冲区里没有数据就SLT什么都不做并且STI恢复中断
io_stihlt();
} else {//如果缓冲区中有数据
if (fifo8_status(&keyfifo) != ) {
i = fifo8_get(&keyfifo);//获取一个数据FIFO
io_sti();//开中断,汇编函数
sprintf(s, "%02X", i);//转换为字符串
boxfill8(binfo->vram, binfo->scrnx, COL8_008484, , , , );//在graphic.c文件中,填充VRAM实现画矩形操作,负责清屏操作[这一块]
putfonts8_asc(binfo->vram, binfo->scrnx, , , COL8_FFFFFF, s);//显示字符串
} else if (fifo8_status(&mousefifo) != ) {
i = fifo8_get(&mousefifo);
io_sti();
if (mouse_decode(&mdec, i) != ) {//对鼠标移动消息进行处理[这里比较特殊,在本文件夹内]
sprintf(s, "[lcr %4d %4d]", mdec.x, mdec.y);//将鼠标坐标和lcr信息封装成字符串待输出,这里的x,y是移动距离
if ((mdec.btn & 0x01) != ) {//通过判断,将点击事件的字符改为大写
s[] = 'L';
}
if ((mdec.btn & 0x02) != ) {
s[] = 'R';
}
if ((mdec.btn & 0x04) != ) {
s[] = 'C';
}
boxfill8(binfo->vram, binfo->scrnx, COL8_008484, , , + * - , );//输出鼠标移动消息
putfonts8_asc(binfo->vram, binfo->scrnx, , , COL8_FFFFFF, s);
//鼠标指针移动
boxfill8(binfo->vram, binfo->scrnx, COL8_008484, mx, my, mx + , my + ); /*隐藏鼠标*/
mx += mdec.x;//计算当前鼠标的位置
my += mdec.y;
if (mx < ) {//超屏控制
mx = ;
}
if (my < ) {
my = ;
}
if (mx > binfo->scrnx - ) {
mx = binfo->scrnx - ;
}
if (my > binfo->scrny - ) {
my = binfo->scrny - ;
}
sprintf(s, "(%3d, %3d)", mx, my);
boxfill8(binfo->vram, binfo->scrnx, COL8_008484, , , , ); /*隐藏鼠标坐标消息*/
putfonts8_asc(binfo->vram, binfo->scrnx, , , COL8_FFFFFF, s); /*显示鼠标坐标消息*/
putblock8_8(binfo->vram, binfo->scrnx, , , mx, my, mcursor, ); /*显示鼠标*/
}
}
}
}
} #define PORT_KEYDAT 0x0060
#define PORT_KEYSTA 0x0064
#define PORT_KEYCMD 0x0064
#define KEYSTA_SEND_NOTREADY 0x02
#define KEYCMD_WRITE_MODE 0x60
#define KBC_MODE 0x47 /////////////////////////////////////////////////////////////////////////////////////
//功能:等待键盘控制电路准备完毕
//参数:无
//附加:如果键盘控制电路可以接受CPU指令,CPU从设备号码0x0064处所读取的数据的倒数第二位应该是0,否则就一种循环等待
void wait_KBC_sendready(void)
{
for (;;) {
if ((io_in8(PORT_KEYSTA) & KEYSTA_SEND_NOTREADY) == ) {
break;
}
}
return;
}
void init_keyboard(void)//初始化键盘控制电路
{
wait_KBC_sendready();//让键盘控制电路做好准备,等待控制指令的到来
io_out8(PORT_KEYCMD, KEYCMD_WRITE_MODE);//键盘模式设置指令
wait_KBC_sendready();
io_out8(PORT_KEYDAT, KBC_MODE);//鼠标模式设置指令
return;
} #define KEYCMD_SENDTO_MOUSE 0xd4
#define MOUSECMD_ENABLE 0xf4
/////////////////////////////////////////////////////////////////////////////////////
//功能:使能鼠标
//参数:
//附加:这个函数和init_keyboard十分相似,不同的在于输入的数据不同
//如果向键盘控制电路发送指令0xd4,下一数据就会自动发送给鼠标,利用这一特性来发送激活鼠标的指令
//其中答复消息为0xfa
void enable_mouse(struct MOUSE_DEC *mdec)
{
wait_KBC_sendready();//让键盘控制电路做好准备,等待控制指令的到来
io_out8(PORT_KEYCMD, KEYCMD_SENDTO_MOUSE);
wait_KBC_sendready();
io_out8(PORT_KEYDAT, MOUSECMD_ENABLE);
mdec->phase = ;
return;
}
/////////////////////////////////////////////////////////////////////////////////////
//功能:鼠标信息解码程序,把信息保存在鼠标结构体中
//参数:鼠标结构体,从缓冲区读取的数据
//附加:首先把最初读到的0xfa舍掉,之后从鼠标那里送过来的数据都应该是3个字节一组的,所以每当数据累计3字节时候就作相应处理[这里返回1]
//最后将鼠标的点击信息放在btn中,将鼠标的移动信息保存在x,y中
int mouse_decode(struct MOUSE_DEC *mdec, unsigned char dat)
{
if (mdec->phase == ) {
/*等待鼠标的0xfa状态*/
if (dat == 0xfa) {
mdec->phase = ;
}
return ;
}
if (mdec->phase == ) {
/*等待鼠标的第一字节*/
if ((dat & 0xc8) == 0x08) {
/* 正しい1バイト目だった */
mdec->buf[] = dat;
mdec->phase = ;
}
return ;
}
if (mdec->phase == ) {
/*等待鼠标的第二字节*/
mdec->buf[] = dat;
mdec->phase = ;
return ;
}
if (mdec->phase == ) {
/*等待鼠标的第三字节,并作处理*/
mdec->buf[] = dat;
mdec->phase = ;//注意这里是恢复到1不是0,见附加说明,刚开始舍去0xfa以后每次3字节
/*下面是根据buf的3个数据进行计算鼠标信息
这里btn是buf[0]的低3位,最低位表示鼠标左击,中间表示鼠标中间被击,第3位表示鼠标右击
鼠标的x,和y坐标基本和buf[1],buf[2]相等,但是要根据buf[0]的前半部分作相应的变化:要么第8位及8位以后的全部设成1,或全部保留为0
*/
mdec->btn = mdec->buf[] & 0x07;
mdec->x = mdec->buf[];
mdec->y = mdec->buf[];
if ((mdec->buf[] & 0x10) != ) {
mdec->x |= 0xffffff00;
}
if ((mdec->buf[] & 0x20) != ) {
mdec->y |= 0xffffff00;
}
mdec->y = - mdec->y; /* 因为鼠标和屏幕的方向恰好相反,所以这里取反*/
return ;
}
return -;
}
bootpack.c
/* In this file, not only have the defination of the function, but also
hava the description of where the function is.*/ /* asmhead.nas */
struct BOOTINFO { /* 0x0ff0-0x0fff */
char cyls; /* what's the end of the start zone read the data */
char leds; /* when boot,the LED's state of the keyboard */
char vmode; /* GPU mode:how many bits of color */
char reserve;
short scrnx, scrny; /* resolution */
char *vram;
};
#define ADR_BOOTINFO 0x00000ff0 /* naskfunc.nas */
void io_hlt(void);
void io_cli(void);
void io_sti(void);
void io_stihlt(void);
int io_in8(int port);
void io_out8(int port, int data);
int io_load_eflags(void);
void io_store_eflags(int eflags);
void load_gdtr(int limit, int addr);
void load_idtr(int limit, int addr);
void asm_inthandler21(void);
void asm_inthandler27(void);
void asm_inthandler2c(void); /* fifo.c */
struct FIFO8 {//FIFO缓冲区数据结构
unsigned char *buf;//缓冲区
int p, q, size, free, flags;//下一个数据的写入地址,下一个数据的读出地址,缓冲区的大小,free是缓冲区没有数据的字节数,flag是是否溢出
};
void fifo8_init(struct FIFO8 *fifo, int size, unsigned char *buf);
int fifo8_put(struct FIFO8 *fifo, unsigned char data);
int fifo8_get(struct FIFO8 *fifo);
int fifo8_status(struct FIFO8 *fifo); /* graphic.c */
void init_palette(void);
void set_palette(int start, int end, unsigned char *rgb);
void boxfill8(unsigned char *vram, int xsize, unsigned char c, int x0, int y0, int x1, int y1);
void init_screen8(char *vram, int x, int y);
void putfont8(char *vram, int xsize, int x, int y, char c, char *font);
void putfonts8_asc(char *vram, int xsize, int x, int y, char c, unsigned char *s);
void init_mouse_cursor8(char *mouse, char bc);
void putblock8_8(char *vram, int vxsize, int pxsize,
int pysize, int px0, int py0, char *buf, int bxsize);
#define COL8_000000 0
#define COL8_FF0000 1
#define COL8_00FF00 2
#define COL8_FFFF00 3
#define COL8_0000FF 4
#define COL8_FF00FF 5
#define COL8_00FFFF 6
#define COL8_FFFFFF 7
#define COL8_C6C6C6 8
#define COL8_840000 9
#define COL8_008400 10
#define COL8_848400 11
#define COL8_000084 12
#define COL8_840084 13
#define COL8_008484 14
#define COL8_848484 15 /* dsctbl.c about GDT IDT that's Global Descriptor Table and Interrupt Descriptor Table*/
struct SEGMENT_DESCRIPTOR {//8 bytes segment infomation,total 8192 parts [here similar to the method of the setting palette]
short limit_low, base_low;//address of segment base[high:mid:low=1:1:2]=4 bytes =32 bits
char base_mid, access_right;//segment limit[high:low=1:2],only 20 bits = high byte's low 4 bits + low 2bytes' 16bits
char limit_high, base_high;//segment property access[limit_high:right=1:1],only 12 bits = limit_high's high 4 bits + access_right's 8 bits
};
//PS 1):segment limit equals the number of GDT's effective bytes -1
//PS 2):the segment limit just only has 20 bits, which can represent 1MB, and the segment property has 1 bit flag,
//if this flag =1,and the limit's unit uses page to replace byte(here 1 page = 4kb)
//PS 3):the segment property has 16 bits liking that:xxxx0000 xxxxxxxx
//the high 4 bits are extended access
//the low 8 bits are:
// 0x00:unused description table
// 0x92:system exclusive,readable and writable,non-executable
// 0x9a:system exclusive,readable and non-writable,executable
// 0xf2:application useing,readable and writable,non-executable
// 0xfa:application useing,readable and non-writable,executable struct GATE_DESCRIPTOR {//
short offset_low, selector;
char dw_count, access_right;
short offset_high;
};
void init_gdtidt(void);
void set_segmdesc(struct SEGMENT_DESCRIPTOR *sd, unsigned int limit, int base, int ar);
void set_gatedesc(struct GATE_DESCRIPTOR *gd, int offset, int selector, int ar);
#define ADR_IDT 0x0026f800
#define LIMIT_IDT 0x000007ff
#define ADR_GDT 0x00270000
#define LIMIT_GDT 0x0000ffff
#define ADR_BOTPAK 0x00280000
#define LIMIT_BOTPAK 0x0007ffff
#define AR_DATA32_RW 0x4092
#define AR_CODE32_ER 0x409a
#define AR_INTGATE32 0x008e /* int.c */
void init_pic(void);
void inthandler21(int *esp);
void inthandler27(int *esp);
void inthandler2c(int *esp);
#define PIC0_ICW1 0x0020
#define PIC0_OCW2 0x0020
#define PIC0_IMR 0x0021
#define PIC0_ICW2 0x0021
#define PIC0_ICW3 0x0021
#define PIC0_ICW4 0x0021
#define PIC1_ICW1 0x00a0
#define PIC1_OCW2 0x00a0
#define PIC1_IMR 0x00a1
#define PIC1_ICW2 0x00a1
#define PIC1_ICW3 0x00a1
#define PIC1_ICW4 0x00a1
bootpack.h
PS: 主函数在此,做好初始化各种操作然后接收键盘和鼠标信息,并对鼠标信息进行解析,呈现在屏幕上,此外还有文字显示(字库),鼠标显示,鼠标位置计算...这里用到了GDT和IDT,对消息的接收要用中断,对消息的保存要用到FIFO缓冲区...
/* dsctbl.c GDT IDT分段及中断相关 */ #include "bootpack.h" /////////////////////////////////////////////////////////////////////////////////////
//功能:
//参数:
//附件:
void init_gdtidt(void)
{
/*在bootpack.h文件里面定义了分段结构体和中断结构体,这里实例化gdt和idt*/
struct SEGMENT_DESCRIPTOR *gdt = (struct SEGMENT_DESCRIPTOR *) ADR_GDT;//从0x00270000~0x0027ffff共8192个分段
struct GATE_DESCRIPTOR *idt = (struct GATE_DESCRIPTOR *) ADR_IDT;//从0x0026f800~0x0026ffff共256个分段
int i; /* GDT的初始化 */
for (i = ; i <= LIMIT_GDT / ; i++) {
set_segmdesc(gdt + i, , , );
}
//,上限,地址,属性
set_segmdesc(gdt + , 0xffffffff, 0x00000000, AR_DATA32_RW);//设定全局段
set_segmdesc(gdt + , LIMIT_BOTPAK, ADR_BOTPAK, AR_CODE32_ER);//设定bootpack512字节的段
/* ;1) 这个函数用来指定的段上限和地址赋值给GDTR的48位寄存器,这是个很特殊的寄存器,并不能用MOV来直接赋值
;,唯一的方法就是指定一个内存地址,从指定的内存地址读取6字节(也就是48位),然后赋值给GDTR寄存器。完成这一任务的指令就是LGDT
;2) 该寄存器的低16位(即内存的最初的2个字节)是段上限,它等于“GDT的有效的字节数-1”,剩下的32位,代表GDT的开始地址
;3) 这里2个参数是ESP+4和ESP+8里存放,而我们要的是6字节形式的,所以要转换为我们想要的形式~ */
load_gdtr(LIMIT_GDT, ADR_GDT); /* IDT的初始化 */
for (i = ; i <= LIMIT_IDT / ; i++) {
set_gatedesc(idt + i, , , );
}
load_idtr(LIMIT_IDT, ADR_IDT); /* IDT的設定 */
set_gatedesc(idt + 0x21, (int) asm_inthandler21, * , AR_INTGATE32);
set_gatedesc(idt + 0x27, (int) asm_inthandler27, * , AR_INTGATE32);
set_gatedesc(idt + 0x2c, (int) asm_inthandler2c, * , AR_INTGATE32);
/*这里asm_inthadler21注册在idt的第0x21号,这样如果发生了中断,CPU就会自动调用asm_inthandler21.
这里的2*8表示asm_inthandler21属于哪一个段,即段号2,乘以8是因为低3位有别的意思,这低3位必须为0
这里段号为2的段在初始化的地方我们设置为bootpack全局段
最后的AR_INTGATE32将IDT的属性,设定为0x008e,表示用于中断处理的有效性
*/
return;
} void set_segmdesc(struct SEGMENT_DESCRIPTOR *sd, unsigned int limit, int base, int ar)
{
if (limit > 0xfffff) {
ar |= 0x8000; /* G_bit = 1 */
limit /= 0x1000;
}
sd->limit_low = limit & 0xffff;
sd->base_low = base & 0xffff;
sd->base_mid = (base >> ) & 0xff;
sd->access_right = ar & 0xff;
sd->limit_high = ((limit >> ) & 0x0f) | ((ar >> ) & 0xf0);
sd->base_high = (base >> ) & 0xff;
return;
} void set_gatedesc(struct GATE_DESCRIPTOR *gd, int offset, int selector, int ar)
{
gd->offset_low = offset & 0xffff;
gd->selector = selector;
gd->dw_count = (ar >> ) & 0xff;
gd->access_right = ar & 0xff;
gd->offset_high = (offset >> ) & 0xffff;
return;
}
dsctbl.c
PS: GDT IDT分段及中断相关,这里的分段和调色板的分段有异曲同工之妙~
/* 操作系统函数集合 */ #include "bootpack.h" // -----------------------------------------------------------------------------------
//调色板相关
//----------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////
//功能:初始化调色板,建立静态16个颜色映射,然后调用set_palette进行设置
//参数:无
//附件:要调用set_palette函数
void init_palette(void)
{
static unsigned char table_rgb[ * ] = {
0x00, 0x00, 0x00, /* 0:黑 */
0xff, 0x00, 0x00, /* 1:亮红 */
0x00, 0xff, 0x00, /* 2:亮绿 */
0xff, 0xff, 0x00, /* 3:亮黄 */
0x00, 0x00, 0xff, /* 4:亮蓝 */
0xff, 0x00, 0xff, /* 5:亮紫 */
0x00, 0xff, 0xff, /* 6:浅亮蓝 */
0xff, 0xff, 0xff, /* 7:白 */
0xc6, 0xc6, 0xc6, /* 8:亮灰 */
0x84, 0x00, 0x00, /* 9:暗红 */
0x00, 0x84, 0x00, /* 10:暗绿 */
0x84, 0x84, 0x00, /* 11:暗黄 */
0x00, 0x00, 0x84, /* 12:暗青 */
0x84, 0x00, 0x84, /* 13:暗紫 */
0x00, 0x84, 0x84, /* 14:浅暗蓝 */
0x84, 0x84, 0x84 /* 15:暗灰 */
};
set_palette(, , table_rgb);
return;
/*C语言中static char只能用于数据,就像汇编中的DB指令 */
}
/////////////////////////////////////////////////////////////////////////////////////
//功能:初始化设置调色板
//参数:开始标号,结束标号,16*3的颜色表
//附加:关闭中断,进行设置(要知道具体设置要求),恢复中断
void set_palette(int start, int end, unsigned char *rgb)
{
int i, eflags;
eflags = io_load_eflags(); /* 记录中断许可标志 */
io_cli(); /* 将中断许可标志置0,禁止中断 */
io_out8(0x03c8, start);
for (i = start; i <= end; i++) {
io_out8(0x03c9, rgb[] / );
io_out8(0x03c9, rgb[] / );
io_out8(0x03c9, rgb[] / );
rgb += ;
}
io_store_eflags(eflags); /* 恢复原中断 */
return;
} //-----------------------------------------------------------------------------------
//调色板相关
//----------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////
//功能:填充VRAM实现画矩形操作
//参数:VRAM初址,x轴像素,颜色标号,后面4个是位置矩形
void boxfill8(unsigned char *vram, int xsize, unsigned char c, int x0, int y0, int x1, int y1)
{
int x, y;
for (y = y0; y <= y1; y++) {
for (x = x0; x <= x1; x++)
vram[y * xsize + x] = c;
}
return;
}
/////////////////////////////////////////////////////////////////////////////////////
//功能:初始化屏幕,画矩形,形成最初的窗口界面
//参数:VRAM初址,屏幕宽和长
//附加:要调用boxfill8函数
void init_screen8(char *vram, int x, int y)
{
boxfill8(vram, x, COL8_008484, , , x - , y - );
boxfill8(vram, x, COL8_C6C6C6, , y - , x - , y - );
boxfill8(vram, x, COL8_FFFFFF, , y - , x - , y - );
boxfill8(vram, x, COL8_C6C6C6, , y - , x - , y - ); boxfill8(vram, x, COL8_FFFFFF, , y - , , y - );
boxfill8(vram, x, COL8_FFFFFF, , y - , , y - );
boxfill8(vram, x, COL8_848484, , y - , , y - );
boxfill8(vram, x, COL8_848484, , y - , , y - );
boxfill8(vram, x, COL8_000000, , y - , , y - );
boxfill8(vram, x, COL8_000000, , y - , , y - ); boxfill8(vram, x, COL8_848484, x - , y - , x - , y - );
boxfill8(vram, x, COL8_848484, x - , y - , x - , y - );
boxfill8(vram, x, COL8_FFFFFF, x - , y - , x - , y - );
boxfill8(vram, x, COL8_FFFFFF, x - , y - , x - , y - );
return;
} //-----------------------------------------------------------------------------------
//字符显示相关
//----------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////
//功能:在指定位置显示一个字符
//参数:VRAM初址,窗口宽,待显示的位置,颜色,显示文字的初址(这里采用16个char表示一个字符)
void putfont8(char *vram, int xsize, int x, int y, char c, char *font)
{
int i;
char *p, d /* data */;
for (i = ; i < ; i++) {
//查询每个char的8个位,如果不为0,就
p = vram + (y + i) * xsize + x;
d = font[i];
if ((d & 0x80) != ) { p[] = c; }
if ((d & 0x40) != ) { p[] = c; }
if ((d & 0x20) != ) { p[] = c; }
if ((d & 0x10) != ) { p[] = c; }
if ((d & 0x08) != ) { p[] = c; }
if ((d & 0x04) != ) { p[] = c; }
if ((d & 0x02) != ) { p[] = c; }
if ((d & 0x01) != ) { p[] = c; }
}
return;
}
/////////////////////////////////////////////////////////////////////////////////////
//功能:在指定位置显示一个字符串
//参数:VRAM初址,窗口宽,待显示的位置,颜色,待显示文字串的初址(这里采用16个char表示一个字符)
//附加:这里采用ASCII,字符串以0x00结尾,要调用putfont8()函数,这里可以和printf()函数连用将数据格式化为字符串类型
void putfonts8_asc(char *vram, int xsize, int x, int y, char c, unsigned char *s)
{
extern char hankaku[];
for (; *s != 0x00; s++) {
putfont8(vram, xsize, x, y, c, hankaku + *s * );
x += ;
}
return;
} //-----------------------------------------------------------------------------------
//显示鼠标指针
//----------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////
//功能:准备鼠标指针(16*16)
//参数:存放鼠标颜色信息的字符指针,窗口背景颜色
//附件:先定义一个cursor鼠标效果数组,然后转换为鼠标颜色数组(即,每一点应该涂什么颜色)
void init_mouse_cursor8(char *mouse, char bc)
{
static char cursor[][] = {
"**************..",
"*OOOOOOOOOOO*...",
"*OOOOOOOOOO*....",
"*OOOOOOOOO*.....",
"*OOOOOOOO*......",
"*OOOOOOO*.......",
"*OOOOOOO*.......",
"*OOOOOOOO*......",
"*OOOO**OOO*.....",
"*OOO*..*OOO*....",
"*OO*....*OOO*...",
"*O*......*OOO*..",
"**........*OOO*.",
"*..........*OOO*",
"............*OO*",
".............***"
};//16*16的字节的内存
int x, y; for (y = ; y < ; y++) {//根据上面的鼠标数组建立一个绘制方案保存在mouse里
for (x = ; x < ; x++) {
if (cursor[y][x] == '*') {//边缘涂黑色
mouse[y * + x] = COL8_000000;
}
if (cursor[y][x] == 'O') {//内部涂白色
mouse[y * + x] = COL8_FFFFFF;
}
if (cursor[y][x] == '.') {//外部图背景色
mouse[y * + x] = bc;
}
}
}
return;
}
/////////////////////////////////////////////////////////////////////////////////////
//功能:绘制鼠标
//参数:VRAM初址,x轴像素,鼠标指针大小,位置,鼠标绘制方案,bxsize和pxsize大体相同
//附件:鼠标绘制方案即初始化函数得到的mouse,真正用的时候,先初始化,然后就可以用这个函数绘制鼠标啦
void putblock8_8(char *vram, int vxsize, int pxsize,
int pysize, int px0, int py0, char *buf, int bxsize)
{
int x, y;
for (y = ; y < pysize; y++) {
for (x = ; x < pxsize; x++) {
vram[(py0 + y) * vxsize + (px0 + x)] = buf[y * bxsize + x];
}
}
return;
}
graphic.c
PS: 设置调色板,显示字符串,绘制矩形,绘制鼠标,绘制窗口,总之和VRAM相关的函数
/* the part of interrupt */ #include "bootpack.h"
#include <stdio.h> /////////////////////////////////////////////////////////////////////////////////////
//功能:中断初始化函数
//参数:无
void init_pic(void)
/* PIC(programmable interrupt controller) initialize */
{
io_out8(PIC0_IMR, 0xff ); /* disabled all interrupts */
io_out8(PIC1_IMR, 0xff ); /* disabled all interrupts */ io_out8(PIC0_ICW1, 0x11 ); /* edge trigger mode */
io_out8(PIC0_ICW2, 0x20 ); /* IRQ0-7 are received by INT20-27 */
io_out8(PIC0_ICW3, << ); /* PIC1 is connected by IRQ2 */
io_out8(PIC0_ICW4, 0x01 ); /* unbuffered mode */ io_out8(PIC1_ICW1, 0x11 ); /* edge trigger mode */
io_out8(PIC1_ICW2, 0x28 ); /* IRQ8-15 are received by INT28-2f */
io_out8(PIC1_ICW3, ); /* PIC1 is connnected by IRQ2 */
io_out8(PIC1_ICW4, 0x01 ); /* unbuffered mode */ io_out8(PIC0_IMR, 0xfb ); /* 11111011 disable all interrupts except PIC1 */
io_out8(PIC1_IMR, 0xff ); /* 11111111 disable all interrupts */ return;
} // -----------------------------------------------------------------------------------
//鼠标和键盘中断处理函数
//鼠标是IRQ12,键盘是IRQ1,所以我们编写INT 0x2c和INT 0x21的中断处理程序(handler),即中断处理程序
//-----------------------------------------------------------------------------------
#define PORT_KEYDAT 0x0060
struct FIFO8 keyfifo; /////////////////////////////////////////////////////////////////////////////////////
//功能:PS/2的键盘中断,一会在汇编中调用这个函数实现真正的中断:_asm_inthandler21
void inthandler21(int *esp)
{
unsigned char data;
io_out8(PIC0_OCW2, 0x61); /* IRQ-01受付完了をPICに通知 */
data = io_in8(PORT_KEYDAT);
fifo8_put(&keyfifo, data);//将数据放进缓冲区
return;
} struct FIFO8 mousefifo;
/////////////////////////////////////////////////////////////////////////////////////
//功能:PS/2的鼠标中断,一会在汇编中调用这个函数实现真正的中断:_asm_inthandler2c
void inthandler2c(int *esp)
{
unsigned char data;
io_out8(PIC1_OCW2, 0x64); /* IRQ-12受付完了をPIC1に通知 */
io_out8(PIC0_OCW2, 0x62); /* IRQ-02受付完了をPIC0に通知 */
data = io_in8(PORT_KEYDAT);
fifo8_put(&mousefifo, data); //将数据放进缓冲区
return;
} void inthandler27(int *esp)
{
io_out8(PIC0_OCW2, 0x67); /* IRQ-07受付完了をPICに通知 */
return;
}
int.c
PS: 中断句柄函数,但是这些并不是中断真正入口,真正入口是对应汇编函数,这些函数只是对应汇编函数要调用的~这些函数包括鼠标中断和键盘中断,因为为了加速,所以要把收到的数据放进FIFO缓冲区,防止因为在中断中进行大量的处理而影响速度~
/* FIFO用来存放鼠标和键盘信息的链表
其实就是用数组实现的循环链表,这里原著处理的不好,
建议用数据结构里的知识来处理 */ #include "bootpack.h" #define FLAGS_OVERRUN 0x0001 /////////////////////////////////////////////////////////////////////////////////////
//功能:缓冲区初始化
//参数:缓冲区结构体指针,大小,缓冲区开始位置
void fifo8_init(struct FIFO8 *fifo, int size, unsigned char *buf)
{
fifo->size = size;
fifo->buf = buf;
fifo->free = size;
fifo->flags = ;
fifo->p = ;
fifo->q = ;
return;
}
//往缓冲区内插入一个数据
int fifo8_put(struct FIFO8 *fifo, unsigned char data)
{
if (fifo->free == ) {//溢出
fifo->flags |= FLAGS_OVERRUN;
return -;
}
fifo->buf[fifo->p] = data;
fifo->p++;
if (fifo->p == fifo->size) {//当插入位置到达最后时再返回第一个位置
fifo->p = ;
}
fifo->free--;
return ;
}
//从缓冲区取出一个数据
int fifo8_get(struct FIFO8 *fifo)
{
int data;
if (fifo->free == fifo->size) {//没有数据
return -;
}
data = fifo->buf[fifo->q];
fifo->q++;
if (fifo->q == fifo->size) {//如果取出数据的位置到达最后了就从第一个位置开始
fifo->q = ;
}
fifo->free++;
return data;
}
//获取缓冲区状态,数据量
int fifo8_status(struct FIFO8 *fifo)
{
return fifo->size - fifo->free;
}
fifo.c
PS: 就是个简单的用数组的形式建立的FIFO循环链表,建议看一下那个经典的黑色的数据结构的书,上面讲的很好,甚至有自动增加大小的循环链表,这个数据结构主要用来存放鼠标和键盘的信息~
OSASK偺敿妏僼僅儞僩傪棳梡 char 0x00
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0x01
........
........
..***...
.*...*..
*.....*.
*.*.*.*.
*.*.*.*.
*.....*.
*.....*.
*.*.*.*.
*..*..*.
.*...*..
..***...
........
........
........ char 0x02
........
........
..***...
.*****..
*******.
**.*.**.
**.*.**.
*******.
*******.
**.*.**.
***.***.
.*****..
..***...
........
........
........ char 0x03
........
........
........
........
.**.**..
*******.
*******.
*******.
.*****..
..***...
...*....
........
........
........
........
........ char 0x04
........
........
........
........
...*....
..***...
.*****..
*******.
.*****..
..***...
...*....
........
........
........
........
........ char 0x05
........
........
........
........
...*....
..***...
.*.*.*..
*******.
.*.*.*..
...*....
..***...
........
........
........
........
........ char 0x06
........
........
........
........
...*....
..***...
.*****..
*******.
**.*.**.
...*....
..***...
........
........
........
........
........ char 0x07
........
........
........
........
........
........
...**...
..****..
..****..
...**...
........
........
........
........
........
........ char 0x08
********
********
********
********
********
********
***..***
**....**
**....**
***..***
********
********
********
********
********
******** char 0x09
........
........
........
........
........
..****..
.**..**.
.*....*.
.*....*.
.**..**.
..****..
........
........
........
........
........ char 0x0a
********
********
********
********
********
**....**
*..**..*
*.****.*
*.****.*
*..**..*
**....**
********
********
********
********
******** char 0x0b
........
...*....
..***...
.*.*.*..
*..*..*.
...*....
...*....
..***...
.*...*..
*.....*.
*.....*.
*.....*.
.*...*..
..***...
........
........ char 0x0c
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
.*...*..
..***...
...*....
...*....
*******.
...*....
...*....
...*....
........
........ char 0x0d
........
........
....**..
....***.
....*.**
....*.**
....*.*.
....*...
....*...
...**...
.****...
*****...
.***....
........
........
........ char 0x0e
........
........
...*****
...*****
...*...*
...*...*
...*...*
...*...*
...*...*
...*...*
.***.***
********
.**..**.
........
........
........ char 0x0f
........
........
........
........
...*....
.*.*.*..
..***...
..*.*...
..***...
.*.*.*..
...*....
........
........
........
........
........ char 0x10
........
*.......
**......
***.....
****....
*****...
******..
*******.
******..
*****...
****....
***.....
**......
*.......
........
........ char 0x11
........
......*.
.....**.
....***.
...****.
..*****.
.******.
*******.
.******.
..*****.
...****.
....***.
.....**.
......*.
........
........ char 0x12
........
........
...*....
..***...
.*.*.*..
*..*..*.
...*....
...*....
...*....
*..*..*.
.*.*.*..
..***...
...*....
........
........
........ char 0x13
........
........
.*...*..
.*...*..
.*...*..
.*...*..
.*...*..
.*...*..
.*...*..
.*...*..
........
........
.*...*..
.*...*..
........
........ char 0x14
........
..*****.
.*..*.*.
*...*.*.
*...*.*.
*...*.*.
*...*.*.
.*..*.*.
..***.*.
....*.*.
....*.*.
....*.*.
....*.*.
....*.*.
........
........ char 0x15
.*****..
*.....*.
.*......
..*.....
..***...
.*...*..
*.....*.
*.....*.
*.....*.
.*...*..
..***...
....*...
.....*..
*.....*.
.*****..
........ char 0x16
........
........
........
........
........
........
........
........
........
........
........
*******.
*******.
*******.
........
........ char 0x17
........
........
...*....
..***...
.*.*.*..
*..*..*.
...*....
...*....
...*....
*..*..*.
.*.*.*..
..***...
...*....
.*****..
........
........ char 0x18
........
...*....
..***...
.*.*.*..
*..*..*.
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
........
........ char 0x19
........
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
*..*..*.
.*.*.*..
..***...
...*....
........
........ char 0x1a
........
........
........
........
...*....
....*...
.....*..
*******.
.....*..
....*...
...*....
........
........
........
........
........ char 0x1b
........
........
........
........
...*....
..*.....
.*......
*******.
.*......
..*.....
...*....
........
........
........
........
........ char 0x1c
........
........
........
........
........
........
........
........
........
........
........
*.......
*.......
*******.
........
........ char 0x1d
........
........
........
........
........
..*.*...
.*...*..
*******.
.*...*..
..*.*...
........
........
........
........
........
........ char 0x1e
........
........
........
........
...*....
...*....
..***...
..***...
.*****..
.*****..
*******.
*******.
........
........
........
........ char 0x1f
........
........
........
........
*******.
*******.
.*****..
.*****..
..***...
..***...
...*....
...*....
........
........
........
........ char 0x20
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0x21
........
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
........
........
...*....
...*....
........
........ char 0x22
..*.*...
..*.*...
..*.*...
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0x23
........
.*...*..
.*...*..
.*...*..
*******.
.*...*..
.*...*..
.*...*..
.*...*..
.*...*..
*******.
.*...*..
.*...*..
.*...*..
........
........ char 0x24
...*....
..***.*.
.*.*.**.
*..*..*.
*..*..*.
*..*....
.*.*....
..***...
...*.*..
...*..*.
*..*..*.
*..*..*.
**.*.*..
*.***...
...*....
...*.... char 0x25
.**...*.
*..*..*.
*..*.*..
*..*.*..
.**.*...
....*...
...*....
...*....
..*.....
..*.**..
.*.*..*.
.*.*..*.
*..*..*.
*...**..
........
........ char 0x26
........
.***....
*...*...
*...*...
*...*...
*..*....
.**.....
.*...***
*.*...*.
*..*..*.
*...*.*.
*....*..
.*...**.
..***..*
........
........ char 0x27
.....*..
....*...
...*....
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0x28
......*.
.....*..
....*...
....*...
...*....
...*....
...*....
...*....
...*....
...*....
...*....
....*...
....*...
.....*..
......*.
........ char 0x29
*.......
.*......
..*.....
..*.....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
..*.....
..*.....
.*......
*.......
........ char 0x2a
........
........
........
........
........
...*....
*..*..*.
.*.*.*..
..***...
.*.*.*..
*..*..*.
...*....
........
........
........
........ char 0x2b
........
........
........
........
........
...*....
...*....
...*....
*******.
...*....
...*....
...*....
........
........
........
........ char 0x2c
........
........
........
........
........
........
........
........
........
........
........
...**...
...**...
....*...
....*...
...*.... char 0x2d
........
........
........
........
........
........
........
........
*******.
........
........
........
........
........
........
........ char 0x2e
........
........
........
........
........
........
........
........
........
........
........
........
...**...
...**...
........
........ char 0x2f
......*.
......*.
.....*..
.....*..
....*...
....*...
....*...
...*....
...*....
..*.....
..*.....
.*......
.*......
.*......
*.......
*....... char 0x30
........
...**...
..*..*..
..*..*..
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
..*..*..
..*..*..
...**...
........
........ char 0x31
........
....*...
...**...
..*.*...
....*...
....*...
....*...
....*...
....*...
....*...
....*...
....*...
....*...
..*****.
........
........ char 0x32
........
...**...
..*..*..
.*....*.
.*....*.
......*.
.....*..
....*...
...*....
..*.....
..*.....
.*......
.*......
.******.
........
........ char 0x33
........
...**...
..*..*..
.*....*.
......*.
......*.
.....*..
...**...
.....*..
......*.
......*.
.*....*.
..*..*..
...**...
........
........ char 0x34
........
....**..
....**..
....**..
...*.*..
...*.*..
...*.*..
..*..*..
..*..*..
.*...*..
.******.
.....*..
.....*..
...****.
........
........ char 0x35
........
.*****..
.*......
.*......
.*......
.*.**...
.**..*..
......*.
......*.
......*.
......*.
.*....*.
..*..*..
...**...
........
........ char 0x36
........
...**...
..*..*..
.*....*.
.*......
.*.**...
.**..*..
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
..*..*..
...**...
........
........ char 0x37
........
.******.
.*....*.
.*....*.
.....*..
.....*..
....*...
....*...
....*...
...*....
...*....
...*....
...*....
..***...
........
........ char 0x38
........
...**...
..*..*..
.*....*.
.*....*.
.*....*.
..*..*..
...**...
..*..*..
.*....*.
.*....*.
.*....*.
..*..*..
...**...
........
........ char 0x39
........
...**...
..*..*..
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
..*..**.
...**.*.
......*.
.*....*.
..*..*..
...**...
........
........ char 0x3a
........
........
........
........
........
...**...
...**...
........
........
........
........
........
...**...
...**...
........
........ char 0x3b
........
........
........
........
........
...**...
...**...
........
........
........
........
...**...
...**...
....*...
....*...
...*.... char 0x3c
........
......*.
.....*..
....*...
...*....
..*.....
.*......
*.......
*.......
.*......
..*.....
...*....
....*...
.....*..
......*.
........ char 0x3d
........
........
........
........
........
........
*******.
........
........
*******.
........
........
........
........
........
........ char 0x3e
........
*.......
.*......
..*.....
...*....
....*...
.....*..
......*.
......*.
.....*..
....*...
...*....
..*.....
.*......
*.......
........ char 0x3f
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
.....*..
....*...
...*....
...*....
........
........
...**...
...**...
........
........ char 0x40
........
..***...
.*...*..
*.....*.
*..**.*.
*.*.*.*.
*.*.*.*.
*.*.*.*.
*.*.*.*.
*.*.*.*.
*..***..
*.......
.*...**.
..***...
........
........ char 0x41
........
...**...
...**...
...**...
...**...
..*..*..
..*..*..
..*..*..
..*..*..
.******.
.*....*.
.*....*.
.*....*.
***..***
........
........ char 0x42
........
****....
.*..*...
.*...*..
.*...*..
.*...*..
.*..*...
.****...
.*...*..
.*....*.
.*....*.
.*....*.
.*...*..
*****...
........
........ char 0x43
........
..***.*.
.*...**.
.*....*.
*.....*.
*.......
*.......
*.......
*.......
*.......
*.....*.
.*....*.
.*...*..
..***...
........
........ char 0x44
........
*****...
.*...*..
.*...*..
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*...*..
.*...*..
*****...
........
........ char 0x45
........
*******.
.*....*.
.*....*.
.*......
.*......
.*...*..
.*****..
.*...*..
.*......
.*......
.*....*.
.*....*.
*******.
........
........ char 0x46
........
*******.
.*....*.
.*....*.
.*......
.*......
.*...*..
.*****..
.*...*..
.*...*..
.*......
.*......
.*......
****....
........
........ char 0x47
........
..***.*.
.*...**.
.*....*.
*.....*.
*.......
*.......
*..****.
*.....*.
*.....*.
*.....*.
.*....*.
.*...**.
..***...
........
........ char 0x48
........
***..***
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.******.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
***..***
........
........ char 0x49
........
.*****..
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
.*****..
........
........ char 0x4a
........
...*****
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
*....*..
.*..*...
..**....
........ char 0x4b
........
***..***
.*....*.
.*...*..
.*..*...
.*.*....
.*.*....
.**.....
.*.*....
.*.*....
.*..*...
.*...*..
.*....*.
***..***
........
........ char 0x4c
........
****....
.*......
.*......
.*......
.*......
.*......
.*......
.*......
.*......
.*......
.*....*.
.*....*.
*******.
........
........ char 0x4d
........
**....**
.*....*.
.**..**.
.**..**.
.**..**.
.*.**.*.
.*.**.*.
.*.**.*.
.*....*.
.*....*.
.*....*.
.*....*.
***..***
........
........ char 0x4e
........
**...***
.*....*.
.**...*.
.**...*.
.*.*..*.
.*.*..*.
.*.*..*.
.*..*.*.
.*..*.*.
.*..*.*.
.*...**.
.*...**.
***...*.
........
........ char 0x4f
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*...*..
..***...
........
........ char 0x50
........
*****...
.*...*..
.*....*.
.*....*.
.*....*.
.*...*..
.****...
.*......
.*......
.*......
.*......
.*......
****....
........
........ char 0x51
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*..*..*.
*...*.*.
.*...*..
..***.*.
........
........ char 0x52
........
******..
.*....*.
.*....*.
.*....*.
.*....*.
.*****..
.*...*..
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
***..***
........
........ char 0x53
........
..***.*.
.*...**.
*.....*.
*.....*.
*.......
.*......
..***...
.....*..
......*.
*.....*.
*.....*.
**...*..
*.***...
........
........ char 0x54
........
*******.
*..*..*.
*..*..*.
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
.*****..
........
........ char 0x55
........
***..***
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
..*..*..
..****..
........
........ char 0x56
........
***..***
.*....*.
.*....*.
.*....*.
.*....*.
..*..*..
..*..*..
..*..*..
..*..*..
...**...
...**...
...**...
...**...
........
........ char 0x57
........
***..***
.*....*.
.*....*.
.*....*.
.*.**.*.
.*.**.*.
.*.**.*.
.*.**.*.
..*..*..
..*..*..
..*..*..
..*..*..
..*..*..
........
........ char 0x58
........
***..***
.*....*.
.*....*.
..*..*..
..*..*..
..*..*..
...**...
..*..*..
..*..*..
..*..*..
.*....*.
.*....*.
***..***
........
........ char 0x59
........
***.***.
.*...*..
.*...*..
.*...*..
..*.*...
..*.*...
..*.*...
...*....
...*....
...*....
...*....
...*....
.*****..
........
........ char 0x5a
........
*******.
*....*..
*....*..
....*...
....*...
...*....
...*....
..*.....
..*.....
.*......
.*....*.
*.....*.
*******.
........
........ char 0x5b
........
..*****.
..*.....
..*.....
..*.....
..*.....
..*.....
..*.....
..*.....
..*.....
..*.....
..*.....
..*.....
..*.....
..*****.
........ char 0x5c
*.......
*.......
.*......
.*......
..*.....
..*.....
..*.....
...*....
...*....
....*...
....*...
.....*..
.....*..
.....*..
......*.
......*. char 0x5d
........
.*****..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.*****..
........ char 0x5e
........
...*....
..*.*...
.*...*..
*.....*.
........
........
........
........
........
........
........
........
........
........
........ char 0x5f
........
........
........
........
........
........
........
........
........
........
........
........
........
........
*******.
........ char 0x60
...*....
....*...
.....*..
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0x61
........
........
........
........
........
.***....
....*...
.....*..
..****..
.*...*..
*....*..
*....*..
*...**..
.***.**.
........
........ char 0x62
**......
.*......
.*......
.*......
.*......
.*.**...
.**..*..
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.**..*..
.*.**...
........
........ char 0x63
........
........
........
........
........
..**....
.*..**..
*....*..
*....*..
*.......
*.......
*.....*.
.*...*..
..***...
........
........ char 0x64
....**..
.....*..
.....*..
.....*..
.....*..
..**.*..
.*..**..
*....*..
*....*..
*....*..
*....*..
*....*..
.*..**..
..**.**.
........
........ char 0x65
........
........
........
........
........
..***...
.*...*..
*.....*.
*.....*.
******..
*.......
*.....*.
.*....*.
..****..
........
........ char 0x66
....***.
...*....
...*....
...*....
...*....
.*****..
...*....
...*....
...*....
...*....
...*....
...*....
...*....
.*****..
........
........ char 0x67
........
........
........
........
........
..**.**.
.*..**..
*....*..
*....*..
*....*..
*....*..
.*..**..
..**.*..
.....*..
.....*..
.****... char 0x68
**......
.*......
.*......
.*......
.*......
.*.**...
.**..*..
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
***...**
........
........ char 0x69
........
...*....
...*....
........
........
..**....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
..***...
........
........ char 0x6a
........
.....*..
.....*..
........
........
....**..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
.....*..
....*...
....*...
..**.... char 0x6b
**......
.*......
.*......
.*......
.*......
.*..***.
.*...*..
.*..*...
.*.*....
.**.....
.*.*....
.*..*...
.*...*..
***..**.
........
........ char 0x6c
..**....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
..***...
........
........ char 0x6d
........
........
........
........
........
****.**.
.*..*..*
.*..*..*
.*..*..*
.*..*..*
.*..*..*
.*..*..*
.*..*..*
**.**.**
........
........ char 0x6e
........
........
........
........
........
**.**...
.**..*..
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
***...**
........
........ char 0x6f
........
........
........
........
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*...*..
..***...
........
........ char 0x70
........
........
........
........
........
**.**...
.**..*..
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.**..*..
.*.**...
.*......
***..... char 0x71
........
........
........
........
........
..**.*..
.*..**..
*....*..
*....*..
*....*..
*....*..
*....*..
.*..**..
..**.*..
.....*..
....***. char 0x72
........
........
........
........
........
**.***..
.**...*.
.*....*.
.*......
.*......
.*......
.*......
.*......
***.....
........
........ char 0x73
........
........
........
........
........
.****.*.
*....**.
*.....*.
**......
..***...
.....**.
*.....*.
**....*.
*.****..
........
........ char 0x74
........
........
...*....
...*....
...*....
.*****..
...*....
...*....
...*....
...*....
...*....
...*....
...*....
....***.
........
........ char 0x75
........
........
........
........
........
**...**.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*....*.
.*...**.
..***.**
........
........ char 0x76
........
........
........
........
........
***..***
.*....*.
.*....*.
.*....*.
..*..*..
..*..*..
..*..*..
...**...
...**...
........
........ char 0x77
........
........
........
........
........
***..***
.*....*.
.*....*.
.*.**.*.
.*.**.*.
.*.**.*.
..*..*..
..*..*..
..*..*..
........
........ char 0x78
........
........
........
........
........
**...**.
.*...*..
..*.*...
..*.*...
...*....
..*.*...
..*.*...
.*...*..
**...**.
........
........ char 0x79
........
........
........
........
........
***..***
.*....*.
.*....*.
..*..*..
..*..*..
..*..*..
...**...
...**...
...*....
...*....
.**..... char 0x7a
........
........
........
........
........
*******.
*.....*.
*....*..
....*...
...*....
..*.....
.*....*.
*.....*.
*******.
........
........ char 0x7b
........
.....**.
....*...
...*....
...*....
...*....
...*....
.**.....
...*....
...*....
...*....
...*....
....*...
.....**.
........
........ char 0x7c
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*.... char 0x7d
........
.**.....
...*....
....*...
....*...
....*...
....*...
.....**.
....*...
....*...
....*...
....*...
...*....
.**.....
........
........ char 0x7e
........
.***..*.
*...**..
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0x7f
........
........
........
........
...*....
..*.*...
.*...*..
*.....*.
*******.
*.....*.
*******.
........
........
........
........
........ char 0x80
........
..***...
.*...*..
*.....*.
*.......
*.......
*.......
*.......
*.......
*.......
*.......
*.....*.
.*...*..
..***...
...*....
..*..... char 0x81
........
........
..*..*..
..*..*..
........
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*....*.
..*****.
........
........ char 0x82
....**..
....*...
...*....
........
........
..***...
.*...*..
*.....*.
*.....*.
*******.
*.......
*.....*.
.*...*..
..***...
........
........ char 0x83
........
...*....
..*.*...
.*...*..
........
.****...
.....*..
.....*..
..****..
.*...*..
*....*..
*....*..
.*...*..
..*****.
........
........ char 0x84
........
........
..*..*..
..*..*..
........
.****...
.....*..
.....*..
..****..
.*...*..
*....*..
*....*..
.*...*..
..*****.
........
........ char 0x85
...*....
....*...
.....*..
........
........
.****...
.....*..
.....*..
..****..
.*...*..
*....*..
*....*..
.*...*..
..*****.
........
........ char 0x86
........
...**...
..*..*..
...**...
........
.****...
.....*..
.....*..
..****..
.*...*..
*....*..
*....*..
.*...*..
..*****.
........
........ char 0x87
........
........
........
........
........
..****..
.*....*.
*.......
*.......
*.......
*.......
*.......
.*....*.
..****..
....*...
...*.... char 0x88
........
...*....
..*.*...
.*...*..
........
..***...
.*...*..
*.....*.
*.....*.
*******.
*.......
*.....*.
.*...*..
..***...
........
........ char 0x89
........
........
..*..*..
..*..*..
........
..***...
.*...*..
*.....*.
*.....*.
*******.
*.......
*.....*.
.*...*..
..***...
........
........ char 0x8a
...*....
....*...
.....*..
........
........
..***...
.*...*..
*.....*.
*.....*.
*******.
*.......
*.....*.
.*...*..
..***...
........
........ char 0x8b
........
........
..*..*..
..*..*..
........
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
........
........ char 0x8c
........
...*....
..*.*...
.*...*..
........
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
........
........ char 0x8d
...*....
....*...
.....*..
........
........
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
........
........ char 0x8e
..*..*..
..*..*..
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
*.....*.
*******.
*.....*.
*.....*.
*.....*.
*.....*.
........
........ char 0x8f
........
..***...
.*...*..
..***...
.*...*..
*.....*.
*.....*.
*.....*.
*.....*.
*******.
*.....*.
*.....*.
*.....*.
*.....*.
........
........ char 0x90
....**..
....*...
...*....
*******.
*.......
*.......
*.......
*.......
*****...
*.......
*.......
*.......
*.......
*******.
........
........ char 0x91
........
........
........
........
........
.**.....
...***..
...*..*.
.***..*.
*..****.
*..*....
*..*....
*..*..*.
.**.**..
........
........ char 0x92
....**..
...*....
..*.....
..*.*...
..*.*...
..*.*...
*******.
..*.*...
..*.*...
..*.*...
..*.*...
..*.*...
..*.*...
..*.*...
........
........ char 0x93
........
...*....
..*.*...
.*...*..
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*...*..
..***...
........
........ char 0x94
........
........
..*..*..
..*..*..
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*...*..
..***...
........
........ char 0x95
...*....
....*...
.....*..
........
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*...*..
..***...
........
........ char 0x96
........
...*....
..*.*...
.*...*..
........
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*....*.
..*****.
........
........ char 0x97
...*....
....*...
.....*..
........
........
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*....*.
..*****.
........
........ char 0x98
........
........
..*..*..
..*..*..
........
*.....*.
*.....*.
.*...*..
.*...*..
..*.*...
..*.*...
...*....
...*....
..*.....
..*.....
.*...... char 0x99
..*..*..
..*..*..
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*...*..
..***...
........
........ char 0x9a
..*..*..
..*..*..
........
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*...*..
..***...
........
........ char 0x9b
........
..*.*...
..*.*...
..*.*...
..****..
.**.*.*.
*.*.*...
*.*.*...
*.*.*...
*.*.*...
*.*.*...
.**.*.*.
..****..
..*.*...
..*.*...
..*.*... char 0x9c
........
....**..
...*..*.
..*.....
..*.....
..*.....
******..
..*.....
..*.....
..*.....
.**.....
*.*.....
*.**..*.
.*..**..
........
........ char 0x9d
........
*.....*.
*.....*.
.*...*..
..*.*...
...*....
*******.
...*....
...*....
*******.
...*....
...*....
...*....
...*....
........
........ char 0x9e
........
***.....
*..*....
*...*...
*...*...
*...*...
*..*.*..
***..*..
*..*****
*....*..
*....*..
*....*..
*....*..
*....*..
........
........ char 0x9f
........
....**..
...*..*.
...*....
...*....
...*....
*******.
...*....
...*....
...*....
...*....
...*....
*..*....
.**.....
........
........ char 0xa0
....**..
....*...
...*....
........
........
.****...
.....*..
.....*..
..****..
.*...*..
*....*..
*....*..
.*...*..
..*****.
........
........ char 0xa1
....**..
....*...
...*....
........
........
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
........
........ char 0xa2
....**..
....*...
...*....
........
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*...*..
..***...
........
........ char 0xa3
....**..
....*...
...*....
........
........
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*....*.
..*****.
........
........ char 0xa4
........
...*..*.
..*.*.*.
..*..*..
........
*****...
*....*..
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
........
........ char 0xa5
...*..*.
..*.*.*.
..*..*..
........
*.....*.
**....*.
**....*.
*.*...*.
*..*..*.
*..*..*.
*...*.*.
*....**.
*....**.
*.....*.
........
........ char 0xa6
........
........
........
.****...
.....*..
.....*..
..****..
.*...*..
*....*..
*....*..
.*...*..
..*****.
........
*******.
........
........ char 0xa7
........
........
........
..***...
.*...*..
*.....*.
*.....*.
*.....*.
*.....*.
*.....*.
.*...*..
..***...
........
*******.
........
........ char 0xa8
........
...*....
...*....
........
........
...*....
...*....
..*.....
.*...*..
*.....*.
*.....*.
*.....*.
.*...*..
..***...
........
........ char 0xa9
........
........
........
........
........
........
........
........
........
........
*******.
*.......
*.......
*.......
........
........ char 0xaa
........
........
........
........
........
........
........
........
........
........
*******.
......*.
......*.
......*.
........
........ char 0xab
........
...*....
..**....
...*....
...*....
...*....
........
*******.
........
.****...
.....*..
..***...
.*......
.*****..
........
........ char 0xac
........
...*....
..**....
...*....
...*....
...*....
........
*******.
........
...**...
..*.*...
.*..*...
.*****..
....*...
........
........ char 0xad
........
...*....
...*....
........
........
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
........
........ char 0xae
........
........
........
........
...*..*.
..*..*..
.*..*...
*..*....
*..*....
.*..*...
..*..*..
...*..*.
........
........
........
........ char 0xaf
........
........
........
........
*..*....
.*..*...
..*..*..
...*..*.
...*..*.
..*..*..
.*..*...
*..*....
........
........
........
........ char 0xb0
...*...*
.*...*..
...*...*
.*...*..
...*...*
.*...*..
...*...*
.*...*..
...*...*
.*...*..
...*...*
.*...*..
...*...*
.*...*..
...*...*
.*...*.. char 0xb1
.*.*.*.*
*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*
*.*.*.*.
.*.*.*.*
*.*.*.*. char 0xb2
.***.***
**.***.*
.***.***
**.***.*
.***.***
**.***.*
.***.***
**.***.*
.***.***
**.***.*
.***.***
**.***.*
.***.***
**.***.*
.***.***
**.***.* char 0xb3
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*.... char 0xb4
...*....
...*....
...*....
...*....
...*....
...*....
...*....
****....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*.... char 0xb5
...*....
...*....
...*....
...*....
...*....
...*....
...*....
****....
...*....
****....
...*....
...*....
...*....
...*....
...*....
...*.... char 0xb6
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
****.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xb7
........
........
........
........
........
........
........
******..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xb8
........
........
........
........
........
........
........
****....
...*....
****....
...*....
...*....
...*....
...*....
...*....
...*.... char 0xb9
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
****.*..
.....*..
****.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xba
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xbb
........
........
........
........
........
........
........
******..
.....*..
****.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xbc
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
****.*..
.....*..
******..
........
........
........
........
........
........ char 0xbd
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
******..
........
........
........
........
........
........
........
........ char 0xbe
...*....
...*....
...*....
...*....
...*....
...*....
...*....
****....
...*....
****....
........
........
........
........
........
........ char 0xbf
........
........
........
........
........
........
........
****....
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*.... char 0xc0
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*****
........
........
........
........
........
........
........
........ char 0xc1
...*....
...*....
...*....
...*....
...*....
...*....
...*....
********
........
........
........
........
........
........
........
........ char 0xc2
........
........
........
........
........
........
........
********
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*.... char 0xc3
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*****
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*.... char 0xc4
........
........
........
........
........
........
........
********
........
........
........
........
........
........
........
........ char 0xc5
...*....
...*....
...*....
...*....
...*....
...*....
...*....
********
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*.... char 0xc6
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*****
...*....
...*****
...*....
...*....
...*....
...*....
...*....
...*.... char 0xc7
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.***
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xc8
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.***
...*....
...*****
........
........
........
........
........
........ char 0xc9
........
........
........
........
........
........
........
...*****
...*....
...*.***
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xca
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
****.***
........
********
........
........
........
........
........
........ char 0xcb
........
........
........
........
........
........
........
********
........
****.***
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xcc
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.***
...*....
...*.***
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xcd
........
........
........
........
........
........
........
********
........
********
........
........
........
........
........
........ char 0xce
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
****.***
........
****.***
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xcf
...*....
...*....
...*....
...*....
...*....
...*....
...*....
********
........
********
........
........
........
........
........
........ char 0xd0
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
********
........
........
........
........
........
........
........
........ char 0xd1
........
........
........
........
........
........
........
********
........
********
...*....
...*....
...*....
...*....
...*....
...*.... char 0xd2
........
........
........
........
........
........
........
********
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xd3
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*****
........
........
........
........
........
........
........
........ char 0xd4
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*****
...*....
...*****
........
........
........
........
........
........ char 0xd5
........
........
........
........
........
........
........
...*****
...*....
...*****
...*....
...*....
...*....
...*....
...*....
...*.... char 0xd6
........
........
........
........
........
........
........
...*****
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xd7
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
****.***
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*..
...*.*.. char 0xd8
...*....
...*....
...*....
...*....
...*....
...*....
...*....
********
...*....
********
...*....
...*....
...*....
...*....
...*....
...*.... char 0xd9
...*....
...*....
...*....
...*....
...*....
...*....
...*....
****....
........
........
........
........
........
........
........
........ char 0xda
........
........
........
........
........
........
........
...*****
...*....
...*....
...*....
...*....
...*....
...*....
...*....
...*.... char 0xdb
********
********
********
********
********
********
********
********
********
********
********
********
********
********
********
******** char 0xdc
........
........
........
........
........
........
........
........
********
********
********
********
********
********
********
******** char 0xdd
****....
****....
****....
****....
****....
****....
****....
****....
****....
****....
****....
****....
****....
****....
****....
****.... char 0xde
....****
....****
....****
....****
....****
....****
....****
....****
....****
....****
....****
....****
....****
....****
....****
....**** char 0xdf
********
********
********
********
********
********
********
********
........
........
........
........
........
........
........
........ char 0xe0
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xe1
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xe2
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xe3
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xe4
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xe5
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xe6
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xe7
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xe8
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xe9
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xea
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xeb
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xec
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xed
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xee
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xef
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xf0
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xf1
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xf2
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xf3
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xf4
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xf5
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xf6
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xf7
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xf8
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xf9
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xfa
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xfb
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xfc
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xfd
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xfe
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........ char 0xff
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
........
hankaku.txt
PS: 这就是个字库,对于硬件级工程,字库是必须的!为什么我们编辑器里选择字形时英文这么多,汉字这么少,是因为设计中文字库的人少,一方面劳动量大,另一方面没钱赚,所以我们有着丰富的书法文化却只有几个可怜的字形可以选择!
; naskfunc
; TAB=4 [FORMAT "WCOFF"] ; 制成目标文件的形式
[INSTRSET "i486p"] ; 使用486格式命令
[BITS ] ; 制作32模式用的机器语言
[FILE "naskfunc.nas"] ; 源文件名信息
; 程序中包含的函数名
GLOBAL _io_hlt, _io_cli, _io_sti, _io_stihlt
GLOBAL _io_in8, _io_in16, _io_in32
GLOBAL _io_out8, _io_out16, _io_out32
GLOBAL _io_load_eflags, _io_store_eflags
GLOBAL _load_gdtr, _load_idtr
GLOBAL _asm_inthandler21, _asm_inthandler27, _asm_inthandler2c
EXTERN _inthandler21, _inthandler27, _inthandler2c [SECTION .text] ; 目标文件中写了这些后再写程序 _io_hlt: ; void io_hlt(void);
HLT
RET _io_cli: ; void io_cli(void);
CLI
RET _io_sti: ; void io_sti(void);
STI
RET _io_stihlt: ; void io_stihlt(void);
STI
HLT
RET _io_in8: ; int io_in8(int port);
MOV EDX,[ESP+] ; port
MOV EAX,
IN AL,DX
RET _io_in16: ; int io_in16(int port);
MOV EDX,[ESP+] ; port
MOV EAX,
IN AX,DX
RET _io_in32: ; int io_in32(int port);
MOV EDX,[ESP+] ; port
IN EAX,DX
RET _io_out8: ; void io_out8(int port, int data);
MOV EDX,[ESP+] ; port
MOV AL,[ESP+] ; data
OUT DX,AL
RET _io_out16: ; void io_out16(int port, int data);
MOV EDX,[ESP+] ; port
MOV EAX,[ESP+] ; data
OUT DX,AX
RET _io_out32: ; void io_out32(int port, int data);
MOV EDX,[ESP+] ; port
MOV EAX,[ESP+] ; data
OUT DX,EAX
RET _io_load_eflags: ; int io_load_eflags(void);
PUSHFD ; PUSH EFLAGS という意味
POP EAX
RET _io_store_eflags: ; void io_store_eflags(int eflags);
MOV EAX,[ESP+]
PUSH EAX
POPFD ; POP EFLAGS という意味
RET _load_gdtr: ; void load_gdtr(int limit, int addr);
MOV AX,[ESP+] ; limit
MOV [ESP+],AX
LGDT [ESP+]
RET ;1) 这个函数用来指定的段上限和地址赋值给GDTR的48位寄存器,这是个很特殊的寄存器,并不能用MOV来直接赋值
;,唯一的方法就是指定一个内存地址,从指定的内存地址读取6字节(也就是48位),然后赋值给GDTR寄存器。完成这一任务的指令就是LGDT
;2) 该寄存器的低16位(即内存的最初的2个字节)是段上限,它等于“GDT的有效的字节数-1”,剩下的32位,代表GDT的开始地址
;3) 这里2个参数是ESP+4和ESP+8里存放,而我们要的是6字节形式的,所以要转换为我们想要的形式~
_load_idtr: ; void load_idtr(int limit, int addr);
MOV AX,[ESP+] ; limit
MOV [ESP+],AX
LIDT [ESP+]
RET ;这个函数只是将寄存器的值保存在栈里,然后将DS和ES调整到与SS相等,再调用_inthandler21,返回后将所有寄存器的值再返回到原来的值,然后执行IRETD
;之所以如此小心翼翼地保护寄存器,原因在于,中断处理发生在函数处理途中,通过IREDT从中断处理后,寄存器就乱了
_asm_inthandler21:
PUSH ES
PUSH DS
PUSHAD
MOV EAX,ESP
PUSH EAX
MOV AX,SS
MOV DS,AX
MOV ES,AX
CALL _inthandler21
POP EAX
POPAD
POP DS
POP ES
IRETD _asm_inthandler27:
PUSH ES
PUSH DS
PUSHAD
MOV EAX,ESP
PUSH EAX
MOV AX,SS
MOV DS,AX
MOV ES,AX
CALL _inthandler27
POP EAX
POPAD
POP DS
POP ES
IRETD _asm_inthandler2c:
PUSH ES
PUSH DS
PUSHAD
MOV EAX,ESP
PUSH EAX
MOV AX,SS
MOV DS,AX
MOV ES,AX
CALL _inthandler2c
POP EAX
POPAD
POP DS
POP ES
IRETD
naskfunc.nas
PS: 一些不能用c语言来完成的函数还得用汇编,于是就都放在这个文件里了~
3、效果说明:
>_<" 这里已经实现了文字显示,鼠标显示,键盘和鼠标信息的读取,其中涉及的知识有:GDT,IDT,中断,FIFO,VRAM,字库等,最终效果如下:
PS: 最上面显示鼠标当前位置,第二行左边显示按键信息,右边lcr显示鼠标点击事件(如果左边被点击l就变大写L,其他相同道理),后面两个数据是鼠标此次移动距离~
PS: 该系统的内存分布图:在文件asmhead.nas有详细注释
146 ;----------------------------------------------------------------------------------------------------
147 ;内存分配:
148 ; 0x00000000-0x000fffff:虽然在启动中会多次使用,但之后就会变空(1M)
149 ; 0x00100000-0x00267fff:用于保存软盘的内容(1440KB)
150 ; 0x00268000-0x0026f7ff:空(30KB)
151 ; 0x0026f800-0x0026ffff:IDT(2KB)
152 ; 0x00270000-0x0027ffff:GDT(64KB)
153 ; 0x00280000-0x002fffff:bootpack.hrb(512KB)
154 ; 0x00300000-0x003fffff:栈及其他(1MB)
155 ; 0x00400000- :空
156 ;----------------------------------------------------------------------------------------------------
LZ:http://www.cnblogs.com/zjutlitao/
[自制简单操作系统] 2、鼠标及键盘中断处理事件[PIC\GDT\IDT\FIFO]的更多相关文章
- [自制简单操作系统] 7、多任务(二)——任务管理自动化&任务休眠
前言 >_<" 这里仿照窗口管理的方式将任务管理也修改成相应的管理模式,这样可以灵活的添加多个任务,而不必每次都要修改任务切换函数:此外还在任务休眠做了尝试,通过将任务挂起和唤醒 ...
- [自制简单操作系统] 1、从0-1到汇编再到c语言的奥秘
目录: 1.用0-1编写最简单的操作系统 2.用汇编改写上面0-1程序 2.1 只用DB的汇编改写版 2.2 加入RESB汇编的改写版 2.3 进一步使用汇编替换0-1文件 2.4 核心程序也用 ...
- 操作系统开发系列—12.g.在内核中设置键盘中断
8259A虽然已经设置完成,但是我们还没有真正开始使用它呢. 所有的中断都会触发一个函数spurious_irq(),这个函数的定义如下: PUBLIC void spurious_irq(int i ...
- MFC--响应鼠标和键盘操作
一个程序最重要的部分之一是对鼠标和键盘操作的响应. 一. 理解鼠标事件.之前对鼠标事件的认识仅仅局限于处理控件的单击与双击事件.但实际鼠标的操作包含很多.这里将以一个画图的小程序讲解对鼠标的响应. ...
- [python] PyMouse、PyKeyboard用python操作鼠标和键盘
1.PyUserInput 简介 PyUserInput是一个使用python的跨平台的操作鼠标和键盘的模块,非常方便使用.支持的平台及依赖如下: Linux - Xlib Mac - Quart ...
- 50-用Python监听鼠标和键盘事件
转自:https://www.cnblogs.com/qiernonstop/p/3654021.html 用Python监听鼠标和键盘事件 PyHook是一个基于Python的“钩子”库,主要用于监 ...
- 用Python监听鼠标和键盘事件
PyHook是一个基于Python的“钩子”库,主要用于监听当前电脑上鼠标和键盘的事件.这个库依赖于另一个Python库PyWin32,如同名字所显示的,PyWin32只能运行在Windows平台,所 ...
- C# WPF 中用代码模拟鼠标和键盘的操作
原文:C# WPF 中用代码模拟鼠标和键盘的操作 原文地址 C#开发者都知道,在Winform开发中,SendKeys类提供的方法是很实用的.但是可惜的是,在WPF中不能使用这个方法了. 我们知道,在 ...
- Qt之股票组件-股票检索--支持预览框、鼠标、键盘操作
目录 一.感慨一下 二.效果展示 三.搜索编辑框 1.编辑框 2.预览框 四.相关文章 原文链接:Qt之股票组件-股票检索--支持预览框.鼠标.键盘操作 一.感慨一下 之前做过一款炒股软件,个人觉着是 ...
随机推荐
- docker中安装ssh服务
系统:Debian Docker 目标:在docker(debian系统)中安装ssh服务,实现远程登陆和控制docker 步骤: 初始状态:通过docker pull debian得到的一个debi ...
- VBS使用Scripting.Dictionary字典对象
Scripting.Dictionary是个很有用的组件,其创建了类似于Key索引对应Value值的字典对象,并且在其内部提供了快速索引访问的机制,可以让我们通过Key直接索引到指定的Value,比遍 ...
- mysql 不允许连接
错误提示: ERROR 1130: Host '192.168.1.1' is not allowed to connect to this MySQL server的解决方法: 1.改表法.可能是你 ...
- Redis 的Lua Script脚本功能
从 Redis 2.6.0 版本开始,通过内置的 Lua 解释器,可以使用 EVAL 命令对 Lua 脚本进行求值 Redis2.6内置的Lua Script支持,可以在Redis的Server端一次 ...
- const实现
[const实现]
- 搭建本地MAVEN NEXUS 服务
下载 http://120.192.76.70/cache/www.sonatype.org/downloads/nexus-latest-bundle.zip?ich_args=232fba36ed ...
- c#:未将对象引用设置到对象的实例--可能出现的问题总结(转)
1.c#:未将对象引用设置到对象的实例--可能出现的问题总结(转):http://www.cnblogs.com/KeenLeung/archive/2013/06/23/3150578.html
- 前端---HTML
HTML基础 本章内容: 简介 HTML定义 标签定义和属性 HTML5基本结构 HTML5字符集 <head>标签 <title> <base/> <lin ...
- R--相关分布函数、统计函数的使用
分布函数家族: *func()r : 随机分布函数d : 概率密度函数p : 累积分布函数q : 分位数函数 func()表示具体的名称如下表: 例子 #r : 随机分布函数 #d : 概率密度函数 ...
- C++主要数据类型在计算机中所占字节大小
遇到了数据存储的大端和小端问题,这你妹的看的一头雾水,发现我基本知识严重匮乏啊,先了解C++各数据类型在自己机子上占多少字节吧,以及这些数据类型所占字节大小与神马有关.各种查资料然后写代码检验,小结于 ...