SIC(Simplified Instruction Computer) Assembler
본 자료는 미만의 자료로 미리보기를 제공하지 않습니다.
닫기
  • 1
해당 자료는 0페이지 까지만 미리보기를 제공합니다.
0페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

SIC(Simplified Instruction Computer) Assembler에 대한 보고서 자료입니다.

본문내용

typedef struct Code{
char opcode[6];
char machine[3];
short int offset;
} CodeSet;
//opcode table의 정의

CodeSet OpcodeTable[26]={
{"JLT","38",2},{"LDA","00",-1},{"SUB","1C",-1},{"AND","40",-1},
{"MUL","20",6},{"OR","44",-1},{"RSUB","4C",-1},{"DIV","24",-1},
{"STCH","54",-1},{"STL","14",-1},{"STX","10",-1},{"TIX","2C",-1},
{"LDL","08",-1},{"JSUB","48",14},{"TD","E0",-1},{"STA","0C",-1},
{"JEQ","30",-1},{"COMP","28",-1},{"WD","DC",-1},{"ADD","18",7},
{"RD","D8",8},{"JGT","34",10},{"J","3C",13},{"LDCH","50",-1},
{"LDX","04",15},{"STSW","E8",18}
};
//OpcodeTable은 전역변수로 설정하였다.

int HashFunction(char * string, int mod);
//HashFunction에 mod를 parameter로 전해주며 OpcodeTable은 각 character의 합을 26으로 나눈 값을 반환하며 SymTable은 각 character의 합을 40으로 나눈 값을 반환한다.(hash value로 갖는다.)

int StrComp(char * string1, char * string2);
//string1과 string2를 비교하여 같으면 0을 다르면 1을 반환한다.

int StrCopy(char * stringS, char * stringD);
//stringS(source)를 stringD(destination)에 복사한다.

void HexAddDec(char * Hex, int aValue);
//char 4자리인 Hex를 받아서 3을 더해서 다시 Hex에 저장한다.
int HconvD(char * Hex);
//char Hex를 받아서 Decimal로 바꿔서 integer로 반환한다.

void DconvH(int Dec, char * Hex);
//int인 Decimal을 char인 Hex(4자리 수)로 변환

int Decimal(char * Dec);
//char형인 Decimal을 integer로 변환하여 반환

int OpcodeSearch(char * code, char * machine)
//opcode를 table에서 찾아서 2자리 hex로 반환한다.

struct Node;
typedef struct Node SymNode;
  • 가격2,000
  • 페이지수1페이지
  • 등록일2005.12.20
  • 저작시기2005.12
  • 파일형식압축파일(zip)
  • 자료번호#328326
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니