Problem – Write an assembly language program to add two 8 bit numbers stored at address 2050 and address 2051 in 8085 microprocessor The starting address of
Write Assembly Language Program to divide two numbers (8 bit and 16 bit) 5 Write Assembly Language Program to find out sum of five 16 bit numbers 6 Write
QUIZ: Write an assembly program to subtract 20 10 from 42 10 and put the result in memory 11 BR main sum: WORD 0x0000 num1: BLOCK 2 num2: BLOCK 2
Know how to formulate assembly language instructions, using valid syntax ADD Add two values SUB Subtract one value from another
3 oct 2018 · Problem – Write an assembly language program to add two 8 bit numbers stored at address 2050 and address 2051 in 8085 microprocessor
RESULT: Thus the program to add two 8-bit numbers was executed Aim: Write an assembly language program in 8085 microprocessor to generate Fibonacci
In the case of add, this implies only two operands can be added at a time To calculate additions of more than 2 numbers, we would need multiple instructions
Write an assembly language program to add and subtract the two 16-bit numbers using the program logic given in 1 3 (Use immediate and direct addressing
ldx #array ; initialize pointer ldy #0 ; initialize sum to 0 loop: ldab 0,x ; get number brclr 0,x,$01,skip ; skip if even aby ; odd - add to sum
Apply the Software Development Method? 1- Problem Calculate the sum of two numbers 2- Analysis Problem Input num1, num2 Problem
20379_38086_assembly_language_programming.pdf
1. Write Assembly Language Program to add two numbers (8 bit and 16 bit).
2. Write Assembly Language Program to subtract two numbers (8 bit and 16 bit).
3. Write Assembly Language Program to multiply two numbers (8 bit and 16 bit).
4. Write Assembly Language Program to divide two numbers (8 bit and 16 bit).
5. Write Assembly Language Program to find out sum of five 16 bit numbers.
6. Write Assembly Language Program to add two BCD numbers.
7. Write Assembly Language Program to subtract two BCD numbers.
8. Write Assembly Language Program to multiply two BCD numbers.
9. Write Assembly Language Program to find out smallest number from five numbers.
10. Write Assembly Language Program to find out largest number from five numbers.
11. Write Assembly Language Program to arrange numbers of given array in ascending order.
12. Write Assembly Language Program to arrange numbers of given array in descending order.
13. Write Assembly Language Program to perform block transfer of data
14. Write Assembly Language Program to find out the length of string.
15. Write Assembly Language Program to compare the two strings.
16. Write Assembly Language Program to display string in reverse order.
17. Write Assembly Language Program to convert Decimal to Hexadecimal number.
(Note: program number 1 to 13 and 18 refer from manual.) Program to Find out Length of String. .model small .stack .data m1 db 10,13,"enter first string:$" m2 db 10,13,"enter second string:$" m3 db 10,13,"equal$" m4 db 10,13,"not equal$" b1 db 10 dup(?) b2 db 10 dup(?) .code accept macro mov ah,01h int 21h endm put macro mov ah,02h int 21h endm disp macro xx mov ah,09h lea dx,xx int 21h endm .startup disp m1 mov cl,00h mov ch,00h lea si,b1 up:accept .if al==0Dh jmp last .else mov [si],al inc si inc cl jmp up .endif last: disp m2 lea di,b2 up1:accept .if al==0Dh jmp last1 .else mov [di],al inc di inc ch jmp up1 .endif last1: cmp cl,ch jne uneq mov ch,00h up2: lea si,b1 lea di,b2 mov al,[si] cmp al,[di] jnz uneq loop up2 disp m3 .exit uneq:disp m4 .exit End
Program to find out reverse of String
.model small .stack .data m1 db 10,13,"enter first string:$" m2 db 10,13,"reverse string::$" b1 db 10 dup(?) b2 db 10 dup(?) .code accept macro mov ah,01h int 21h endm put macro mov ah,02h int 21h endm disp macro xx mov ah,09h lea dx,xx int 21h endm .startup disp m1 mov bl,00h lea si,b1 up:accept .if al==0Dh jmp last .else mov [si],al inc si inc bl jmp up .endif last: mov cl,bl dec si lea di,b2 up1: mov al,[si] mov [di],al inc di dec si loop up1 disp m2 mov cl,bl lea di,b2 up2: mov dl,[di] put inc di loop up2 .exit end
Program to find out length of string
.model small .stack .data m1 db 10,13,"enter first string:$" m2 db 10,13,"length of string::$" b1 db 10 dup(?) b2 db 10 dup(?) .code accept macro mov ah,01h int 21h endm put macro mov ah,02h int 21h endm disp macro xx mov ah,09h lea dx,xx int 21h endm .startup disp m1 mov bl,00h lea si,b1 up:accept .if al==0Dh jmp last .else mov [si],al inc si inc bl jmp up .endif last: disp m2 .if bl>=00h && bl<=09h add bl,30h .else add bl,37h .endif mov dl,bl put .exit end