What is System Programming? - PowerPoint PPT Presentation

About This Presentation
Title:

What is System Programming?

Description:

Keyboard LEDs 0 1 2 Scroll Lock LED Status byte Num Lock ... (*kbd )|0x70; puts( – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 13
Provided by: Drfar1
Category:

less

Transcript and Presenter's Notes

Title: What is System Programming?


1
Lecture 22
2
Keyboard writing Protocol
  • Wait till input buffer is full
  • Write on buffer
  • Wait till output buffer is full
  • Check the acknowledgement byte
  • Repeat the process if it was previously
    unsuccessful.

3
Command for writing Typematic rate
0xF3 Means Typematic rate will be sent in the
next byte.
4
Keyboard LEDs
LED Status byte
2 1 0
Scroll Lock
Num Lock
Caps Lock
LED Control byte 0xED
5
include ltdos.hgt include ltconio.hgt char st
80 int SendKbdRate(unsigned char data , int
maxtry) unsigned char ch do do chinport(0
x64) while (ch0x02) outport(0x60,da
ta) do ch inport(0x64) while
(ch0x01)
6
if (ch0xfa) puts("success\n") break
maxtry maxtry - 1 while (maxtry !
0) if (maxtry0) return 1 else return
0
7
void main () //clrscr() SendKbdRate(0xf3,3) Se
ndKbdRate(0x7f,3) gets(st) SendKbdRate(0xf3,3)
SendKbdRate(0,3) gets(st)
8
include ltbios.hgt include ltdos.hgt char st
80 unsigned char far kbd (unsigned
char far ) 0x00400017 int SendKbdRate(unsigned
char data , int maxtry) unsigned char
ch do do chinport(0x64) while
(ch0x02) outport(0x60,data)
9
do ch inport(0x64) while
(ch0x01) chinport(0x60) if (ch0xfa)
puts("success\n") break maxtry maxtry
- 1 while (maxtry ! 0) if
(maxtry0) return 1 else return 0
10
void main () //clrscr() SendKbdRate(0xed,3) Se
ndKbdRate(0x7,3) puts("Enter a string
") gets(st) kbd(kbd )0x70 puts("Enter a
string ") gets(st)
11
DMA Controller
Main Memory
I/O
Processor
DMA
12
DMA Interfacing
Write a Comment
User Comments (0)
About PowerShow.com