Sarfraz Ahmed
Sunday, March 12, 2017
Hardware Interrupts and TSR programs
The keyboard buffer
Keyboard Buffer
• Keyboard Buffer is located in BIOS Data Area.
• Starts at 40: IEH
• Ends at 40 : 3DH
• Has 32 byes of memory 2 bytes for each
character.
• Head pointer is located at address 40 : 1A to
40:IBH
• Tail pointer located at address 40 : IC to 40:IDH
The keyboard buffer is a memory area reserved in the BIOS data area. This area stores the
ASCII or special key codes pressed from the keyboard. It works as a circular buffer and
two bytes are reserved for each character, moreover 2 bytes are used to store a single
character. The first character stores the ASCII code and the second byte stores 0 in case
an ASCII key is pressed. In case a extended key like F1- F12 or arrow key is pressed the
first byte stores a 0 indicating a extended key and the second byte stores its extended key
code.
Circular buffer
40:1AH
40:1CH
40:1EH
Head Tail
40:3DH
The circular keyboard buffer starts at the address 40:1EH and contains 32 bytes. The
address 40:1AH stores the head of this circular buffer while the address 40:1CH stores the
tail of this buffer. If the buffer is empty the head and tail points at the same location as
shown in the diagram above.
Storing characters in the keyboard buffer
83
0
0
‘B’
0’
‘A’
0x20
0x21
0x22
0x23
Head = 0x24
0x1E
Tail
The above slide shows how characters are stored in the buffer. If ‘A; is to be stored then
the first byte in the buffer will store its ASCII code and the second will store 0, and if
extended key like DEL is to be stored the first byte will store 0 and the second byte will
store its scan code i.e. 83. The diagram also shows that head points to the next byte where
the next input character can be stored. Also notice that head contain the offset from the
address 40:00H and not from address 40:1EH. i.e. it contain 0x24 which is the address of
the next byte to be stored relative to the start of BIOS data area and not the keyboard
buffer.
The keyboard buffer
Keyboard Buffer
• Keyboard Buffer is located in BIOS Data Area.
• Starts at 40: IEH
• Ends at 40 : 3DH
• Has 32 byes of memory 2 bytes for each
character.
• Head pointer is located at address 40 : 1A to
40:IBH
• Tail pointer located at address 40 : IC to 40:IDH
The keyboard buffer is a memory area reserved in the BIOS data area. This area stores the
ASCII or special key codes pressed from the keyboard. It works as a circular buffer and
two bytes are reserved for each character, moreover 2 bytes are used to store a single
character. The first character stores the ASCII code and the second byte stores 0 in case
an ASCII key is pressed. In case a extended key like F1- F12 or arrow key is pressed the
first byte stores a 0 indicating a extended key and the second byte stores its extended key
code.
Circular buffer
40:1AH
40:1CH
40:1EH
Head Tail
40:3DH
The circular keyboard buffer starts at the address 40:1EH and contains 32 bytes. The
address 40:1AH stores the head of this circular buffer while the address 40:1CH stores the
tail of this buffer. If the buffer is empty the head and tail points at the same location as
shown in the diagram above.
Storing characters in the keyboard buffer
83
0
0
‘B’
0’
‘A’
0x20
0x21
0x22
0x23
Head = 0x24
0x1E
Tail
The above slide shows how characters are stored in the buffer. If ‘A; is to be stored then
the first byte in the buffer will store its ASCII code and the second will store 0, and if
extended key like DEL is to be stored the first byte will store 0 and the second byte will
store its scan code i.e. 83. The diagram also shows that head points to the next byte where
the next input character can be stored. Also notice that head contain the offset from the
address 40:00H and not from address 40:1EH. i.e. it contain 0x24 which is the address of
the next byte to be stored relative to the start of BIOS data area and not the keyboard
buffer.
|
|
|
Wondering how you can thank your child’s teachers and show your gratitude for everything they do? We asked teachers to tell us about their favorite gifts for Teacher Appreciation Week, holidays or the end of the school year. They provided these inspiring ideas!
“At our school they have a theme for each day of teacher appreciation week. They send a note home to let parents know what each day is and parents can send in the items if they wish. They have had: flowers (each child brings one flower or a bouquet to the teacher), snacks (lots of chocolate), cards (home made or bought), fruit, and other items.”
– Emily H.
– Emily H.
“I have been teaching for almost 30 years. It is always nice to be recognized on Teacher’s Appreciation Day. My favorite gifts were notes from children, but I also loved coffee gift cards, stickers, and spiral note books. A simple mug for coffee or even a passing ‘thank you’ would mean so much!”
– Sally H.
– Sally H.
“I am a huge coffee drinker, so students love to give me crazy coffee cups, and some give me gift certificates or cards to coffee places. I would love to have a gift card to get teaching supplies. I love Oriental Trading products for my classroom! One of the most unique gifts I received was a stationery card set that the student and mom made themselves with stamping kits. I also once received a stepping stone for my garden that the student and his mom painted and coated in sealant. That stone has been in my flower garden for three years now!”
– Sarah O.
– Sarah O.
“I have gotten personalized note pads or plants which have been nice. Gift cards of any kind are always welcome.”
– Pam B.
– Pam B.
“I have received many lovely gifts from my students. One of my favorites: a real apple. It is simple and sweet. Gift cards are great. A parent asked if she could purchase an item for the classroom in her son’s name.”
– Michelle A.
– Michelle A.
“I taught elementary for 39 years before retiring. In those years I received many gifts from my students and all the gifts were special. One that I remember receiving that was extra special was in my 6th year of teaching. This little girl was a 3rd grader and never would say anything but just smile at me. At Christmas time she came up to me and said, ‘I couldn’t get you a nice gift – this is all I can give you’ and she handed me a plate of homemade cookies and candy. I told her it was the best gift she could ever give me. I love homemade cookies and candy. I will always remember her.”
– Sharon K.
– Sharon K.
“I have to say that my favorite teacher appreciate week gift was a pedicure to my favorite spa. The student who gave it to me said that I am always on my feet and that I deserved a little ‘pampering!’ Too cute! This was definitely a memorable gift and a relaxing way to end the school year.”
– Erin C.
– Erin C.
“My favorite gift was from a kindergartner. The little boy observed other students bringing me Christmas gifts and putting them under the Christmas tree. He did not have a gift to bring, so somewhere he found some wrapping paper and wrapped up an old eraser he had. When he gave it to me, he was so proud! When I opened it, I told him how much I needed an eraser. I made sure he saw that I used it every day. What a gift from the heart!”
– Dianne P.
– Dianne P.
Looking for more ways to show teacher appreciation? Read our article,“Smart Ways to Show Teacher Appreciation”.
Fractions are an essential part of our math curriculum in third grade. While some students get the concept right away I had others that struggled with the mere concept of a fraction. That was until I added some fraction fun to our daily math routine. A few hands-on colorful ideas that are quick to prepare and easy to implement will have your students mastering fractions in no time.
What You’ll Need:
- Fraction Tiles Classpack
- Rainbow Candy
- Paint Chip Circles
- Black Baker’s Twine
- Hole Punch
- Black Marker
- Cloud Printable
To introduce fractions, I encouraged my students to explore with the Fraction Tiles. These colorful pie-shaped fractions easily create a whole circle in units from 1/2 to 1/10. This helped to model a clear picture as to which fraction is greater. 1/3 or 1/8. There were lots of discussions of pie, the yellow 1/4 was quickly identified as lemon, the pink 1/3 was strawberry and the blue 1/2 was of course blueberry. I asked my students, “Which piece of pie would you like to eat?”…”The biggest one of course,” they all replied.
My students partnered up to play a game of war with the fraction tiles. They would each grab a fraction piece from their pile and challenge their partner, whomever had the larger fraction got to keep the other person’s tile. This was a riot to watch! It started out slow and quickly ramped up as they started to identify which fractions were larger and how they compared to each other. I then showed my students how to create their own fraction circles using the colorful paint chip circles. They quickly knew just where to draw their lines by comparing them to the fraction circles.
After we practiced dividing the circles up into fractions my students were ready to create some rainbow fractions. I printed some adorable clouds and used black baker’s twine to attach them to the cloud. We created the cutest fraction rainbows that instantly brightened up our classroom walls.
To get started have students lay their paint chip circles out in rainbow order red-orange-yellow-green-blue-purple. Then start with one whole on the red circle, then 1/2, 1/3, 1/4,1/5 and 1/6. My students first drew their lines in pencil then traced over it with a black marker. Once they were done they hole punched them and strung them onto their clouds.
We hung these on our desks for a while. They were easy to reference and really helped students visualize each fraction as they compared them with their daily assignments. When they were no longer needed the clouds made a cute addition to our spring bulletin board.
For more practice with fractions we tried using rainbow candy . Each student took 8 pieces then sorted and counted the pieces. In their math journals they drew their candy and wrote the fraction for each color. For example, if 3 of the 8 pieces were red there were 3/8 red candies and so on. This part was a fun treat! My math super stars just loved a little hands-on fraction fun!
Teaching fractions doesn’t have to be a struggle. Try one of these colorful ideas and your students will master fractions in no time!
Subscribe to:
Posts (Atom)