Difference between revisions of "CSC270 Weekly Schedule 2012"
(→Second Half) |
(→Second Half) |
||
Line 338: | Line 338: | ||
|| | || | ||
* '''Monday''' | * '''Monday''' | ||
+ | ** Review of negative numbers. | ||
+ | ** New question: How can we extend a positive or negative number from 1 byte to two bytes? | ||
+ | ** Review Condition Code Register | ||
+ | ** Rule: | ||
+ | *** Every instruction that makes information pass through ALU will modify the CC bits (HINZVC). Typical instructions: Add, Sub, Shift, Rotate, Multiply, Divide, And, Or, Not, Xor, and '''Compare''' (which is a subtract operation). | ||
+ | *** Special instructions can modify individual bits: For example '''CLC''' and '''SEC''' can be used to clear or set the '''Carry''' bit. | ||
+ | *** Some instruction can have different outcome depending on some of the CC bits: ''Conditional Branches'': BEQ, BNE, BLT, BGT. | ||
+ | ** The '''Compare''' (CMP) instruction: | ||
+ | *** It is a subtract operation that does not store the result of the subtraction, but instead sets the HINZVC bit depending on the result of the subtraction. | ||
+ | ** The Conditional Branch instructrions: | ||
+ | *** They operate as follows: | ||
+ | |||
+ | if ''specific CC bit'' == ''some predefined value'': | ||
+ | PC = PC + ''displacement'' | ||
+ | else: | ||
+ | PC = PC + 1 | ||
+ | |||
+ | :::For example: | ||
+ | |||
+ | BEQ, (Branch if equal) | ||
+ | if Z bit == 1: | ||
+ | PC = PC + ''displacement'' | ||
+ | else: | ||
+ | PC = PC + 1 | ||
+ | |||
+ | *** Computing the displacement in hex. Case #1 | ||
+ | |||
+ | LDAA alpha | ||
+ | CMPA #5 ; alpha==5? | ||
+ | BEQ same | ||
+ | diff: ... ; go here if != 5 | ||
+ | ... | ||
+ | ... | ||
+ | same: ... ; go here if == 5 | ||
+ | |||
+ | :::Assume BEQ is at Address 0010 and ''same'' at Address ''0023''. Address of ''diff'' label is at 0012 (because BEQ label takes 2 bytes). 0012 + displacement must be equal to 0023. Hence displacement is 11 (only 2 digits, as only 1-byte displacement allowed). | ||
+ | |||
+ | *** Case #2: branching back | ||
+ | |||
+ | same: ... ; go here if == 5 | ||
+ | |||
+ | LDAA alpha | ||
+ | CMPA #5 ; alpha==5? | ||
+ | BEQ same | ||
+ | diff: ... ; go here if != 5 | ||
+ | ... | ||
+ | ... | ||
+ | |||
+ | :::Assume BEQ is at address 0020, and ''same'' is at 0005. The displacement must be a negative number that, once added to 0022 (because that's the address of the instruction after BEQ), will result in 0005. | ||
+ | |||
+ | 0022 | ||
+ | + XXXX | ||
+ | --------- | ||
+ | 0005 | ||
+ | |||
+ | :::There are many different ways to compute XXXX. Which ever way we find, we find XXXX = FFE3, so the displacement is the lower byte, or '''E3'''. | ||
+ | |||
+ | |||
+ | |||
* '''Wednesday''' | * '''Wednesday''' | ||
* '''Friday''' | * '''Friday''' | ||
Line 343: | Line 402: | ||
* | * | ||
|| | || | ||
− | * | + | * Reading |
+ | ** The condition code register is covered in Section 3.5 of the Motorola [[Media:6811Manual.pdf | 6811 Manual]]. Skip Section 4. | ||
<!-- ================================================================== --> | <!-- ================================================================== --> |
Revision as of 09:22, 9 April 2012
--D. Thiebaut 15:03, 18 January 2012 (EST)
Contents
Office Hours: M 1:10-3:00 p.m., W 4:00-6:00 p.m.
Weekly Schedule
First Half
Week | Topics | Reading |
Week 1 1/27 |
|
Skip Chapter 1. |
Week 2 1/30 |
|
Start your reading with Chapter 2 on Boolean Algebra.
|
Week 3 2/6 |
|
Reading
|
Week 4 2/13 |
|
|
Week 5 2/20 |
|
|
Week 6 2/27 |
|
|
Week 7 3/5 |
|
|
Week 8 3/12 |
|
|
Second Half
Week | Topics | Reading | ||||
Week 1 3/26 |
|
| ||||
Week 10 4/02 |
(taken from the 6811 Reference Manual)
|
| ||||
Week 11 4/09 |
if specific CC bit == some predefined value: PC = PC + displacement else: PC = PC + 1
BEQ, (Branch if equal) if Z bit == 1: PC = PC + displacement else: PC = PC + 1
LDAA alpha CMPA #5 ; alpha==5? BEQ same diff: ... ; go here if != 5 ... ... same: ... ; go here if == 5
same: ... ; go here if == 5 LDAA alpha CMPA #5 ; alpha==5? BEQ same diff: ... ; go here if != 5 ... ...
0022 + XXXX --------- 0005
|
| ||||
Week 12 4/16 |
|
| ||||
Week 13 4/23 |
|
| ||||
Week 14 4/30 |
|
|
Links and Resources
Printing
- How to print a text file (pure ASCII, not an MS Word document) from a beowulf account to the printer @ FH354:
cprint -15 myFile.txt
- How to print a pdf from a beowulf account to the printer @ FH354:
lpr -P ford354 max232.pdf
- How to print an image to the same printer, from a beowulf account:
convert myImage.jpg myImage.pdf lpr -P ford354 myImage.pdf
Programs
- How to implement AND, OR, NOT and simple logic circuits in Python
- A Python program that generates a truth table.
- A Python program to simulate a simple sequencer.
Software
Demos of Various Circuit
- Hades at U. of Hamburg.
Free Circuit CAD Systems
(the video shows an analog circuit, but logic gates are also supported) |
|
PSpice 9
- Pspice 9, Student version. An nice alternative to drawing schematics by hand.
- This is a Windows version. (I have tried to make it work under wine/Mac OS X but haven't been able to make it load the libraries correctly)
- Make sure you select the schematics option when installing the software.
- Select Tools/Schematics when starting the editor
- The schematics editor is located in C:\Program Files\OrCAD_Demo\PSpice\PDesign.exe upon installation.
- Download here!
- PSpice Tutorial
Integrated Circuit Data-Sheets
- Java Applets demonstrating most logical gates
- Texas Instruments and Harris Semiconductors' Data Sheet Search Engine
- Fairchild Semiconductors' Data Sheet Search Engine
- 74LS00, 74LS01, 74LS02, 74LS03, 74LS04, 74LS05, 74LS08, 74LS09, 74LS10, 74LS12, 74LS13, 74LS15, 74LS20, 74LS21, 74LS22, 74LS26, 74LS27, 74LS28, 74LS30, 74LS32, 74LS33, 74LS37, 74LS38, 74LS40, 74LS42, 74LS47, 74LS48, 74LS51, 74LS54, 74LS55, 74LS74, 74LS75, 74LS76, 74LS83, 74LS85, 74LS86, 74LS90, 74LS95, 74LS138, 74HCT240, 74LS243, 74HCT244, 74LS259, 74HCT541
- 9368
- 2114 1Kx4 RAM ( with timing information )
- Octal D-Flipflop (we do not have these chips in our current collection of chips)
Motorola 68HC11 Documentation
- A concise 2-page list of the Instructions and op-codes.
- A good tutorial on 6811 assembly language (pdf)
- 6811 FAQs.
- The official Motorola 68HC11A8 Data Sheet. Fairly cryptic...
- A Motorola 6811 Manual. It is a nicely written refresher on many concepts of assembly language applied to the 6811.
- Check Section 3.2 on addressing modes (inherent, direct, extended, indexed, relative).
- Get a refresher for the different instruction types (arithmetic, shifts, control, etc) in Section 3.4.
- The condition code register is covered in Section 3.5.
- M68HC11 Technical Reference, Motorola
- Section 6.5 shows the instructions in logical groups.
- M68HC11 Pocket Reference.
- Very useful, on Page 15, a list of all the opcodes supported by the 6811, in numerical (hex) order.
- 68HC11A8 Technical Reference: a hardware and engineering description. of the 6811, its ports, and how it operates.
- See Section 10 for a cycle-by-cycle description of the execution of each instruction.
- See Appendix A, Figure A-14 for the timing diagram of a typical (multiplexed expansion) memory access.
- Heathkit ETW3800 Trainer manual (pdf)
- Input/Output with the 6811: Memory-Mapped I/O (Heathkit documentation)
Back To Main Page