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, 03.07.2019 15:10
Ahouse has the following electrical appliance usage (1) single 40w lamp used for 4 hours per day (2) single 60w fan used for 12 hours per day (3) single 200w refrigerator that runs 24 hours per day with compressor run 12 hours and off 12 hours find the solar power inverter size in watt with correction factor of 1.25.
Answers: 1
question
Engineering, 04.07.2019 18:10
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 18:10
Adouble-strand no. 60 roller chain is used to transmit power between a 13-tooth driving sprocket rotating at 300 rev/min and a 52-tooth driven sprocket. a) what is the allowable horsepower of this drive? b) estimate the center-to-center distance if the chain length is 82 pitches. c) estimate the torque and bending force on the driving shaft by the chain if the actual horsepower transmitted is 30 percent less than the corrected (allowable) power.
Answers: 3
question
Engineering, 04.07.2019 18:10
The drive force for diffusion is 7 fick's first law can be used to solve the non-steady state diffusion. a)-true b)-false
Answers: 1
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, 12.04.2021 21:50
question
Mathematics, 12.04.2021 21:50
question
Mathematics, 12.04.2021 21:50
question
History, 12.04.2021 21:50
question
Arts, 12.04.2021 21:50
Questions on the website: 13722366