Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions site/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Office Hours
labs/decoding-instructions/decoding-instructions
labs/decoding-instructions/decoding-instructions-registers
labs/system-design/enhancing-designs
labs/programming/programming



Expand Down
50 changes: 50 additions & 0 deletions site/labs/programming/programming.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
***********
Programming
***********

* Feel free to use your laptop
* You are strongly encourage to work with others

* When you get stuck, ask those sitting around you for help
* Get used to working together in the labs
* Peer teaching and peer learning has been empirically shown to be very effective


For these questions, use the ESAP design with conditional jumps
:download:`from here. <../../topics/conditions/esap_alu_ram_output_pc_instruction_control_flag.dig>`

Further, use the assembler
:download:`from here. <../../topics/programming/assembler.py>`



Counting Up and Down
====================

#. Write an assembly program to count from 0 to 255, then from 255 to 0, on repeat

* :math:`0, 1, 2, ..., 253, 254, 255, 254, 253, ..., 2, 1, 0, 1, 2, ...`
* Be sure to write the program in assembly, then assemble it with the assembler
* Run the program on the system to ensure correctness



Multiplication
==============

#. Write a program to perform multiplication

* To simplify the problem, assume the value will be multiplied by at least 1

* For example, :math:`15 \times x`, where :math:`x \ge 1`


* Be sure to write the program in assembly, then assemble it with the assembler
* Run the program on the system to ensure correctness



Other Programs
==============

#. Try to create various interesting programs for the ESAP system