鱼C论坛

 找回密码
 立即注册
查看: 2848|回复: 3

int指令跳错地方了

[复制链接]
发表于 2017-2-9 19:29:50 | 显示全部楼层 |阅读模式

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

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

x
int指令跳错地方了
int 7c
怎么跳到了0:0?
C1]`{X7HREX(WAV2Q)47MMH.png
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2017-2-9 19:33:27 | 显示全部楼层
给代码:
1.asm
  1. assume cs:code
  2. code segment
  3. start:
  4. mov ax,cs
  5. mov ds,ax
  6. mov si,offset example
  7. mov ax,0
  8. mov es,ax
  9. mov di,200h
  10. mov cx,offset s-offset example
  11. cld
  12. rep movsb
  13. mov ax,0
  14. mov ds,ax
  15. mov ds:[7ch],200h
  16. mov ds:[7ch+2],ax
  17. mov ax,4c00h
  18. int 21h

  19. example:
  20. ;jmp short s2
  21. ;s1:
  22. ;db 'welcome to http://ljw.pe.hu!',0
  23. ;s2:
  24. ;mov ax,cs
  25. ;mov ds,ax
  26. ;mov si,offset s1-offset example

  27. ;mov ax,0b800h
  28. ;mov es,ax
  29. ;mov di,0
  30. ;
  31. ;mov ax,10
  32. ;dec ax
  33. ;mov bx,160
  34. ;mul bx
  35. ;mov bx,20
  36. ;dec bx
  37. ;add bx,ax
  38. ;mov cx,2
  39. ;s3:
  40. ;mov ah,2
  41. ;mov al,ds:[si]
  42. ;mov cx,ax
  43. ;mov ch,0
  44. ;jcxz s4
  45. ;mov es:[bx+di],ax
  46. ;inc si
  47. ;add di,2
  48. ;mov cx,2
  49. ;loop s3
  50. ;s4:

  51. mov ax,1234h
  52. add ax,ax
  53. iret
  54. s:
  55. nop
  56. code ends
  57. end start
复制代码


2.asm
  1. assume cs:code
  2. code segment
  3. start:
  4. int 7ch
  5. mov ax,4c00h
  6. int 21h
  7. code ends
  8. end start
复制代码


小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2017-2-9 20:33:12 | 显示全部楼层
  1. assume cs:code
  2. code segment
  3. start:
  4. mov ax,cs
  5. mov ds,ax
  6. mov si,offset example
  7. mov ax,0
  8. mov es,ax
  9. mov di,200h
  10. mov cx,offset s-offset example
  11. cld
  12. rep movsb
  13. mov ax,0
  14. mov ds,ax

  15. cli
  16. mov word ptr ds:[7ch * 4], 200h
  17. mov ds:[7ch * 4 + 2], ax
  18. sti

  19. mov ax,4c00h
  20. int 21h

  21. example:
  22. ;jmp short s2
  23. ;s1:
  24. ;db 'welcome to http://ljw.pe.hu!',0
  25. ;s2:
  26. ;mov ax,cs
  27. ;mov ds,ax
  28. ;mov si,offset s1-offset example

  29. ;mov ax,0b800h
  30. ;mov es,ax
  31. ;mov di,0
  32. ;
  33. ;mov ax,10
  34. ;dec ax
  35. ;mov bx,160
  36. ;mul bx
  37. ;mov bx,20
  38. ;dec bx
  39. ;add bx,ax
  40. ;mov cx,2
  41. ;s3:
  42. ;mov ah,2
  43. ;mov al,ds:[si]
  44. ;mov cx,ax
  45. ;mov ch,0
  46. ;jcxz s4
  47. ;mov es:[bx+di],ax
  48. ;inc si
  49. ;add di,2
  50. ;mov cx,2
  51. ;loop s3
  52. ;s4:

  53. mov ax,1234h
  54. add ax,ax
  55. iret
  56. s:
  57. nop
  58. code ends
  59. end start
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2017-2-11 21:16:36 | 显示全部楼层

知道了,是中断地址那里没有乘4,不过还是谢谢了
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-7-6 15:55

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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