yes i am using power c compiler
here is what i have so far
Code:
//#include "libepc.h"
#include "dos.h"
int main(void)
{
char attr1; // any floor unlit
char attr2; // any floor lit
union REGS r; //Holds register values for the bios services
int row =12; //Screen position
char ch; //Character entered by the user
// Set Video Mode
r.h.ah = 0x00; //set mode
r.h.al = 0x03; //mode 80 x 25 16 color
int86(0x10, &r, &r);
// create a solid rectangle using the block character
for(row = 0; row < 5; row++)
{
// SetCursorPosition
r.h.ah = 0x02; //service #
r.h.bh = 0x00; //display page 0
r.h.dh = row; //row #
r.h.dl = 11; //column #
// r.x.dx = 0x0c28; //12rd row 40th col
int86(0x10, &r, &r);
// Write some characters to screen
r.h.ah = 0x09; //write character
r.h.al = 0xDB; //solid bliock character to write
r.h.bh = 0x00; //display page 0
r.h.bl = 0x7E; //characters attribute
r.x.cx = 5; //repeat block 10 times
int86(0x10, &r, &r);
}
for(row = 0; row < 5; row++)
{
// SetCursorPosition
r.h.ah = 0x02; //service #
r.h.bh = 0x00; //display page 0
r.h.dh = row; //row #
r.h.dl = 17; //column #
// r.x.dx = 0x0c28; //12rd row 40th col
int86(0x10, &r, &r);
// Write some characters to screen
r.h.ah = 0x09; //write character
r.h.al = 0xDB; //solid bliock character to write
r.h.bh = 0x00; //display page 0
r.h.bl = 0x7E; //characters attribute
r.x.cx = 5; //repeat block 10 times
int86(0x10, &r, &r);
}
// create a solid rectangle using the block character
for(row = 0; row < 5; row++)
{
// SetCursorPosition
r.h.ah = 0x02; //service #
r.h.bh = 0x00; //display page 0
r.h.dh = row; //row #
r.h.dl = 23; //column #
// r.x.dx = 0x0c28; //12rd row 40th col
int86(0x10, &r, &r);
// Write some characters to screen
r.h.ah = 0x09; //write character
r.h.al = 0xDB; //solid bliock character to write
r.h.bh = 0x00; //display page 0
r.h.bl = 0x7E; //characters attribute
r.x.cx = 5; //repeat block 10 times
int86(0x10, &r, &r);
}
for(row = 0; row < 5; row++)
{
// SetCursorPosition
r.h.ah = 0x02; //service #
r.h.bh = 0x00; //display page 0
r.h.dh = row; //row #
r.h.dl = 29; //column #
// r.x.dx = 0x0c28; //12rd row 40th col
int86(0x10, &r, &r);
// Write some characters to screen
r.h.ah = 0x09; //write character
r.h.al = 0xDB; //solid bliock character to write
r.h.bh = 0x00; //display page 0
r.h.bl = 0x7E; //characters attribute
r.x.cx = 5; //repeat block 10 times
int86(0x10, &r, &r);
}
for(row = 0; row < 5; row++)
{
// SetCursorPosition
r.h.ah = 0x02; //service #
r.h.bh = 0x00; //display page 0
r.h.dh = row; //row #
r.h.dl = 35; //column #
// r.x.dx = 0x0c28; //12rd row 40th col
int86(0x10, &r, &r);
// Write some characters to screen
r.h.ah = 0x09; //write character
r.h.al = 0xDB; //solid bliock character to write
r.h.bh = 0x00; //display page 0
r.h.bl = 0x7E; //characters attribute
r.x.cx = 5; //repeat block 10 times
int86(0x10, &r, &r);
}
// get a keystroke from the user
r.h.ah = 0;
int86(0x16, &r, &r);
ch = r.h.al;
// SetCursorPosition(12,40);
r.h.ah = 0x02; //set curson postition
r.h.bh = 0x00; //display page 0
r.h.dh = 12;
r.h.dl = 40;
// r.x.dx = 0x0c28; //12rd row 40th col
int86(0x10, &r, &r);
// Write some characters to screen
r.h.ah = 0x09; //write character
r.h.al = ch; //character to write
r.h.bh = 0x00; //display page 0
r.h.bl = 0x71; //characters attribute
r.x.cx = 1; //repeat 'E' three times
int86(0x10, &r, &r);
// Wait for the user to enter a character
// (This just keeps the screen from scrolling up)
r.x.ax = 0x0100;
int86(0x21, &r, &r);
return 0 ;
}
having trouble creating location #'s for my boxes and creating a statement to light them up according to what floor its on