practical final sect. 2

practical final sect. 2 - ADD AL,20H;CORRECTS CODE BY...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
.MODEL SMALL .STACK 64 .DATA CODE DB '-!44$' ;ASCII CODE + 20 = MATT BUFFER DB 80 DUP(?),'$' .CODE BEGIN PROC FAR MOV AX,@DATA MOV DS,AX MOV ES,AX LEA SI,CODE ;STORES CODE ADDRESS INTO SI LEA DI,BUFFER ;STORES BUFFER ADDRESS INTO DI CLD ;SETS DF=0 INCREMENTS EACH TIME MOV CX,4 ;COUNTS 4 TIMES FOR LOOP AGAIN:LODSB ;STORES WHAT IS IN ADDRESSED BY SI ;TO AL AND SI IS INCREMENTED SO EACH ;TIME IT WILL GET NEXT ELEMENT
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ADD AL,20H ;CORRECTS CODE BY ADDING 20 TO FIRST ELEMENT STOSB ;STORES AL INTO POSITION ADDRESSED BY DI AND LOOP AGAIN ;DI IS INCREMENTED SO EACH TIME IT WILL PLACE ;IT IN THE NEXT ELEMENT SPOT MOV AH,9H ;DISPLAYS BUFFER STRING TO SCREEN LEA DX,BUFFER ;WHICH IS CORRECT CODE 'MATT' INT 21H MOV AH,4CH INT 21H BEGIN ENDP...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online