EE3046微算機原理與實作 (Microcomputers Theory and Laboratory), Spring 2022

¾Project Assignment¾

Assembler One

Project Title

Assembler One for a Limited 8051 Instruction Set

 

Assignment Description

Write an assembler according to the following specification:

Program input:

An assembly program file (.txt or .asm) based on the Limited Instruction Set One of 8051.

Program function:

The assembler must convert the 8051 assembly instructions of the input program file to 8051 machine code.

Program output:

The machine code should be stored in the hexadecimal format in an output text file.

    

 

Instruction Set

The Limited Instruction Set One

 

Test Programs

Input

Output  (You can verify the result with edsim51di.jar)

 

Test01.txt

Test01-out.txt

 

Test02.txt

Test02-out.txt

 

Language for Assembler

You can use any programming language.

 

Program restrictions

All the test programs are subject to the following restrictions:

n  All characters in the instructions are capitalized.

n  All numbers are hexadecimal, such as 68H, 0B4H, …

n  There is no syntax error in the assembly source program.

n  There is no comment in the program.

n  Adirect” address is written as a number instead of a symbol. For example, “MOV A,TMOD” will not be allowed. Instead, it will be written like “MOV A,89H”.

 

 

Turn in

(By Monday, May 02)

(By Monday, May 09)

 

 

                         

Please upload the following two items

(1) Assembler program:

(The filename must be "stdID name.???", where "stdID" and “name” must be replaced with your student ID number and your name, respectively. The filename extension "???" depends on the programming language that you use to write your assembler. For example, "105432678 陳小美.py" is a legitimate filename.)

(2) Program description:

(Briefly describe how your program works.)

(The filename must be "stdID name.docx" or "stdID name.doc", where "stdID" and “name” must be replaced with your student ID number and your name, respectively.)

 

Demonstrate

(By Monday, April 25)

Demonstrate your program (during our classes)

 

Input

Output

 

Test03.txt

 (Will be provided by the TA during your demonstration)

Test03-out.txt

 

Note:

Mutual discussion is encouraged but plagiarization is prohibited!