Upload
bhaskar
View
217
Download
0
Embed Size (px)
Citation preview
7/21/2019 BL.ASM_1
http://slidepdf.com/reader/full/blasm1 1/1
DATA SEGMENTX DB 01H,02H,03H,04H,05HY DB 11H,12H,13H,14H,15HDATA ENDSCODE SEGMENTASSUME CS:CODE,DS:DATASTART:MOV AX,DATAMOV DS,AXMOV CX,05H ; Load the counterLEA SI,X ; SI pointed to the source location xLEA DI,Y ; DI pointed to the destination location yUP: MOV BL,[SI] ; Move the SI content to BL registerMOV AL,[DI] ; Move the DI content to AL registerMOV [SI],AL ; Move AL register content to content of SIMOV [DI],BL ; Move BL register content to content of DIINC SI ; Update SI and DIINC DIDEC CX ; Decrement the counter till it becomes zeroJNZ UPMOV AH,4CHINT 21HCODE ENDSEND START