.model small .stack 100h .data msgIntro DB "4-a uzd: Programa pakeicia ivestos eilutes raidziu skyriu ir eilutes ilgi.$" msgIvesk DB 0Dh, 0Ah, "Iveskite:$" msgIsvesk DB 0Dh, 0Ah, "Pakeista eilute:$" msgIlgis DB 0Dh, 0Ah, "Eilutes ilgis:$" msgError DB 0Dh, 0Ah, "Klaida!$" BUFMAX DB 255 BUFSIZE DB 0 BUF DB 255 DUP(?) .code START: mov ax, @data mov ds, ax mov es, ax mov dx, offset msgIntro call WRITE mov dx, offset msgIvesk call WRITE mov dx, offset BUFMAX mov ah, 0Ah int 21h mov dx, offset msgIsvesk call WRITE ;nuskaitom eilutes ilgi cld mov si, offset BUFSIZE lodsb mov cl, al xor ch, ch ;xz mov di, si ;ciklas CHECK: lodsb cmp al, 'A' jb DoNothing cmp al, 'Z' jbe Keisk_i_Mazaja cmp al, 'a' jb DoNothing cmp al, 'z' jbe Keisk_i_Didziaja cmp al, 'z' ja DoNothing Keisk_i_Didziaja: sub al, 20h jmp DoNothing Keisk_i_Mazaja: add al, 20h jmp DoNothing DoNothing: stosb loop CHECK ; mov al, "$" stosb mov dx, offset BUF mov ah, 9 int 21h ;xor al, al ;mov dx, offset BUFSIZE ;mov ah, 9 ;int 21h ;mov dx, offset msgIlgis ;mov ah, 9 ;int 21h mov ax, 4C00h int 21h WRITE PROC push ax mov ah, 9h int 21h pop ax ret WRITE ENDP END START