Page 1 of 1

## 2 Replies - 387 Views - Last Post: 23 September 2017 - 12:07 AM

### #1 sunshine33

Reputation: 0
• Posts: 28
• Joined: 15-September 17

Posted 22 September 2017 - 11:35 PM

```.model small
.data
opr1 dw 1234h
opr2 dw 0002h
result dw 01 dup(?),'\$'
.code
mov ax,@data
mov ds,ax
mov ax,opr1
mov bx,opr2
clc
mov di,offset result
mov [di], ax

mov ah,09h
mov dx,offset result
int 21h

mov ah,4ch
int 21h
end
```

In this code opr1 , opr2 are the name of the variables .

But what are these ? 1234h , 0002h . Is it numbers in HEX .

Is This A Good Question/Topic? 0

## Replies To: Few questions about adding two numbers in assembly language .

### #2 modi123_1

• Suitor #2

Reputation: 13776
• Posts: 54,971
• Joined: 12-June 08

## Re: Few questions about adding two numbers in assembly language .

Posted 22 September 2017 - 11:48 PM

What does dw mean?

Perhaps DW is Define Word? What does h mean after some numbers? Maybe hex? So put that together..

### #3 sunshine33

Reputation: 0
• Posts: 28
• Joined: 15-September 17

## Re: Few questions about adding two numbers in assembly language .

Posted 23 September 2017 - 12:07 AM

The data stored in a memory byte are called its contents

DB - byte(s)
DW - word(s)
DD - doubleword(s)
DT - tenbyte(s)

100 - decimal
100b - binary
'100' - ASCII
"100" - ASCII

So , this means

opr1 dw 1234h

opr2 dw 0002h

The content 1234h , 0002h are stored in a variable name called opr1 , opr2 .?