Friday, December 12, 2014

Questions/Answers: What's run-time binding?

In short, run-time binding describes how we pass the address of a subroutines (app_xmit and app_recev subroutines) from application module to the SCI module (or from any module to another module in run-time, i.e. as the program is running on the CPU), allowing the sci module to call the subroutines defined in the application module implicitly/indirectly by loading the address of the subroutine and the jsr'ing to that subroutine. This is as opposed to a link-time binding, where you declare sci_init subroutine as extern in the application module and use the linker to bind them, thus, allowing for the application to explicitly/directly call the sci_init even though sci_init was defined in sci module (using jsr sci_init).
Generally, run-time binding provides more flexibility, and provides more separation or decoupling of modules.

Sunday, December 7, 2014

Lab 5: Code

Click here to get a copy of code for lab 5. This should cover most of the lab. Note, that queue.asm was re-written to provide a more reusable module; so that you can use the same code both for xmit and receive queues.