8086 masm-Programm für Palindrom prüfen

.code
> 
>     start:
>     mov ax,03h
>     int 10h
>     mov ax,seg msg1
>     mov ds,ax
>     mov dx,offset msg1
>     mov ah,09h
>     int 21h
>     mov si,offset str
>     read:
>     mov ah,01h
>     int 21h
>     cmp al,0dh
>     je next
>     mov [si],al
>     inc si
>     inc count
>     jmp read
>     next:
>     mov di,offset str
>     mov al,count
>     mov cl,al
>     mov ch,00h
>     dec si
>     check:
>     mov al,[si]
>     cmp al,[di]
>     jne nt
>     dec si
>     inc di
>     loop check
>     mov ax,seg msg2
>     mov ah,09h
>     int 21h
>     jmp exit
>     nt:
>     mov ax,seg msg3
>     mov ds,ax
>     mov dx,offset msg3
>     mov ah,09h
>     int 21h
>     exit:
>     mov ax,4c00h
>     int 21h
>     END start

Dies ist Teil des 8086 masm-code für die überprüfung, ob ein string ein Palindrom ist oder nicht.msg1 ist "Enter Text", msg2 ist 'string Palindrom',msg3 ist 'string ist nicht palinrome'
Was bedeutet "cmp al,0dh' führt in diesem code?

InformationsquelleAutor Sonu | 2014-01-11
Schreibe einen Kommentar