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
|
#include<iostream>
#include<stdio.h>
#define MAX 1000
using namespace std;
char registers[8][16];
void MVI(int reg, char *value) {
// your code here
}
void MOV(int reg1, int reg2) {
// your code here
}
void AND(int reg1, int reg2, int reg3) {
// your code here
}
void OR(int reg1, int reg2, int reg3) {
// your code here
}
void NOT(int reg1, int reg2) {
// your code here
}
void PRN(int reg) {
// your code here
}
void SUB(int reg1, int reg2, int reg3) {
// your code here
}
void SL(int reg) {
// your code here
}
void SR(int reg) {
// your code here
}
int main() {
int i,j,k;
int N = 0; // number of lines in the input
char c;
char lines[MAX][16];
while (1) {
scanf("%c", &c);
if (c == '\n') {
break;
}
lines[N][0] = c;
for (i=1;i<16;i++) {
scanf("%c", &lines[N][i]);
}
N++;
scanf("%c", &c);
}
for (i = 0; i < 8; i++) {
for (j = 0; j < 16; j++) {
registers[i][j] = '0';
}
}
//
return 0;
}
|