code segment set ds registermov ax


CODE SEGMENT

; Set DS register

MOV AX, DATA     ;    boiler plate code to set the DS register so that the

MOV DS, AX          ;    program can access the data segment.

 

; read first digit from keyboard

                MOV AH, 08

INT   21H

MOV BL, AL

SUB BL, '0'

MUL BL, 10H

; read second digit from keyboard

MOV   AH, 08H

INT    21H

MOV   DL, AL

SUB   DL, '0'

; DL = 9 AND BL = 30 

SUM     BL, DL

; Now BL store 39

CODE ENDS.

Note: Boilerplate code is the code which is present less or more in the similar form in each assembly language program.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: code segment set ds registermov ax
Reference No:- TGS0327940

Expected delivery within 24 Hours