Membuat flowchart
2. Menentukan nilai maksimum dari 3 item data, misal ?
Nilai_1 = 74
Nilai_2 = 80
Nilai_3 = 79
#define MOUSE_READY 0xff
#define MOUSE_NOT_READY 0x00
#define MOUSE_SUCCESS 0x1f
#define MOUSE_FAILURE 0xff
#define MOUSE_LEFT_CLICK 0x01
#define MOUSE_RIGHT_CLICK 0x02
#define MOUSE_LEFT_BUTTON 0x00
#define MOUSE_RIGHT_BUTTON 0x01
#define UCHAR unsigned char
#define USHORT unsigned short int
class Mouse
{
private:
UCHAR button;
UCHAR isReady;
UCHAR clickMode;
USHORT x, y;
/* Mengetahui posisi koordinat pointer mouse */
void getMousePos(void);
public:
Mouse(void); /* Konstruktor default */
~Mouse(void); /* Destruktor default */
UCHAR getState(void);
UCHAR getNumButton(void);
UCHAR disableMouse(void);
void enableMouse(void);
/* Mendeteksi penekanan tombol mouse */
USHORT getButtonClick(UCHAR btn, USHORT maxclick);
/* Mendeteksi pelepasan tombol mouse */
USHORT getButtonRelease(UCHAR btn, USHORT maxrel);
/* Mengetahui klik kiri atau klik kanan setelah */
/* fungsi getMousePos dijalankan */
UCHAR getClickMode(void);
USHORT getX(void);
USHORT getY(void);
void hideMouse(void);
void showMouse(void);
/*Memindahkan pointer mouse di posisi tertentu */
void setMousePos(USHORT row, USHORT col);
/*Membatasi posisi koordinat mouse di layar */
void setMouseRegion(USHORT y1, USHORT x1,
USHORT y2, USHORT x2);
};
Mouse::Mouse(void)
{
UCHAR state, button;
asm mov ah, 0x00;
asm mov al, 0x00;
asm int MOUSE_INT;
asm mov state, al;
asm mov button, bl;
this->isReady = state;
this->button = button;
return;
}
Mouse::~Mouse(void)
{
return;
}
UCHAR Mouse::getState(void)
{
return this->isReady;
}
UCHAR Mouse::getNumButton(void)
{
return this->button;
}
UCHAR Mouse::disableMouse(void)
{
UCHAR state;
asm mov ah, 0x00;
asm mov al, 0x1f;
asm int MOUSE_INT;
asm mov state, al;
return state;
}
void Mouse::enableMouse(void)
{
asm mov ax, 0x0020;
asm int MOUSE_INT;
return;
}
USHORT Mouse::getButtonClick(UCHAR btn, USHORT maxclick)
{
USHORT click, nclick, x, y;
click = nclick = x = y = 0;
while (nclick < maxclick)
{
asm mov ah, 0x00;
asm mov al, 0x05;
asm mov bh, 0x00;
asm mov bl, btn;
asm int MOUSE_INT;
asm mov click, bx;
asm mov x, cx;
asm mov y, dx;
nclick += click;
}
this->y = y; this->x = x;
return click;
}
USHORT Mouse::getButtonRelease(UCHAR btn, USHORT maxrel)
{
USHORT rel, nrel, x, y;
rel = nrel = x = y = 0;
while (nrel < maxrel)
{
asm mov ah, 0x00;
asm mov al, 0x06;
asm mov bh, 0x00;
asm mov bl, btn;
asm int MOUSE_INT;
asm mov rel, bx;
asm mov x, cx;
asm mov y, dx;
nrel += rel;
}
this->y = y; this->x = x;
return rel;
}
void Mouse::getMousePos(void)
{
USHORT x, y;
UCHAR cmode;
asm mov ax, 0x0003; /* AH= 0, AL= 3, AX = 3 */
asm int MOUSE_INT;
asm mov x, cx;
asm mov y, dx;
asm mov cmode, bl;
this->y = y;
this->x = x;
this->clickMode = cmode;
return;
}
UCHAR Mouse::getClickMode(void)
{
this->getMousePos();
return this->clickMode;
}
USHORT Mouse::getX(void)
{
return this->x;
}
USHORT Mouse::getY(void)
{
return this->y;
}
void Mouse::hideMouse(void)
{
asm mov ax, 0x0002; /* AH = 0, AL = 2, AX = 2 */
asm int MOUSE_INT;
return;
}
void Mouse::setMousePos(USHORT row, USHORT col)
{
asm mov ax, 0x0004; /* AH = 0, AL = 4, AX = 4 */
asm mov cx, col;
asm mov dx, row;
asm int MOUSE_INT;
return;
}
void Mouse::setMouseRegion(USHORT y1, USHORT x1, USHORT y2, USHORT x2)
{
asm mov ax, 0x0007;
asm mov cx, x1;
asm mov dx, x2;
asm int MOUSE_INT;
asm mov ax, 0x0008;
asm mov cx, y1;
asm mov dx, y2;
asm int MOUSE_INT;
return;
}
void Mouse::showMouse(void)
{
asm mov ax, 0x0001;
asm int MOUSE_INT;
return;
}
#define KEY_BACKSPACE 0x08
#define KEY_RETURN 0x0d
#define KEY_TAB 0x09
#define KEY_SPACE 0x20
#define STATE_RSHIFT 0x01
#define STATE_LSHIFT 0x02
#define STATE_CTRL 0x04
#define STATE_ALT 0x08
#define STATE_SCROLL 0x10
#define STATE_NUM 0x20
#define STATE_CAPS 0x40
#define STATE_INS 0x80
#define NULL 0
#define TRUE 1
class Keyboard
{
private:
Screen *screen;
public:
Keyboard(Screen *scr);/* Konstruktor default */
~Keyboard(void); /* Destruktor default */
UCHAR getKey(void);
UCHAR getSpecialKey(void);
UCHAR *getString(UCHAR *str, UCHAR max);
UCHAR *getPwdString(UCHAR *pwd, UCHAR max);
UCHAR getKeyState(UCHAR key);
void hideCursor(void);
void showCursor(void);
};
Keyboard::Keyboard(Screen *scr)
{
this->screen = scr;
return;
}
Keyboard::~Keyboard(void)
{
return;
}
UCHAR Keyboard::getKey(void)
{
UCHAR key;
asm mov ah, 0x00;
asm int KEY_INT;
asm mov key, al;
return key;
}
UCHAR Keyboard::getSpecialKey(void)
{
UCHAR key;
asm mov ah, 0x00;
asm int KEY_INT;
asm mov key, ah;
return key;
}
UCHAR *Keyboard::getString(UCHAR *str, UCHAR max)
{
UCHAR key = 0;
UCHAR i, x, y;
i = 0;
while (TRUE)
{
asm mov ah, 0x00;
asm int KEY_INT;
asm mov key, al;
if ((key == KEY_BACKSPACE) && (i > 0))
{
this->screen->getCursorPos(&y, &x);
this->screen->setCursorPos(y, --x);
this->screen->writeChar(KEY_SPACE);
*(str + i) = NULL;
i--;
}
if ((key >= 32) && (key <= 126) && (i < max))
{
this->screen->getCursorPos(&y, &x);
this->screen->writeChar(key);
this->screen->setCursorPos(y, ++x);
*(str + i) = key; i++;
}
if ((key == KEY_TAB) && (i < max))
{
this->screen->getCursorPos(&y, &x);
this->screen->writeChar(KEY_SPACE);
this->screen->setCursorPos(y, ++x);
*(str + i) = KEY_SPACE; i++;
}
if (key == KEY_RETURN)
{
*(str + i) = NULL;
break;
}
if (i == max) *(str + i) = NULL;
}
return str;
}
UCHAR *Keyboard::getPwdString(UCHAR *pwd, UCHAR max)
{
UCHAR key, i, x, y;
key = i = 0;
while (TRUE)
{
asm mov ah, 0x00;
asm int KEY_INT;
asm mov key, al;
if ((key == KEY_BACKSPACE) && (i > 0))
{
this->screen->getCursorPos(&y, &x);
this->screen->setCursorPos(y, --x);
this->screen->writeChar(KEY_SPACE);
*(pwd + i) = NULL; i--;
}
if ((key >= 32) && (key <= 126) && (i < max))
{
this->screen->getCursorPos(&y, &x);
this->screen->writeChar('*');
this->screen->setCursorPos(y, ++x);
*(pwd + i) = key; i++;
}
if ((key == KEY_TAB) && (i < max))
{
this->screen->getCursorPos(&y, &x);
this->screen->writeChar('*');
this->screen->setCursorPos(y, ++x);
*(pwd + i) = KEY_SPACE; i++;
}
if (key == KEY_RETURN)
{
*(pwd + i) = NULL;
break;
}
if (i == max) *(pwd + i) = NULL;
}
return pwd;
}
UCHAR Keyboard::getKeyState(UCHAR key)
{
UCHAR state;
asm mov ah, 0x02;
asm int KEY_INT;
asm and al, key;
asm mov state, al;
return state;
}
void Keyboard::hideCursor(void)
{
asm mov ah, 0x01;
asm mov ch, 0x20;
asm mov cl, 0x00;
asm int VIDEO_INT;
return;
}
void Keyboard::showCursor(void)
{
asm mov ah, 0x01;
asm mov ch, 0x06;
asm mov cl, 0x07;
asm int VIDEO_INT;
return;
}
#define VIDEO_INT 0x16
class Screen
{
private:
UCHAR mode, row, col;
UCHAR rownum, colnum;
UCHAR active_page, visual_page;
UCHAR attribute;
public:
Screen(void); // Konstruktor default
Screen(UCHAR mode);
~Screen(void); // Desktruktor default
void setMode(UCHAR mode);
UCHAR getMode(void);
void setCursorPos(UCHAR y, UCHAR x);
void getCursorPos(UCHAR *y, UCHAR *x);
void writeChar(UCHAR letter);
void writeString(UCHAR *str);
void setAttribute(UCHAR attr);
UCHAR getCharAttr(UCHAR *attr);
void setActivePage(UCHAR page);
UCHAR getActivePage(void);
void setVisualPage(UCHAR page);
UCHAR getVisualPage(void);
void cls(void);
};
Screen::Screen(void)
{
UCHAR mode;
this->row = 0;
this->col = 0;
this->mode = mode = 0x03;
this->rownum = 25;
this->colnum = 80;
this->active_page = 0;
this->visual_page = 0;
this->attribute = 7;
asm mov ah, 0x00;
asm mov al, mode;
asm or al, 0x80;
asm int VIDEO_INT;
return;
}
Screen::Screen(UCHAR mode)
{
this->setMode(mode);
return;
}
Screen::~Screen(void)
{
return;
}
void Screen::setMode(UCHAR mode)
{
this->mode = mode;
this->active_page = 0;
this->visual_page = 0;
this->rownum = 25;
switch (mode)
{
case 0x00 :
case 0x01 : this->colnum = 40;
break;
case 0x02 :
case 0x03 :
case 0x07 : this->colnum = 80;
break;
default : this->colnum = 0;
break;
}
asm mov ah, 0x00;
asm mov al, mode;
asm or al, 0x80;
asm int VIDEO_INT;
return;
}
UCHAR Screen::getMode(void)
{
return this->mode;
}
void Screen::setCursorPos(UCHAR y, UCHAR x)
{
UCHAR page = this->active_page;
if ((y > this->rownum) || (x > this->colnum))
y = x = 0;
this->row = y;
this->col = x;
asm mov ah, 0x02;
asm mov bh, page;
asm mov dh, y;
asm mov dl, x;
asm int VIDEO_INT;
return;
}
void Screen::getCursorPos(UCHAR *y, UCHAR *x)
{
*y = this->row;
*x = this->col;
return;
}
void Screen::writeChar(UCHAR letter)
{
UCHAR page = this->active_page;
UCHAR attr = this->attribute;
asm mov ah, 0x09;
asm mov al, letter;
asm mov bh, page;
asm mov bl, attr;
asm mov ch, 0x00;
asm mov cl, 0x01;
asm int VIDEO_INT;
return;
}
void Screen::writeString(UCHAR *str)
{
for (; *str != '\0'; str++)
{
if (this->col > this->colnum)
{
this->row++;
this->col = 0;
}
this->setCursorPos(this->row, this->col);
this->writeChar(*str);
this->col++;
}
return;
}
void Screen::setAttribute(UCHAR attr)
{
this->attribute = attr;
return;
}
UCHAR Screen::getCharAttr(UCHAR *attr)
{
UCHAR page = this->active_page;
UCHAR letter, attribute;
asm mov ah, 0x08;
asm mov bh, page;
asm int VIDEO_INT;
asm mov attribute, ah;
asm mov letter, al;
this->attribute = *attr = attribute;
return letter;
}
void Screen::setActivePage(UCHAR page)
{
this->active_page = page;
return;
}
UCHAR Screen::getActivePage(void)
{
return this->active_page;
}
void Screen::setVisualPage(UCHAR page)
{
if (page > 7) page = 0;
this->visual_page = page;
asm mov ah, 0x05;
asm mov al, page;
asm int VIDEO_INT;
return;
}
UCHAR Screen::getVisualPage(void)
{
return this->visual_page;
}
void Screen::cls(void)
{
UCHAR mode = this->mode;
this->row = 0;
this->col = 0;
asm mov ah, 0x00;
asm mov al, mode;
asm int VIDEO_INT;
return;
}
tapi saya cuma punya SERIAL NUMBER PHOTODHOP CS5 doank sob :
1330-1953-8438-8500-7117-3533
1330-1158-3088-0438-6574-0867
1330-1361-6670-4304-7886-6688
1330-1241-0674-5648-4729-1904
1330-1397-1014-7571-2817-1355
1330-1250-9206-4495-3796-9368
1330-1331-8999-1502-9478-2917
1330-1281-8916-6015-7348-5124
1325-1558-5864-4422-1094-1126
1325-1958-5864-4422-1094-1178
1330-1615-1663-0498-6205-1791
1330-1953-8438-8500-7117-3533
1330-1158-3088-0438-6574-0867
1330-1229-6975-5285-6957-5367
1330-1979-8805-1771-3236-6920
1330-1412-8335-5009-5945-5806
1330-1273-0645-3090-0296-3987
1330-1707-7604-4076-3330-1320
1330-1126-8389-5347-7026-1516
1330-1438-4657-0503-2409-9339
1330-1178-1469-1838-5933-3301
1330-1892-3397-6011-5572-9542
1330-1839-2965-7190-2921-7032
1330-1634-5298-7483-7429-2348
1330-1182-4704-3825-8468-6637
1330-1239-8564-2010-9537-5618
1330-1327-3782-7399-1623-8098
1330-1517-3781-6362-7596-5660
1330-1784-8793-4389-9013-7031
1330-1634-1083-3217-5769-6738
1330-1230-2480-2284-9907-7831
1330-1985-9548-0538-9132-8266
1330-1860-3020-5244-9087-9860
1330-1303-4803-9383-5764-1887
1330-1917-9737-6056-2348-8338
1330-1529-0181-7064-0812-5708
1330-1490-3607-6017-1703-3666
1330-1952-3599-5063-6930-4999
1330-1118-2169-5554-5043-0261
1330-1110-9105-9055-3111-7284
1330-1685-9773-7697-3445-2035
1330-1533-0435-5877-8941-4272
1330-1999-4537-9060-0531-0793
1330-1034-4141-3047-8214-8252
1330-1929-6463-4119-2326-8897
1330-1476-0242-7221-7595-5287
1330-1741-0512-0515-6113-5177
1330-1908-9073-0059-2540-9960
1330-1747-1837-0235-2132-9526
1330-1797-0253-1334-7490-5663
1330-1733-4174-7963-6070-7017
1330-1956-5317-2294-1430-2819
1330-1429-9724-3330-8740-0962
1330-1033-6147-5059-6457-1125
1330-1222-8963-3991-7297-3163
1330-1171-1752-4071-7174-4921
1330-1675-2224-7908-0483-9470
1330-1751-3954-5932-4027-8369
1330-1902-1155-7486-5392-4937
1330-1884-7103-9750-5288-0745
1330-1564-6857-1825-4424-2580
1330-1181-2251-2391-0598-2720
1330-1811-7312-5925-0349-7885
1330-1175-1961-4193-2939-0377
1330-1639-2041-5770-5896-9616
1330-1639-2041-5770-5896-9616
1330-1369-9780-1730-5273-9901
1330-1477-8408-3494-0279-4881
1330-1628-4937-8926-0449-2395
1330-1231-4414-2502-0307-1737
1330-1650-4225-6586-8325-4296
1330-1936-0520-3608-5098-5953
1330-1749-9032-1249-1547-3573
1330-1598-6199-6204-1393-2297
1330-1017-4973-5979-4456-4318
1330-1449-8820-3304-4167-0326
1330-1449-5075-1278-6653-6706
1330-1721-2295-7818-1196-1795
1330-1686-9521-5292-4314-5234
1330-1577-6717-2644-0201-3452
1330-1812-9976-7376-3619-7788
1330-1693-6681-7992-6154-5305
1330-1330-9487-6863-3141-6995
1330-1855-5829-6260-5297-4791
1330-1398-9844-0655-1090-2029
1330-1766-1287-0374-6297-2066
1330-1487-3773-0966-8339-7892
1330-1435-2737-2654-1875-7391
1330-1712-3408-0762-3460-2988
1330-1965-3225-8133-6047-5198
1330-1231-8830-5523-9790-0894
1330-1976-5963-7054-5338-8058
1330-1191-8126-4409-3346-4556
1330-1473-1826-6761-9764-1274
1330-1999-1456-2136-0749-8980
1330-1808-5440-8189-7186-4422
1330-1660-6373-6657-7631-9650
1330-1585-7221-6639-0492-8474
1330-1698-1239-6948-3264-2220
1330-1339-8374-0034-0256-6069
1330-1215-4162-9040-0011-8986
1330-1834-9396-1592-0882-7648
1330-1498-9381-3923-2016-9256
1330-1432-2271-6065-1690-5810
1330-1275-2391-3950-5956-7695
1330-1735-0312-6215-8838-2642
1330-1005-0079-4254-1804-5011
1330-1564-3223-7938-1850-0010
1330-1037-5865-0090-5296-1619
1330-1865-7345-2740-3060-9465
1330-1790-6746-1637-9165-0104
1330-1467-6416-2434-4440-8899
1330-1592-0336-6692-2665-3687
1330-1938-2798-9581-5411-7269
1.Pertama buka foto yang mau diedit...
2.Duplikat layer background dengan menekan CTRL + J. dan buat layer baru , simpan diantara layer background dan layer1...
3.Klik Create a new group untuk membuat group layer , supaya gak binggung dan gak susah karena kita akan buat banyak layer nantinya , dan Drag layer 1 (foto duplikat ) ke group 1....
4.Buat 2 layer baru di group 1 , tempatkan di bawah layer 1 dua-dua nya...
5.Beri Clipping Mask di layer 1 ... caranya, tekan tombol ALT lalu arahkan mouse diantara layer 1 (foto) dan layer 4. Lalu klik, nanti keluar semacam tanda panah kebawah...
6.Buat Kotak dengan rectangle mdi layer 4 dan warnai dengan warna Hitam... lalu buat kotak lebih besar dari kotak pertama di layer 3, warnai dengan warna putih...
7.Klik kanan layer 3 atau layer kotak warna putih , klik blending option atau klik 2 kali layer 3 atau layer kotak warna putih. Setting seperti dibawah.. ini untuk membuat bayangannya.
-pilih drop shadow
lalu atur:
-opacity 80
-angle 120
-distance 3
-spread 0
-size 10
tekan ok...
8.Duplikat group 1 , caranya klik kanan group1 > Duplicate Group...
Klik layer kotak pertama , Sambil tekan tomlol CTRL klik layer kotak yang satu lagi, sehingga kedua layer kotak terseleksi...
Klik Move tool untuk menggeser kotak tadi , atau gunakan panah di keyboard , Putar dan resize bisa juga kok... di coba-coba aja... Tempatkan sesuai keinginan anda... kalo udah teken Enter...
9.Kalo udah selesai... Klik kanan lagi group 2 > duplicate Group
kasih nama jadi group 3 atau terserah anda , lalu geser kedua layer kotak yang ada di dalem group ke tempat yang diinginkan...
Sama seperti sebelumnya : Klik layer kotak pertama tekan CTRL klik layer kotak yang kedua , lalu geser dengan panah keyboard atau putar dan besar kecilkan sesuai keinginan anda...
Selamat Mencoba kawan...