KorDen
Гость
|
|
« Ответ #2 : 23-05-2004 10:09 » |
|
.286 code segment assume cs:code, ds:code org 100h res proc call start alt_q equ 1000h OldInt9 dd 0 mes db '<alt>+q exit' meslen equ $-mes boarders db 0,0,179,180,191,192,193,194,195,196,197,217,218 NewInt9: cli pushf call cs:OldInt9 pusha mov ax, cs mov ds, ax mov ax, 40h mov es, ax mov bx, es:1ah mov ax, es:[bx] cmp ax, alt_q je cont cmp ah, 2 jb home cmp ah, 12 ja home test byte ptr es:17h, 40h jz home push bx lea bx, boarders xchg ah,al xlat pop bx mov byte ptr es:[bx], al home: popa sti iret cont: mov ax, ds mov es, ax mov ah, 13h mov al, 1 mov bx, 0020h mov cx, meslen mov dh, 16 mov dl, 22 mov bp, offset mes int 10h mov ax, 0 mov es, ax mov ax, word ptr OldInt9 mov word ptr es:24h, ax mov ax, word ptr OldInt9+2 mov word ptr es:26h, ax jmp home res endp endprog equ $-res start proc mov ah, 35h mov al, 09h int 21h mov word ptr OldInt9, bx mov word ptr OldInt9+2, es mov ah, 25h mov al, 09h mov dx, offset NewInt9 int 21h mov ax, 3100h mov dx, (endprog+10Fh)/16 int 21h start endp code ends end start
может еще логические ошибочки подскажите?
|