×
Aiming for the stars? Great, but did you have to build a rocket first.
--Your friends at LectureNotes
Close

Advanced Microprocessor

by Upesh PatelUpesh Patel
Type: PracticalInstitute: RTM Nagpur University Course: B.Tech Specialization: Electrical and Electronics EngineeringViews: 0Uploaded: 2 months ago

Share it with your friends

Suggested Materials

Leave your Comments

Contributors

Upesh Patel
Upesh Patel
--------------------------------------------------- 2s Compliment of number---------------------------------.model small .stack 64 .data .code start : MOV AX,@DATA MOV DS,AX MOV AL,04H NOT AL;1's complement MOV SI,3000H ;position where 1's complement will be stored MOV [SI],AL ADD AL,01H ;2's complement MOV SI,2000H ;position to store 2's complement MOV [SI],AL END start .end --------------------------------------------------AVERAGE OF NUMBERS-----------------------------------------.model small .stack 64 .data a db 02h,02h,02h,02h,02h,02h,02h,02h,02h,02h .code start: mov ax,@data mov ds,ax mov cl,10 lea si,a mov ax,0000h again: add al,[si] inc si dec cl jnz again mov cl,0ah div cl mov ah,4ch int 21h end start .end -------------------------------------------Factorial of Number----------------------------------------------.model small .stack 64 .data .code start: mov cl,05h mov ax,01h again: mul cl dec cl jnz again hlt end start
.end ------------------------------------Fibonacci series----------------------------------------------------.model small .stack 64 .data .code start: mov al,00h mov dl,00h mov bl,01h mov cl,05h again: add al,bl mov dl,al mov al,bl mov bl,dl dec cl jnz again mov ah,4ch int 21h end start .end --------------------------------Hexadecimal Number addition-------------------------------------.model small .stack 64 .data a db 08h dup(?) b db 08h dup(?) .code start: mov ax,@data mov ds,ax lea si,a lea di,b mov dx,0000h mov ax,0021h mov bx,0002h mov cx,0008h again: div bx mov [si],dx inc si loop again dec si mov cx,08h again1: mov al,[si] mov [di],al dec si inc di loop again1 mov ah,4ch int 21h end start .end

Lecture Notes