[跪求解答]关于对中断向量表写入的问题
assume cs:codesg,ss:stacksgstacksg segment db 128 dup(0)stacksg endscodesg segment;代码域start: mov ax , stacksg mov ss ,ax mov sp , 0080H mov ax , 0H mov ds , ax mov si , 24H;如果(0000:0200)!=0,防止第二次执行程序的时候把0000:0024H的地址写入0000:0200 mov ax , ds:[0024H] cmp ax ,0204h je useprogram mov ax , 0000H mov es , ax mov di , 0200H ;int 9的地址保存到0000:0200中 mov cx , 4h cld REP MOVSBuseprogram:;安装程序 MOV AX , 0h MOV DS , AX;======================================================================================== mov DS:[0024H] ,0204H ;到这里老是出现错误,说这里是无效的cpu指令 mov DS:[0024H+2h] ,0000H;======================================================================================== mov ax , cs mov ds , ax mov si , offset int9install mov ax , 0000h mov es , ax mov di , 0204H mov cx , offset endint9install - offset int9install cld rep movsb mov cx , 0010Hs0: call delay loop s0 mov ax , 4c00h int 21h;cpu空转delay: push ax push dx mov dx , 1000h mov ax , 0s1: sub ax , 1 sbb dx , 0 cmp ax , 0 jne s1 cmp dx , 0 jne s1 pop dx pop ax ret;需要安装的程序int9install: push ax push bx push cx push es in al ,60H pushf call dword ptr ds:[0200H] ;调用真实的int9程序 cmp AL , 9EH jne endint9 mov ax , 0b800H mov es , ax mov di , 0000H mov cx , 0100Hs2: mov es:[di] , 'A' inc di mov es:[di] , 11000101B inc di loop s2endint9: pop es pop cx pop bx pop ax iretendint9install: nopcodesg endsend start