-
Notifications
You must be signed in to change notification settings - Fork 0
/
division
97 lines (82 loc) · 2.22 KB
/
division
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#include<conio.h>
#include<stdio.h>
int i,n[7000];
void main()
{
clrscr();
//************************ to take input************************
printf("Enter Opcode For Your Expected program::\n\n\n");
for(i=6001;i<=6020;i++)
{
printf( "\nenter mnemonics at address %d\n",i);
scanf("%d",& n[i]);
}
//****************************ACTUAL CODE**************************
if(n[6001]==35)//3e=35 only if ...
{
if(n[6002]==8)// 08 is illegal so hit only 8.
{
if(n[6003]==06)
{
if(n[6004]==02)
{
if(n[6005]==05)
{
if(n[6006]==00)
{
if(n[6007]==90)
{
if(n[6008]==03)//0c=03
{
if(n[6009]==28)//b8=28
{ if(n[6010]==02)
{ if(n[6011]==06)
{
if(n[6012]==60)
{
if(n[6013]==32)
{
if(n[6014]==16)
{
if(n[6015]==24)
{
if(n[6016]==79)
{
if(n[6017]==32)
{
if(n[6018]==15)
{
if(n[6019]==24)
{
if(n[6020]==36)
{
printf("\n\n\n\n\n\n\t\t:::entered opcode is correct of for your program:::\n");
printf("\n\n\t\t\t**you entered no are 08 & 02**");
printf("\n\t\t\t$$$ DIVISION is: 4 $$$");
printf("\n\t\t\t**Quotient is 0 & Remainder is 4**");
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
else
{
printf("*******************************************************\n^%$#(d*^#((@&^#*@(a#&#%&r$%$^k^d^%^d%$e#)v(?/i%#l@&@*#^\n>\n>ERoRR OcCored\n\n<<<<<<<<<<<< ENTRED OPCODE IS WRONG >>>>>>>>>>>>\n\n!!PLEASE TRY AGAIN!!\n********************************************************");
}
getch();
}