0% found this document useful (0 votes)
19 views22 pages

Wookie Simulator Setup and Tutorial

Wookie is a software that simulates the 68HC11 microprocessor. It runs machine code generated by an assembler like AS11M. The document provides steps to download Wookie and AS11M assembler, create and assemble assembly programs, and run the simulated microprocessor in Wookie by loading the assembled code, viewing memory and registers, and single-stepping through the program.

Uploaded by

Li Jarmouni II
Copyright
© Public Domain
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views22 pages

Wookie Simulator Setup and Tutorial

Wookie is a software that simulates the 68HC11 microprocessor. It runs machine code generated by an assembler like AS11M. The document provides steps to download Wookie and AS11M assembler, create and assemble assembly programs, and run the simulated microprocessor in Wookie by loading the assembled code, viewing memory and registers, and single-stepping through the program.

Uploaded by

Li Jarmouni II
Copyright
© Public Domain
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Microprocessor Simulation

Wookie is a software that simulates the function of a real 68HC11.

It runs the machine code created by, for example, the AS11M Assembler.

Steps to download Wookie and AS11M Assembler:


Create a folder called wookie anywhere in your hard disk
Download the Wookie Simulator Software.
Go to the ECE2210 course website at
[Link]
On the main frame, click on Software and Manuals Download
Then, click on the link called M68HC11 Simulator
When prompted, save the file in the wookie directory created above
Download the AS11M Assembler
From the same page above, but now, click on the link called Assembler
(as11m)
Save in the same wookie directory.
Thats it! No installation is required.
Use Notepad to create an Assembly Program.
Go to Start programs Accessories Note Pad
To create Assembly program Go to notepad File
1) After you have typed in your program, select Save as
2) Under save, select the wookie folder created above
3) In File Type choose All files
4) Under File name type [Link] (e.g. [Link])
5) Then click Save.
After saving the program, you have to run the assembler.
To run the assembler go to the DOS Command Prompt (cmd)
How to open CMD? Click on the START button and click on RUN.
Then type cmd to open the DOS Command Prompt.
After opening the DOS shell, type cd (Change Directory) to change to the directory
where you earlier created the directory wookie. In this example: desktop
Again, in this example, wookie is in the desktop.
Then type cd wookie. Thats the folder in which we have saved all files:
executables, text files, etc.
To assemble your program, type 'as11m [Link]'
in the DOS shell.
After you assemble the program, the assembler will tell you the
number of errors and warnings in the program. If it returns error
messages, then edit your program to fix the errors. Then, run
as11m again until it compiles properly. If no errors are found,
a .lst file and a .s19 file should be generated by the assembler.
Now execute the 68HC11 simulator ([Link]).
You should see the Wookie window on your computer screen.
Click "File" on the menu and then click on "Load .s19 file...".
On the "Open" window, open the .s19 file that you just created.
Then, the "Set HC11 Mode" window will pop up, and the Brief
Case" should be selected as Mode. Also, the start address
should be set as the same as your program start address.
Next, we click on the "View Code" button and open the .lst file
that was just created by the assembler. We should select
"Listing Files (*.lst)" on the bar Files of type. Click Open.
Choose "ASM11" as file type and 0 as address offset in the
window "Choose LST file format".
Now the .lst file can be seen in the "Code View" window.
We can monitor the memory by clicking on the "Memory Watch"
button.
Input the name and the address you want to watch and then
click "OK" button.
Now that the memory is in the Window Memory Watch
We can also click on the "Browse Mem." button to watch a
block of memory.
Then we will monitor the CPU registers by clicking on the
"M68HC11 CPU" button. The register value will be displayed in
the "MCU" window.
Finally, click on the green button to step through the program
one line at a time. This way, you may also check the program
flow by watching what happens on every step . For example,
you can keep an eye on the registers and memory to make
sure everything is running as you hoped it would.

Common questions

Powered by AI

The integration of AS11M Assembler and Wookie Simulator creates a cohesive educational toolkit that significantly enhances student learning in 68HC11 microprocessor programming. The AS11M Assembler translates assembly code into machine code, which is a critical learning step as it helps students understand how high-level programming abstractions map to low-level machine instructions . The Wookie Simulator then provides a platform to execute this machine code, offering a virtual representation of a 68HC11 microprocessor . This simulation allows students to step through code execution, observe real-time changes in memory and CPU registers, and modify programs based on outcomes . These experiences help students grasp crucial concepts like instruction execution, register manipulation, and memory management in a controlled, risk-free environment. Furthermore, by allowing students to witness the real-time effects of their code and troubleshoot using detailed feedback, the integrated system promotes deeper understanding and retention of microprocessor programming concepts.

The Wookie Simulator offers a user-friendly interface that allows developers to validate their 68HC11 assembly programs meticulously. Once the machine code is loaded into the simulator, developers can use the 'Code View' to scrutinize the assembly listing through the '.lst' file, ensuring that the instructions are correct and comply with the intended program logic . By utilizing the 'Memory Watch' and 'Browse Mem.' features, they can observe memory changes and verify variable storage and manipulation accuracy . Observing CPU registers via the 'M68HC11 CPU' button provides insights into how different instructions affect the processor's state . The capability to step through code one instruction at a time using the green button ensures that any discrepancies in program execution can be identified and resolved, offering a robust way to confirm the program operates as intended . This combination of features empowers developers to detect and rectify errors effectively, achieving proper program performance.

The Wookie simulator provides several features that significantly support the debugging process for 68HC11 assembly programs. The ability to step through the program one instruction at a time using the green button enables developers to closely monitor the execution flow and detect anomalies . The 'Code View' and '.lst' file offer insights into the assembly instructions being executed, which is crucial for ensuring the program logic is adhered to . The 'Memory Watch' and 'Browse Mem.' features allow users to identify incorrect data storage or retrieval by tracking changes in memory locations . Similarly, the 'M68HC11 CPU' button showcases real-time register states, helping to verify the impact of each instruction on the processor . By providing detailed feedback and visibility into various execution aspects, the simulator enhances developers' ability to swiftly identify and rectify bugs, ensuring the program functions correctly.

Using a simulator like Wookie in embedded systems education offers several pedagogical advantages over physical hardware. Simulators provide a risk-free environment for students to experiment and learn without the fear of damaging physical components, which is especially important for novices . They also allow students to execute instructions and observe outcomes instantaneously, promoting active learning through immediate feedback and iterative problem-solving . This immediate visibility into the memory and CPU operations helps in reinforcing theoretical concepts and understanding microprocessor architecture . Simulators are generally more accessible and cost-effective, enabling institutions to provide scalable resources for large classes without the need for extensive hardware investments . Additionally, simulators can replicate different operational conditions and faults, offering a more comprehensive learning experience that prepares students for real-world challenges in embedded systems development.

Wookie streamlines the editing and testing cycle for 68HC11 assembly programs by providing an integrated environment where users can write, assemble, and simulate code. Initially, developers create the '.asm' assembly file using a text editor such as Notepad . Any syntax errors identified by the AS11M assembler can be corrected by editing the '.asm' file directly . The simulation phase involves loading the successfully compiled '.s19' file into Wookie, where developers can examine the correctness of their program logic and execution . Wookie's interface allows stepping through program execution one instruction at a time, monitoring memory and CPU state changes, which helps in quickly detecting logic errors or unexpected behavior . This cyclical approach of editing, assembling, and simulating facilitates iterative refinement and debugging, enhancing productivity and program reliability.

To set up and run an assembly program simulation using Wookie, first create a directory called 'wookie' on the hard disk . Download the Wookie Simulator and AS11M Assembler from the ECE2210 course website, saving them in the 'wookie' directory . Use Notepad to create your assembly program and save it with the '.asm' extension in the 'wookie' directory . Open the DOS Command Prompt, navigate to the 'wookie' directory, and use the command 'as11m <filename>.asm' to assemble the program . Check and resolve any assembler errors, then load the '.s19' file into Wookie by executing the simulator and selecting 'Load .s19 file...' . Set the HC11 Mode to "Brief Case" and the start address to match your program's start address . Open the '.lst' file in the "Code View" window and monitor memory and CPU registers using "Memory Watch" and the "M68HC11 CPU" buttons, respectively . Step through the program using the green button to ensure proper execution .

Wookie offers several key functionalities for 68HC11 microprocessor simulations that aid developers. The software runs machine code generated by assemblers such as AS11M and provides a simulation of the 68HC11 microprocessor's functionality . Users can load and view '.s19' files that contain the machine code, enabling simulation execution . The 'Code View' allows examination of the '.lst' file to analyze the program's assembly instructions . Users can monitor system memory and browse through specific memory blocks with the 'Memory Watch' and 'Browse Mem.' features, respectively . Additionally, the 'M68HC11 CPU' button provides real-time display of CPU register values, which is crucial for debugging and optimization . These functionalities together create an environment that facilitates thorough testing and analysis, crucial for effective program development and troubleshooting. The capacity to step through the program one instruction at a time further enhances precision in identifying and resolving issues .

If the assembler returns errors during compilation, first carefully read the error messages provided to identify the issues . Typically, these errors might be related to syntax, labels, or incorrect instruction formatting in the '.asm' file. Once identified, open the assembly file using a text editor like Notepad and correct the errors noted . After making the necessary adjustments, save the changes and run the assembler again using the command 'as11m <filename>.asm' . Repeat this process until the assembler compiles the program without any errors, indicating that the program is syntactically correct . If persistent issues occur, reviewing the assembly language syntax and ensuring adherence to the 68HC11 instruction set can help in resolving recurring problems.

The 'Set HC11 Mode' window is a critical component in setting up the execution of a 68HC11 program in the Wookie simulator. This window requires the user to select the appropriate mode, often 'Brief Case', and define the start address for the program being executed . Configuring these settings ensures that the simulator interprets the machine code in a manner consistent with the program’s intended operation, as the mode can affect how instructions are executed . Setting the correct start address is crucial because it aligns with where the program expects to begin execution in memory, allowing for accurate simulation behavior . This setup is essential for simulating real-world operation conditions and verifying program functionality before deployment.

During the simulation using Wookie, you can monitor memory by clicking on the 'Memory Watch' button, which will allow you to input the name and address to watch specific locations . You can also click on 'Browse Mem.' to watch a block of memory . For monitoring CPU registers, click on the 'M68HC11 CPU' button to display the register values in the 'MCU' window . By stepping through the program one line at a time using the green button, you can track program flow and observe changes in registers and memory, ensuring the program runs as expected .

You might also like