The BIOS Basic Input Output Services controls low level IO o

The BIOS (Basic Input Output Services) controls low level I/O on a computer. When a (PC) computer first starts up the system BIOS creates a data area starting at memory address 0 times 400 for its own use. Address 0 times 0417 is the Keyboard shift flags register, the bits of this byte have the following meanings: This byte can be written as well as read. Thus we may change the status of the CapsLock, NumLock and ScrollLock LEDs on the keyboard by setting or clearing the relevant bit. Write a C function using pointers and bit operators to turn Caps lock on without changing the other bits.

Solution

#include “dos.h”

void interrupt our();

void interrupt (*prev)();

char val scr = (char val )0xB8000000L;

main( )

{

unsigned long int val *p;

p = (char val )36;

prev = p;

p = our;

keep(0,500);

}

void interrupt our( )

{

int i;

for ( i = 0 ; i<= 3999 ; i = i + 2 )

{

if ( (scr + i) >= „A && (scr + i) <= „Z )

(scr + i) += 32;

if ( (scr + i) >= „a && (scr + i) <= „z )

(scr + i) - = 32;
}

(*prev)();

}

 The BIOS (Basic Input Output Services) controls low level I/O on a computer. When a (PC) computer first starts up the system BIOS creates a data area starting

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site