鱼C论坛

 找回密码
 立即注册
查看: 3379|回复: 0

[技术交流] 汇编实验15

[复制链接]
发表于 2021-3-13 09:15:30 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. assume cs:code
  2. code segment
  3. start:
  4. mov ax,cs
  5. mov ds,ax
  6. mov ax,0
  7. mov es,ax

  8. mov si,offset int9
  9. mov di,204

  10. mov cx,offset int9end-offset int9

  11. cld
  12. rep movsb;写进0:204

  13. push es:[9*4]
  14. pop es:[200]
  15. push es:[9*4+2]
  16. pop es:[202]

  17. cli

  18. mov word ptr es:[9*4],204
  19. mov word ptr es:[9*4+2],0

  20. sti

  21. mov ax,4c00h
  22. int 21h


  23. int9:
  24. push ax
  25. push bx
  26. push cx
  27. push es

  28. in al,60h
  29. pushf
  30. call dword ptr cs:[200]

  31. cmp al,1eh+80h;判断是否是a的断码
  32. jne int9ret
  33. mov ax,0b800h
  34. mov es,ax
  35. mov cx,4000
  36. mov bx,0

  37. s:
  38. mov byte ptr es:[bx],'A'     
  39. inc byte ptr es:[bx+1]
  40. add bx,2
  41. loop s

  42. int9ret:
  43. pop es
  44. pop cx
  45. pop bx
  46. pop ax
  47. iret

  48. int9end: nop

  49. code ends
  50. end start
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-4-28 07:02

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表