subject
Engineering, 23.09.2020 17:01 falmujaahid026

Design a small computer called S66 and an assembly language for it called Baymax. You are to create a cross-compiler using c++, the runs on a Windows PC and translates any correct source written in Baymax to the machine language of the S66 computer. This assembler will allow programs written for the S66 to be in the Baymax language rather than zeros and ones. The assembler will ask the user for the source file path and name and send it's out output only to the console screen. In conclusion, the program consists of two parts: One is to read the data declarations in the source file provided by the user(the "wrd" directives) and create the symbol table; the second part is for the program to use the symbol table created to translate the instructions ( "LDA","LDB","ADB","SVA") to machine language. Here is the instructions of the machine code and their fixed machine language counterpart:
The wrd directive is used to assign a value to a location, while the LDA is used to load that location.
wrd -> 00000000 ( is the name of the variable)
LDA -> 00000001 (Hexadecimal 01XX)
LDB -> 00000010 (Hexadecimal 02XX)
ABA -> 11111111 00000000 (Hexadecimal FF00)
SVA -> 00000011 (Hexadecimal 03XX)
One example of a program the Baymax assembler might have to translate:
wrd apples 5 (apples, oranges, fruit are names of variables; 5,1,0 is the valued assign to that location)
wrd oranges 1
wrd fruit 0
LDA apples (load apples from location A)
LDB oranges (load oranges from location B)
ADB
SVA fruit
The Symbol Table the Assembler will generate for its on use on this example will look like:
Symbol Adress Content
"apples" 0 5
"oranges" 2 1
"fruit" 4 0
What the assembler will output on your PC as it translate this particular example:
1. 00000000 00000101 0005
2. 00000000 00000001 0001
3. 00000000 00000000 0000
4. 00000001 00000000 0100
5. 00000010 00000010 0202
6. 11111111 00000000 FF00
7. 00000011 00000100 0304

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 16:10
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
question
Engineering, 04.07.2019 18:10
An ideal otto cycle with air as the working fluid has a compression ratio of 8. the minimum and maximum temperatures in the cycle are 300 k and 1340 k. use constant specific heats at room temperature to determine (a) the amount of heat transferred to the air during the heat- addition kj/kg, (b) the thermal efficiency, and (c) the thermal efficiency of a carnot cycle ope limits. process, in rating between the same temperature
Answers: 2
question
Engineering, 04.07.2019 18:10
Which from the following instrument is commonly used to detect the high pitch butzing sound in bearings? [clo4] a)-digital ultrasonic meter b)-infrared camera c)-spectroscopic d)-vibrometer
Answers: 2
question
Engineering, 04.07.2019 18:10
Journeyman training is usually related (clo2) a)-to specific tasks b)-to cost analysis of maintenance task c)-to control process to ensure quality d)-to installation of machinery
Answers: 2
You know the right answer?
Design a small computer called S66 and an assembly language for it called Baymax. You are to create...
Questions
question
English, 28.07.2019 08:20
Questions on the website: 13722367