Project #09 ( Membuat Bingkai )
#include <conio.h> #include <dos.h> #include <stdio.h> #include <stdlib.h> #define VIDEO_INT 0x10 #define UCHAR unsigned char void setMode(UCHAR mode); void getCursorPos(UCHAR *y, UCHAR *x); void setCursorPos(UCHAR y, UCHAR x); void writeChar(UCHAR letter, UCHAR attr); void writeString(UCHAR *str, UCHAR attr); int main(void) { UCHAR baris, kolom; UCHAR pilih; setMode(3); setCursorPos(4, 4); writeChar(213, 0x17); setCursorPos(4, 74); writeChar(184, 0x17); setCursorPos(20, 4); writeChar(192, 0x17); setCursorPos(20, 74); writeChar(217, 0x17); for (baris = 5; baris < 20; baris++) { setCursorPos(baris, 4); writeChar(179, 0x17); setCursorPos(baris, 74); writeChar(179, 0x17); } for (kolom = 5; kolom < 74; kolom++) { setCursorPos(4, kolom); writeChar(205, 0x17); setCursorPos(20, kolom); writeChar(196, 0x17); } setCursorPos(4, 5); writeChar(181, 0x17); setCursorPos(4, 6); writeString(&qu