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 18:10
Aplate clutch has a single pair of mating friction surfaces 250-mm od by 175-mm id. the mean value of the coefficient of friction is 0.30, and the actuating force is 4 kn. a) find the maximum pressure and the torque capacity using the uniform-wear model. b) find the maximum pressure and the torque capacity using the uniform-pressure model.
Answers: 3
question
Engineering, 04.07.2019 18:20
Refrigerant-134a enters the compressor of a refrigerator as superheated vapor at 0.14 mpa and -10°c at a rate of 0.05 ka/s and leaves at 0.8 mpa and 50°c. the refrigerant is cooied in the condenser to 0.72 mpa and 26'c. it is then throttled to 0.15 mpa. sketch the t-s diagram for the system and evaluate: 6) the rate of heat removai from the refrigerated space (kw), it) the power input to the compressor (kw), ii) the isentropic efficiency of the compressor (%), and iv) the cop of the refrigerator.
Answers: 2
question
Engineering, 04.07.2019 19:10
What is a monomer? how do they form a ploymer from the view point of chemical bonding?
Answers: 1
question
Engineering, 06.07.2019 03:10
Consider a 1.2 meter high and 2 meter wide glass window whose thickness is 6 mm and thermal conductivity is 0.78 w/m °c. the room temperature is maintained at 24 °c, while the outdoor temperature is -5 °c. the convective heat transfer coefficients on the inner and outer surfaces of the window are 10 w/m2 °c and 25 w/m2 °c respectively. (a) draw the thermal resistance network, etermine the steady rate of heat transfer t e glass window (c) determine the temperature of the inner surface of the window
Answers: 3
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, 07.11.2020 03:20
question
History, 07.11.2020 03:20
Questions on the website: 13722363