阅读:3377回复:9
cmoscode
data segment
_title db \'CMOS Reader ver 1.00\',0dh,0ah, \'Author Jacky fu\',0dh,0ah, \'Base CMOS Buffer\',0dh,0ah, \' 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F\',0dh,0ah, \' -----------------------------------------------\',0dh,0ah,\'$\' counter db 00h _high db \'High CMOS Buffer\',0dh,0ah,\'$\' data ends code segment assume cs:code,ds:data start: mov ax,data mov ds,ax xor ax,ax lea dx,_title mov ah,09h int 21h mov cx,00h loop2: mov dl,cl call printdl mov dl,\':\' mov ah,02h int 21h call fun2 inc cx cmp cl,10h jl loop2 lea dx,_high mov ah,09h int 21h mov cx,00h mov counter,00h loop3: mov dl,cl call printdl mov dl,\':\' mov ah,02h int 21h call fun3 inc cx cmp cl,10h jl loop3 mov ah,4ch int 21h fun4 proc near push dx push ax mov dx,72h mov al,counter out dx,al mov dx,73h in al,dx mov dl,al call printdl add counter,1 pop dx pop ax ret fun4 endp fun3 proc near push cx push dx push ax mov cl,00h loop4: call fun4 inc cl cmp cl,10h jl loop4 mov dl,0dh mov ah,02h int 21h mov dl,0ah int 21h pop ax pop dx pop cx ret fun3 endp fun2 proc near push cx push dx push ax mov cl,00h loop1: call fun1 inc cl cmp cl,10h jl loop1 mov dl,0dh mov ah,02h int 21h mov dl,0ah int 21h pop ax pop dx pop cx ret fun2 endp fun1 proc near push dx push ax mov dx,70h mov al,counter out dx,al mov dx,71h in al,dx mov dl,al call printdl add counter,1 pop dx pop ax ret fun1 endp ;input dl such as xxh,out put as xxh printdl proc near push ax push cx mov al,dl mov cl,04h sar dl,cl and dl,0fh call printdlhalf mov dl,al and dl,0fh call printdlhalf mov dl,\' \' mov ah,02h int 21h pop cx pop ax ret printdl endp printdlhalf proc near push ax cmp dl,09h ja largerthan9 add dl,30h jmp print largerthan9: add dl,37h print: mov ah,02h int 21h pop ax ret printdlhalf endp code ends end start |
|
最新喜欢:hackyc...
|
沙发#
发布于:2002-03-05 09:11
你写这段代码做什么?这并不是内核心态的驱动啊?
|
|
|
板凳#
发布于:2002-03-15 23:26
这是16位的代码!不能运行在NT/2000下吧?并且是取CMOS的数据的吧!
|
|
地板#
发布于:2002-03-15 23:28
你的这些代码如果作为一个初学16位汇编的人是挺好的例子!
|
|
地下室#
发布于:2002-03-18 20:29
对初学者应该是有点难的,明天我贴一个对pci设备读取的程序
windows版本的 |
|
|
5楼#
发布于:2002-05-13 09:00
9494
|
|
|
6楼#
发布于:2004-11-29 09:28
楼主可否把读取CMOS数据的原理说说吗?
比如说起CMOS地址信息放在内存的F000:0000开始的地方, 。。。。。。。 我想写个C语言版,多谢了 |
|
|
7楼#
发布于:2005-02-05 13:58
程序中是否可以加一些注释呢?
|
|
8楼#
发布于:2005-02-12 14:25
good
|
|
|
9楼#
发布于:2005-03-15 20:10
4 :)
|
|
|