Показать сообщение отдельно

  #8  
Старый 25.01.2008, 12:35
netzzz
Познающий
Регистрация: 11.08.2005
Сообщений: 38
С нами: 10919483

Репутация: 4
По умолчанию

Цитата:
.Model small
.stack 100h
include macr.inc
.data
f db "Введи слово",0ah,0dh,"$"
fn db "Не полиномы",0ah,0dh,"$"
fp db "Полиномы",0ah,0dh,"$"
rett db 0ah,0dh,"$"
s db " $"
p db 0
len dw 0
.code
jmp start

ASSUME ds:@data,es:@data
start:
init_dses

out_str f
in_str s
mov len,ax

mov di, offset s
mov si,di
add si,len
sub si,3
mov cx,len
sub cx,3
go: mov al,[si]
cmp [di],al
jne nepolinom
inc di
dec si
loop go

out_str fp
jmp exit
nepolinom:
out_str fn

exit:

int 27h
end start
macr.inc
Цитата:
init_ds macro
mov ax,@data
mov ds,ax
xor ax,ax
endm

init_dses macro
mov ax,@data
mov ds,ax
mov es,ax
xor ax,ax
endm



out_str macro st
push ax
mov ah,09h
mov dx,offset st
int 21h
pop ax
endm

clr macro rg
xor rg,rg
endm

in_str macro st
mov ah, 3fh
mov bx,0h
lea dx,st
mov cx,99
int 21h
endm

find_c macro len, st

; mov al,'&char'
cld
mov di,offset st
mov cx,len
repne scas st
endm

in_char macro char
push ax
mov ah,1h
int 21h
mov char,al
pop ax
endm

out_char macro char
push ax
mov ah,2h
int 21h
pop ax
endm
 
Ответить с цитированием