Skip to content
A github repo for CS356 Lab3
Branch: master
Clone or download
Latest commit e7877a4 Mar 23, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
356fulldemo.hera Add files via upload Mar 20, 2019
356fulldemo.hera.lcode Add files via upload Mar 20, 2019
356lab3demo.hera Add files via upload Mar 18, 2019
356lab3demo.hera.ldata Add files via upload Mar 18, 2019
356lab3final.hera.lcode Add files via upload Mar 22, 2019
356lab3hassem.hera Hera file for lab 3 part 1 Mar 1, 2019
356lab3part2.hera.lcode Add files via upload Mar 6, 2019
356lab3part2.hera.ldata test program to do simple i/o from keyboard Mar 6, 2019
356test2.hera.ldata Lcode and Ldata files Mar 1, 2019
Actual_final_lab_4_code.hera.lcode Rename 356lab3final2.hera.lcode to Actual_final_lab_4_code.hera.lcode Mar 23, 2019
Lab3_HERA_processor.circ Update Mar 23, 2019

CS356 Lab 3 and 4: Polling I/O System

Jordan Acker, Zhanpeng Wang, Kadan Lottick, Elizabeth Chan

Processor supports specialized instruction i/o with opcode 0x25[r][s] for getchar_ord and 0x24[r][s] for putchar_ord, where r is the register to pull into or print from, and s is the keyboard or screen to pull from or print to.

Code prints a greeting message to each terminal (per Dave's lab instructions), then enters a polling loop. In this loop it performs a computation during which typing may occur; then it pulls any characters typed on keyboard 0 and immediately prints them to screen 0; then it pulls characters typed on keyboard 1 up to a newline, and prints them first to keyboard 1 with all letters uppercase, and then to keyboard 0 with all non letters/numbers converted to underscores (per Dave's lab instructions). If no newline was typed the characters are stored, to be printed the next time a newline is typed on that keyboard.

You can’t perform that action at this time.