recherche binaire en langage d'assemblage

Je suis un novice dans la programmation en langage assembleur

J'ai cherché binaire programme de recherche et trouvé cela et j'ai essayé de comprendre le programme,sa fonctionne bien mais je ne pourrais pas comprendre le succès de la partie du code:

qu'est-ce que AJOUTER al,'0' et qu'est-ce que mov res,al??

.model small
.stack 100h
.data
    ARR DW 1000H,2000H,3000H,4000H,5000H,6000H
    LEN DW ($-ARR)/2
    KEY EQU 2000H
    SUC DB "KEY IS FOUND AT$"
    FAILURE DB "KEY IS NOT FOUND$"
    RES DB "POSITION",13,10,"$"
.CODE
    START:
        MOV AX,@data
        MOV DS,AX
        MOV BX,00           ;LOW
        MOV DX,LEN          ;HIGH
        MOV CX,KEY          ;KEY
    AGAIN:
        CMP BX,DX
        JA FAIL
        MOV AX,BX
        ADD AX,DX
        SHR AX,1
        MOV SI,AX
        ADD SI,SI
        CMP CX,ARR[SI]
        JAE BIG             
        DEC AX          
        MOV DX,AX
        JMP AGAIN
    BIG:
        JE SUCCESS      
        INC AX          
        MOV BX,AX
    JMP AGAIN
    SUCCESS:
        ADD AL,01
        ADD AL,'0'
        MOV RES,AL
        LEA DX SUC
        JMP DISP
    FAIL:
        LEA DX,FAILURE
    DISP:
        MOV AH,09H
        INT 21H
        MOV AH,4CH
        INT 21H
    END START
  • Quelle est la question? Ce add al, '0' n', ou quelle fonction cette instruction sert dans le cadre de ce programme?
  • pourquoi il est utilisé dans ce programme?Et ce sera mov res,al faire?Il va concaténer ou ajouter en face?
InformationsquelleAutor Jay Patel | 2013-10-23