0% found this document useful (0 votes)
26 views

TASK # 1: Write A Program To Add 5 Digits of 8 Bits

This document contains the output of 4 tasks that add multiple 8-bit digits to the AX register in assembly code. Task 1 adds 5 digits to AX, Task 2 copies the AX value to BX, CX, and DX registers, Task 3 repeats Task 1 and Task 4 repeats Task 2 by copying the final AX value.

Uploaded by

ashar565
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

TASK # 1: Write A Program To Add 5 Digits of 8 Bits

This document contains the output of 4 tasks that add multiple 8-bit digits to the AX register in assembly code. Task 1 adds 5 digits to AX, Task 2 copies the AX value to BX, CX, and DX registers, Task 3 repeats Task 1 and Task 4 repeats Task 2 by copying the final AX value.

Uploaded by

ashar565
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

TASK # 1: write a program to add 5

digits of 8 bits
C:\>debug
-a 0000
0AFB:0000 mov ax,33 ; ax=33
0AFB:0003 add ax,44 ; ax=33+44
0AFB:0006 add ax,55 ; ax=33+55
0AFB:0009 add ax,aa ; ax=33+aa
0AFB:000C add ax,bb ; ax=33+bb
0AFB:000F
-g=0000 000F
Output:
AX=0231 BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000
DS=0AFB ES=0AFB SS=0AFB CS=0AFB IP=000F NV UP EI PL NZ AC PO NC
0AFB:000F 035F05
ADD BX,[BX+05]
DS:0005=0500

TASK # 2
0AFB:0000 mov ax,33 ; ax=33
0AFB:0003 add ax,44 ; ax=33+44
0AFB:0006 add ax,55 ; ax=33+55
0AFB:0009 add ax,aa ; ax=33+aa
0AFB:000C add ax,bb ; ax=33+bb
0AFB:000F mov bx,ax ; ax=bx
0AFB:0011 mov cx,ax ; ax=cx
0AFB:0013 mov dx,ax ; ax=dx
0AFB:0015
-g=0000 0015
Output:
AX=0231 BX=0231 CX=0231 DX=0231 SP=FFEE BP=0000 SI=0000 DI=0000
DS=0AFB ES=0AFB SS=0AFB CS=0AFB IP=0015 NV UP EI PL NZ AC PO NC
0AFB:0015 052104
ADD AX,0421

TASK # 3
0AFB:0000 mov ax,11
0AFB:0003 add ax,22
0AFB:0006 add ax,33
0AFB:0009 add ax,44
0AFB:000C add ax,5a

0AFB:000F add ax,ba


0AFB:0012 add ax,df
0AFB:0015 add ax,f3
0AFB:0018 add ax,5c
0AFB:001B add ax,99
0AFB:001E
-g=0000 001E
Output:
AX=0485 BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000
DS=0AFB ES=0AFB SS=0AFB CS=0AFB IP=001E NV UP EI PL NZ AC PO NC
0AFB:001E FFFF
??? DI

TASK # 4
0AFB:0000 mov ax,11
0AFB:0003 add ax,22
0AFB:0006 add ax,33
0AFB:0009 add ax,44
0AFB:000C add ax,5a
0AFB:000F add ax,ba
0AFB:0012 add ax,df
0AFB:0015 add ax,f3
0AFB:0018 add ax,5c
0AFB:001B add ax,99
0AFB:001E mov bx,ax
0AFB:0020 mov cx,ax
0AFB:0022 mov dx,ax
0AFB:0024
-g=0000 0024
Output:
AX=0485 BX=0485 CX=0485 DX=0485 SP=FFEE BP=0000 SI=0000 DI=0000
DS=0AFB ES=0AFB SS=0AFB CS=0AFB IP=001E NV UP EI PL NZ AC PO NC
0AFB:001E FFFF
??? DI

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy