Wednesday, 18 March 2020

Computer Organization Lab Manual Programs-Cycle:1



PROGRAM 1: 8 BIT ADDITION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
CX,0000
3001




3002




3003


MOV
SI,2100
3004





3005




3006


MOV
AL,[SI]
3007





3008


INC
SI
3009


MOV
BL,[SI]
300A




300B


ADD
AL,BL
300C




300D


JNC
3010
300E




300F


INC
CX
3010


INC
SI
3011


MOV
[SI],AL
3012




3013


INC
SI
3014


MOV
[SI],CX
3015




3016


INT
03


PROGRAM 2: 8 BIT SUBTRACTION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
CX,0000
3001




3002




3003


MOV
SI,2100
3004





3005




3006


MOV
AL,[SI]
3007





3008


INC
SI
3009


MOV
BL,[SI]
300A




300B


SUB
AL,BL
300C




300D


JNC
3010
300E




300F


INC
CX
3010


INC
SI
3011


MOV
[SI],AL
3012




3013


INC
SI
3014


MOV
[SI],CX
3015




3016


INT
03


PROGRAM 3: 8 BIT  MULTIPLICATION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
SI,2100
3001




3002




3003


MOV
AL,[SI]
3004





3005


INC
SI
3006


MOV
BL,[SI]
3007





3008


MUL
BL
3009


INC
SI
300A


MOV
[SI],AL
300B




300C


INT
03











PROGRAM 4: 8 BIT   DIVISION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
SI,2060
3001




3002




3003


MOV
AL,[SI]
3004





3005


INC
SI
3006


MOV
BL,[SI]
3007





3008


DIV
BL
3009


INC
SI
300A


MOV
[SI],AL
300B




300C


INT
03











PROGRAM 5:  16 BIT AIRTHEMATIC OPERATIONS

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
CX,0000
3001




3002




3003


MOV
SI,2030
3004





3005




3006


MOV
AX,[SI]
3007





3008


ADD
SI,0002
3009




300A




300B




300C


MOV
BX,[SI]
300D




300E


ADD
AX,BX
300F




3010


JNC
3013
3011




3012


INC
CX
3013


ADD
SI,0002
3014




3015




3016




3017


MOV
[SI],AX
3018




3019


ADD
SI,0002
301A




301B




301C




301D


MOV
[SI],CX
301E




301F


INT
03





PROGRAM 6:  16 BIT SUBTRACTION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
CX,0000
3001




3002




3003


MOV
SI,3030
3004





3005




3006


MOV
AX,[SI]
3007





3008


ADD
SI,0002
3009




300A




300B




300C


MOV
BX,[SI]
300D




300E


SUB
AX,BX
300F




3010


JNC
3013
3011




3012


INC
CX
3013


ADD
SI,0002
3014




3015




3016




3017


MOV
[SI],AX
3018




3019


ADD
SI,0002
301A




301B




301C




301D


MOV
[SI],CX
301E




301F


INT
03



PROGRAM 7:  16 BIT MULTIPLICATION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
DX,0000
3001




3002




3003


MOV
SI,3050
3004





3005




3006


MOV
AX,[SI]
3007





3008


ADD
SI,0002
3009




300A




300B




300C


MOV
BX,[SI]
300D




300E


MUL
BX
300F


ADD
SI,0002
3010




3011




3012




3013


MOV
[SI],AX
3014




3015


ADD
SI,0002
3016




3017




3018




3019


MOV
[SI],DX
301A




301B


INT
03








PROGRAM 8:  16 BIT DIVISION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
DX,0000
3001




3002




3003


MOV
SI,3050
3004





3005




3006


MOV
AX,[SI]
3007





3008


ADD
SI,0002
3009




300A




300B




300C


MOV
BX,[SI]
300D




300E


DIV
BX
300F


ADD
SI,0002
3010




3011




3012




3013


MOV
[SI],AX
3014




3015


ADD
SI,0002
3016




3017




3018




3019


MOV
[SI],DX
301A




301B


INT
03










PROGRAM 9: FACTORIAL

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

5000



MOV

SI,3000
5001




5002




5003


MOV
AX,[SI]
5004




5005



MOV

BX,AX
5006




5007


DEC
BX
5008


JZ
500E
5009




500A


MUL
BX
500B




500C


JMP
5007
500D




500E


INC
SI
500F


MOV
[SI],AX
5010




5011


INT
03







PROGRAM 10: LARGEST NUMBER

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

6000


MOV
SI,2100
6001




6002




6003


MOV
CX,0004
6004




6005




6006


MOV
AL,[SI]
6007




6008


INC
SI
6009


MOV
BL,[SI]
600A




600B


CMP
AL,BL
600C




600D


JNC
6011
600E




600F


MOV
AL,BL
6010




6011


DEC
CX
6012


JNZ
6008
6013




6014


INT
03



PROGRAM 11: SMALLEST NUMBER

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

6000


MOV
SI,2100
6001




6002




6003


MOV
CX,0004
6004




6005




6006


MOV
AL,[SI]
6007




6008


INC
SI
6009


MOV
BL,[SI]
600A




600B


CMP
AL,BL
600C




600D


JC
6011
600E




600F


MOV
AL,BL
6010




6011


DEC
CX
6012


JNZ
6008
6013




6014


INT
03



PROGRAM 12:  8 BIT MULTIBYTE

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

6000


MOV
SI,2350
6001




6002




6003


MOV
DI,2750
6004




6005




6006


MOV
BP,3000
6007




6008




6009


MOV
CL,0005
600A




600B

UP
MOV
AL,[SI]
600C




600D


MOV
BL,[DI]
600E




600F


ADD
AL,BL
6010




6011


MOV
[BP],AL
6012




6013




6014


INC
SI
6015


INC
DI
6016


INC
BP
6017


LOOP
UP
6018




6019


INT
03

PROGRAM 13:  LINEAR SEARCH

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
DX,0000
3001




3002




3003


MOV
SI,2100
3004





3005




3006


MOV
CX,0003
3007





3008




3009


MOV
AL,[SI]
300A




300B

L3
INC
SI
300C


MOV
BL,[SI]
300D




300E


CMP
AL,BL
300F




3010


JNE
L1
3011




3012


MOV
DX,0FFFF
3013




3014




3015


JMP
L2
3016




3017

L1
DEC
CX
3018


JNZ
L3
3019




301A

L2
INT
03








No comments:

Post a Comment