Chinaunix首页 | 论坛 | 博客
  • 博客访问: 459290
  • 博文数量: 62
  • 博客积分: 1742
  • 博客等级: 中尉
  • 技术积分: 859
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-06 00:13
个人简介

这是一句很长很长而且又很啰嗦并且很无聊的废话...

文章分类

全部博文(62)

文章存档

2013年(1)

2012年(13)

2011年(48)

分类: LINUX

2011-05-01 20:16:13

  1. assume cs:codesg
  2. stacksg segment
  3. db 128 dup(0)
  4. stacksg ends
  5. codesg segment
  6. int9:push ax
  7. push es
  8. mov ax,0
  9. mov es,ax
  10. in al,60h;获取键盘扫码
  11. pushf
  12. ;这里不用再置0 TF和IF位,因为系统调用我们的9号中断时已经做了...
  13. call dword ptr es:[200h];调用原来的int9
  14. cmp al,9eh;只有断码的A才刷屏
  15. jne int9r
  16. mov bx,0b800h
  17. mov es,bx
  18. mov bx,0
  19. int9s:mov byte ptr es:[bx],'A'
  20. add bx,2
  21. cmp bx,2000
  22. je int9r
  23. jmp int9s
  24. int9r:pop es
  25. pop ax
  26. iret
  27. int9e:nop
  28. start:mov ax,stacksg
  29. mov ss,ax
  30. mov sp,1ch
  31. push cs
  32. pop ds
  33. mov ax,0
  34. mov es,ax
  35. mov si,offset int9
  36. mov di,204h
  37. mov cx,offset int9e-offset int9
  38. cld
  39. rep movsb
  40. mov ax,0
  41. mov es,ax
  42. mov ax,es:[9*4]
  43. mov es:[200h],ax
  44. mov ax,es:[9*4+2]
  45. mov es:[202h],ax
  46. cli;屏蔽中断
  47. mov word ptr es:[9*4],204h
  48. mov word ptr es:[9*4+2],0h
  49. sti;恢复中断
  50. mov ax,4c00h
  51. int 21h
  52. codesg ends
  53. end start
阅读(1089) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~