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 14:10
Line joining liquid phase with liquid and solid phase mixture is known as: a) liquidus b) solidus c) tie line d) none of the mentioned
Answers: 2
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
question
Engineering, 04.07.2019 18:10
At 12 noon, the count in a bacteria culture was 400; at 4: 00 pm the count was 1200 let p(t) denote the bacteria cou population growth law. find: (a) an expression for the bacteria count at any time t (b) the bacteria count at 10 am. (c) the time required for the bacteria count to reach 1800.
Answers: 1
question
Engineering, 04.07.2019 18:20
Air is compressed isentropically from an initial state of 300 k and 101 kpa to a final temperature of 1000 k. determine the final pressure using the following approaches: (a) approximate analysis (using properties at the average temperature) (b) exact analysis
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
Physics, 27.05.2020 18:59
question
Mathematics, 27.05.2020 18:59
question
History, 27.05.2020 18:59
Questions on the website: 13722367