8086 program Write an ALP to perform 16-bit and 32-bit addition and subtraction.

 Code :-

16 bit addition

org 100h

MOV AX,0A235H

MOV BX,8564H

ADD AX,BX

ret

Output :-



32 bit addition 

org  100h

MOV AX,1111H

MOV BX,1111H

MOV CX,9999H

MOV DX,9999H

ADC  AX,CX

ADC BX,DX

ret

Output :-


16 bit subtraction

org 100h

MOV AX,0A235H

MOV BX,8564H

SUB  AX,BX

ret

Output :-


32 bit subtraction

org  100h

MOV AX,1010H

MOV BX,1010H

MOV CX,0909H

MOV DX,0909H

SUB  AX,CX

SUB  BX,DX

ret

Output :-



Comments

Popular Posts

Interface 8 LEDs with Arduino UNO (digital 0 to digital 7). Develop an Arduino sketch for following: a. Toggle all LEDs continuously every 500 milliseconds. b. Toggle even and odd LEDs continuously for 2 seconds. c. Generate left series (i.e. used during Navaratri)

Interface DC motor and Buzzer with Arduino. Develop an Arduino sketch to rotate motor anti-clockwise for 10 seconds after that sound buzzer for 2 seconds and silent at last.

3 Develop an interfacing circuit and a sketch to display decimal data on 7-Segments. The 3- digit number is sent over serial communication.