<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Samet Kilictas&#039;s Blog &#187; Samet</title>
	<atom:link href="http://samet.kilictas.com/tag/samet/feed/" rel="self" type="application/rss+xml" />
	<link>http://samet.kilictas.com</link>
	<description>J2E, PHP, Linux, PL/SQL and other random rants</description>
	<lastBuildDate>Sun, 06 Nov 2011 04:36:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Plenty of projects</title>
		<link>http://samet.kilictas.com/plenty-of-projects/</link>
		<comments>http://samet.kilictas.com/plenty-of-projects/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 15:56:54 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[Me]]></category>
		<category><![CDATA[Samet]]></category>
		<category><![CDATA[samet kilictas]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=192</guid>
		<description><![CDATA[Well, i am not sure if title is not ok with this post. It doesnt matter at all. This is a difficult part of my life i think. I am taking six diffrent courses at this semester and i got projects for each of them. Since i am working as a freelance php coder the [...]]]></description>
			<content:encoded><![CDATA[<p>Well, i am not sure if title is not ok with this post. It doesnt matter at all. This is a difficult part of my life i think. I am taking six diffrent courses at this semester and i got projects for each of them. Since i am working as a freelance php coder the whole day is not enough for my works. I can&#8217;t allocate sometime for myself, for my own.  Hope i will be ok at the and of the semester. Gonna try to share my projects in my blog if there will be some time.</p>
<p>Need a holiday&#8230;</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D192&count=vertical&related=&text=Plenty%20of%20projects' class='twitter-share-button' data-text='Plenty of projects' data-url='http://samet.kilictas.com/?p=192' data-counturl='http://samet.kilictas.com/plenty-of-projects/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/plenty-of-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Assembly Tutorials</title>
		<link>http://samet.kilictas.com/assembly-tutorials-program-controlling-dc-motor-and-stepper-motor-from-parallel-port/</link>
		<comments>http://samet.kilictas.com/assembly-tutorials-program-controlling-dc-motor-and-stepper-motor-from-parallel-port/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 01:06:33 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[cyprus international university]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[DC]]></category>
		<category><![CDATA[DC motor]]></category>
		<category><![CDATA[kilictas]]></category>
		<category><![CDATA[Motor]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[parallel port]]></category>
		<category><![CDATA[Samet]]></category>
		<category><![CDATA[samet kilictas]]></category>
		<category><![CDATA[show]]></category>
		<category><![CDATA[Stepper]]></category>
		<category><![CDATA[Stepper Motor]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[year]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=107</guid>
		<description><![CDATA[Here is myprojects during the course microprocessors.  Hope it will help you guys. Here you are can find following programs. Data and Time Showing Controlling DC Motor from/using parallel port Controlling Stepper Motor from/using parallel port #1 &#8211; Data and Time Showing ;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; ;&#8212; TERM PROJECT                      &#8212; ;&#8212; LECTURE: MICROPROCESSORS          &#8212; ;&#8212; LECTURER: HOSSEIN MEHRABANI       [...]]]></description>
			<content:encoded><![CDATA[<p>Here is myprojects during the course microprocessors.  Hope it will help you guys. Here you are can find following programs.</p>
<ul>
<li>Data and Time Showing</li>
<li>Controlling DC Motor from/using parallel port</li>
<li>Controlling Stepper Motor from/using parallel port</li>
</ul>
<p><strong>#1 &#8211; Data and Time Showing</strong></p>
<blockquote><p>;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
;&#8212; TERM PROJECT                      &#8212;<br />
;&#8212; LECTURE: MICROPROCESSORS          &#8212;<br />
;&#8212; LECTURER: HOSSEIN MEHRABANI       &#8212;<br />
;&#8212; CODED BY: SAMET KILICTAS          &#8212;<br />
;&#8212; STUDENT NUMBER: 20040283          &#8212;<br />
;&#8212; E-MAIL: SAMET@KILICTAS.COM        &#8212;<br />
;&#8212; CYPRUS INTERNATIONAL UNIVERSITY   &#8212;<br />
;&#8212; 26-05-2008                        &#8212;<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
;THE REQUIRED MACROS FOR PROGRAM&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
CURS_POSITION     MACRO ROW,COLUMN<br />
MOV BH,00<br />
MOV AH,02<br />
MOV DH,ROW<br />
MOV DL,COLUMN<br />
INT 10H<br />
ENDM<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
CLS_SCREEN MACRO<br />
MOV AX,0600H<br />
mov bh,00<br />
mov bh,0ah<br />
MOV CX,0<br />
MOV DX,184FH<br />
INT 10H<br />
ENDM<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
SHOW_INSCREEN MACRO STRING<br />
MOV AH,09<br />
MOV DX,OFFSET STRING</p></blockquote>
<p><span id="more-107"></span></p>
<blockquote><p>INT 21H<br />
ENDM<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
;PROGRAM STARTS FROM THIS POINT<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
.MODEL HUGE<br />
.STACK 9000<br />
.DATA<br />
Table DB &#8220;00$&#8221;,&#8221;01$&#8221;,&#8221;02$&#8221;,&#8221;03$&#8221;,&#8221;04$&#8221;,&#8221;05$&#8221;,&#8221;06$&#8221;,&#8221;07$&#8221;,&#8221;08$&#8221;,&#8221;09$&#8221;<br />
DB &#8220;10$&#8221;,&#8221;11$&#8221;,&#8221;12$&#8221;,&#8221;13$&#8221;,&#8221;14$&#8221;,&#8221;15$&#8221;,&#8221;16$&#8221;,&#8221;17$&#8221;,&#8221;18$&#8221;,&#8221;19$&#8221;<br />
DB &#8220;20$&#8221;,&#8221;21$&#8221;,&#8221;22$&#8221;,&#8221;23$&#8221;,&#8221;24$&#8221;,&#8221;25$&#8221;,&#8221;26$&#8221;,&#8221;27$&#8221;,&#8221;28$&#8221;,&#8221;29$&#8221;<br />
DB &#8220;30$&#8221;,&#8221;31$&#8221;,&#8221;32$&#8221;,&#8221;33$&#8221;,&#8221;34$&#8221;,&#8221;35$&#8221;,&#8221;36$&#8221;,&#8221;37$&#8221;,&#8221;38$&#8221;,&#8221;39$&#8221;<br />
DB &#8220;40$&#8221;,&#8221;41$&#8221;,&#8221;42$&#8221;,&#8221;43$&#8221;,&#8221;44$&#8221;,&#8221;45$&#8221;,&#8221;46$&#8221;,&#8221;47$&#8221;,&#8221;48$&#8221;,&#8221;49$&#8221;<br />
DB &#8220;50$&#8221;,&#8221;51$&#8221;,&#8221;52$&#8221;,&#8221;53$&#8221;,&#8221;54$&#8221;,&#8221;55$&#8221;,&#8221;56$&#8221;,&#8221;57$&#8221;,&#8221;58$&#8221;,&#8221;59$&#8221;<br />
mm  DB &#8220;:$&#8221;<br />
mm2  DB &#8220;/$&#8221;<br />
Date  DB &#8220;Date: $&#8221;<br />
Time  DB &#8220;   Time: $&#8221;<br />
Century DB &#8220;20$&#8221;<br />
CONSTANTV  DB 3<br />
MSG1 DB &#8216;PROJECT : DISPLAYING THE PROCESSORS DATE AND TIME ON MONITOR&#8217;,'$&#8217;<br />
MSG2 DB &#8216;LECTURE : MICROPROCESSORS [LECTURER : HOSSEIN MEHRABANI]&#8216;,&#8217;$&#8217;<br />
MSG3 DB &#8216;CODING  : SAMET KILICTAS [NO -&gt; 20040283] [CYPRUS INTERNATIONAL UNIVERSITY]&#8216;,&#8217;$&#8217;<br />
MSG4 DB &#8216;MOTOR STATUS :&#8217;,'$&#8217;<br />
MSG5 DB &#8216;PRESS H BUTTON FOR INSTRCONSTANTVTIONS&#8230;&#8217;,'$&#8217;<br />
MSG6 DB &#8216;DIRECTION :  ?&#8217;,'$&#8217;<br />
MSG7 DB &#8216;SPEED  : ?&#8217;,'$&#8217;<br />
MSG8 DB &#8216;EMAIL   : samet@kilictas.com&#8217;,'$&#8217;<br />
MSG9 DB &#8216;Good Bye..! <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &#8217;,'$&#8217;<br />
.CODE<br />
MAIN PROC<br />
MOV AX,@DATA<br />
PUSH AX<br />
POP DS</p>
<p>;**************************************************************************<br />
; Show main screen</p>
<p>MAINSCREEN:<br />
CLS_SCREEN<br />
CURS_POSITION 2,2<br />
SHOW_INSCREEN MSG1<br />
CURS_POSITION 3,2<br />
SHOW_INSCREEN MSG2<br />
CURS_POSITION 4,2<br />
SHOW_INSCREEN MSG3<br />
CURS_POSITION 5,2<br />
SHOW_INSCREEN MSG8</p>
<p>;**************************************************************************</p>
<p>CURS_POSITION 13,24<br />
SHOW_INSCREEN Date</p>
<p>MOV AH,04h  ; 04h function to get date information<br />
INT 1Ah</p>
<p>MOV AL,DL ; Here DL gives me the day information<br />
MUL CONSTANTV<br />
MOV DI,AX<br />
LEA DX,Table[DI]<br />
MOV AH,09h<br />
INT 21h</p>
<p>SHOW_INSCREEN mm2</p>
<p>MOV AH,04h  ; 04h function to get date information<br />
INT 1Ah</p>
<p>MOV AL,DH ; Here DH gives me the month information<br />
MUL CONSTANTV<br />
MOV DI,AX<br />
LEA DX,Table[DI]<br />
MOV AH,09h<br />
INT 21h</p>
<p>SHOW_INSCREEN mm2</p>
<p>SHOW_INSCREEN Century</p>
<p>MOV AH,04h  ; 04h function to get date information<br />
INT 1Ah</p>
<p>MOV AL,CL ; Here CL gives me the year information<br />
MUL CONSTANTV<br />
MOV DI,AX<br />
LEA DX,Table[DI]<br />
MOV AH,09h<br />
INT 21h</p>
<p>;**************************************************************************</p>
<p>SHOW_INSCREEN Time</p>
<p>MOV AH,2Ch  ; 2Ch function to get time information<br />
INT 21h</p>
<p>MOV AL,CH ; Here CH gives me the hour information<br />
MUL CONSTANTV<br />
MOV DI,AX<br />
LEA DX,Table[DI]<br />
MOV AH,09h<br />
INT 21h</p>
<p>SHOW_INSCREEN mm</p>
<p>MOV AL,CL ; Here CH gives me the minute information<br />
MUL CONSTANTV<br />
MOV DI,AX<br />
LEA DX,Table[DI]<br />
MOV AH,09h<br />
INT 21h</p>
<p>CURS_POSITION 50,15</p>
<p>;**************************************************************************</p>
<p>GOODBYE:<br />
MOV AH,4CH<br />
INT 21h<br />
MAIN ENDP<br />
END MAIN</p></blockquote>
<p><strong>#2 &#8211; Controlling DC Motor from/using parallel port</strong></p>
<blockquote><p>HOLD MACRO<br />
MOV AH,07<br />
INT 21H<br />
ENDM</p>
<p>WAY MACRO VALUE<br />
MOV DX,378H<br />
MOV AL,VALUE<br />
OUT DX,AL<br />
ENDM</p>
<p>CLR MACRO<br />
MOV AX,0600H<br />
MOV BH,00<br />
MOV BH,1fh<br />
MOV CX,0<br />
MOV DX,184fh<br />
INT 10H<br />
ENDM</p>
<p>CURSOR MACRO ROW,COLUMN<br />
MOV BH,00<br />
MOV AH,02<br />
MOV DH,ROW<br />
MOV DL,COLUMN<br />
INT 10H<br />
ENDM</p>
<p>DSPLY MACRO STRING<br />
MOV AH,09<br />
MOV DX,OFFSET STRING<br />
INT 21H<br />
ENDM</p>
<p>.MODEL SMALL<br />
.STACK 64<br />
.DATA</p>
<p>Message1 DB &#8216;CHOOSE AN OPTION&#8217;,'$&#8217;<br />
Message2 DB &#8216;DC MOTOR CONTROL&#8217;,'$&#8217;<br />
Message3 DB &#8216;PRESS G FOR TURN THE DC MOTOR TO Counter Clockwise&#8217;,'$&#8217;<br />
Message4 DB &#8216;PRESS D FOR TURN THE DC MOTOR TO Clockwise&#8217;,'$&#8217;<br />
Message5 DB &#8216;PRESS V FOR STOP THE DC MOTOR&#8217;,'$&#8217;<br />
Message6 DB &#8216;Choose an Operation from Menu&#8217;,'$&#8217;<br />
Message7 DB &#8216;Counter Clockwise&#8217;,'$&#8217;<br />
Message8 DB &#8216;Clockwise         &#8216;,&#8217;$&#8217;<br />
Message9 DB &#8216;Stopped      &#8216;,&#8217;$&#8217;</p>
<p>TurnRight EQU  00100101B<br />
TurnLeft  EQU  00011101B<br />
STOP  EQU  00001111B</p>
<p>.CODE</p>
<p>MAIN:<br />
here:    MOV AX,@DATA<br />
MOV DS,AX<br />
CALL Choice<br />
CMP AL,&#8217;g&#8217;<br />
CALL Left<br />
CMP AL,&#8217;d&#8217;<br />
CALL Right<br />
CMP AL,&#8217;v&#8217;<br />
CALL Away</p>
<p>Choice:<br />
CLR<br />
CURSOR 3,20<br />
DSPLY Message2<br />
CURSOR 6,10<br />
DSPLY Message3<br />
CURSOR 8,10<br />
DSPLY Message4<br />
CURSOR 10,10<br />
DSPLY Message5<br />
CURSOR 15,12<br />
DSPLY Message6<br />
HOLD<br />
RET</p>
<p>Left:<br />
CURSOR 17,12<br />
DSPLY Message7<br />
WAY TurnLeft<br />
CURSOR 19,12<br />
DSPLY Message1<br />
HOLD<br />
RET</p>
<p>Right:<br />
CURSOR 17,12<br />
DSPLY Message8<br />
WAY TurnRight<br />
CURSOR 19,12<br />
DSPLY Message1<br />
HOLD<br />
RET</p>
<p>Away:<br />
CURSOR 17,12<br />
DSPLY Message9<br />
CURSOR 21,12<br />
JMP quit<br />
RET</p>
<p>quit:    WAY STOP<br />
MOV AH,4CH<br />
INT 21H<br />
END MAIN</p></blockquote>
<p><strong>#3 &#8211; Controlling Stepper Motor from/using parallel port</strong></p>
<blockquote><p>;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
;&#8212; TERM PROJECT                      &#8212;<br />
;&#8212; STEPPER MOTOR WITH 7 SEGMENT      &#8212;<br />
;&#8212; LECTURE: MICROPROCESSORS          &#8212;<br />
;&#8212; LECTURER: HOSSEIN MEHRABANI       &#8212;<br />
;&#8212; CODED BY: SAMET KILICTAS          &#8212;<br />
;&#8212; STUDENT NUMBER: 20040283          &#8212;<br />
;&#8212; E-MAIL: SAMET@KILICTAS.COM        &#8212;<br />
;&#8212; CYPRUS INTERNATIONAL UNIVERSITY   &#8212;<br />
;&#8212; 26-05-2008                        &#8212;<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
;THE REQUIRED MACROS FOR PROGRAM&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
CURS_POSITION     MACRO ROW,COLUMN<br />
MOV BH,00<br />
MOV AH,02<br />
MOV DH,ROW<br />
MOV DL,COLUMN<br />
INT 10H<br />
ENDM<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
CLS_SCREEN MACRO<br />
MOV AX,0600H<br />
mov bh,00<br />
mov bh,0ah<br />
MOV CX,0<br />
MOV DX,184FH<br />
INT 10H<br />
ENDM<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
SHOW_INSCREEN MACRO STRING<br />
MOV AH,09<br />
MOV DX,OFFSET STRING<br />
INT 21H<br />
ENDM<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
PINS_OUT MACRO SEND<br />
MOV CX,SEND<br />
;AND CL,0fh<br />
;OR CL,CONSTANTBCD<br />
MOV DX,378H<br />
MOV AL,OFFSET SEND<br />
OUT DX,AL<br />
ENDM<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
;PROGRAM STARTS FROM THIS POINT<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
.MODEL HUGE<br />
.STACK 2000<br />
.DATA<br />
INSTMSG1 DB &#8216;INTRUCTIONS:&#8217;,'$&#8217;<br />
INSTMSG2 DB &#8216;SPEED UP: W&#8217;,'$&#8217;<br />
INSTMSG3 DB &#8216;SPEED DOWN: S&#8217;,'$&#8217;<br />
INSTMSG4 DB &#8216;FORWARD: D&#8217;,'$&#8217;<br />
INSTMSG5 DB &#8216;BACKWARD: A&#8217;,'$&#8217;<br />
INSTMSG6 DB &#8217;7 SEGMENT TEST: T BUTTON&#8217;,'$&#8217;<br />
INSTMSG7 DB &#8216;EXIT: E BUTTON&#8217;,'$&#8217;<br />
INSTMSG8 DB &#8216;PRESS B BUTTON TO MAIN MENU&#8217;,'$&#8217;<br />
INSTMSG9 DB &#8216;PAUSE: P&#8217;,'$&#8217;<br />
H_SYMBOL DB &#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8217;,'$&#8217;<br />
MSG1 DB &#8216;PROJECT : STEPPER CONTROLLER WITH 7 SEGMENT DISPLAY&#8217;,'$&#8217;<br />
MSG2 DB &#8216;LECTURE : MICROPROCESSORS [LECTURER : HOSSEIN MEHRABANI]&#8216;,&#8217;$&#8217;<br />
MSG3 DB &#8216;CODING  : SAMET KILICTAS [NO -&gt; 20040283] [CYPRUS INTERNATIONAL UNIVERSITY]&#8216;,&#8217;$&#8217;<br />
MSG4 DB &#8216;MOTOR STATUS :&#8217;,'$&#8217;<br />
MSG5 DB &#8216;PRESS H BUTTON FOR INSTRUCTIONS&#8230;&#8217;,'$&#8217;<br />
MSG6 DB &#8216;DIRECTION :  ?&#8217;,'$&#8217;<br />
MSG7 DB &#8216;SPEED  : ?&#8217;,'$&#8217;<br />
MSG8 DB &#8216;EMAIL   : samet@kilictas.com&#8217;,'$&#8217;<br />
MSG9 DB &#8216;Good Bye..! <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &#8217;,'$&#8217;<br />
MSG_DELETE DB &#8216;?                                 &#8216;,&#8217;$&#8217;<br />
MSG10 DB &#8217;7 SEGMENT TEST MODE: ?&#8217;,'$&#8217;<br />
MSG11 DB &#8216;ON &#8216;,&#8217;$&#8217;<br />
MSG12 DB &#8216;OFF&#8217;,'$&#8217;<br />
STARTED DB &#8216;RUNNING, PLEASE WAIT!&#8217;,'$&#8217;<br />
STOPPED DB &#8216;STOPPED!                &#8216;,&#8217;$&#8217;<br />
DIRECTION_FORWARD DB &#8216;Clockwise          &#8216;,&#8217;$&#8217;<br />
DIRECTION_BACKWARD DB &#8216;Counter Clockwise&#8217;,'$&#8217;<br />
DIRECTION_SIDE DB 1<br />
INTSCREEN_MODE DB 1                ; Default is forward<br />
COUNT DB 20 ; How many step u need ?????? <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
CONSTANTBCD DB 00010000B<br />
SHOWSPEED DB 0<br />
zero DB    &#8217;1 -&gt; 1000MS DELAY&#8217;,'$&#8217;<br />
one DB &#8217;2 -&gt; 800MS DELAY &#8216;,&#8217;$&#8217;<br />
two DB &#8217;3 -&gt; 700MS DELAY &#8216;,&#8217;$&#8217;<br />
three DB &#8217;4 -&gt; 600MS DELAY &#8216;,&#8217;$&#8217;<br />
four DB    &#8217;5 -&gt; 500MS DELAY &#8216;,&#8217;$&#8217;<br />
five DB    &#8217;6 -&gt; 400MS DELAY &#8216;,&#8217;$&#8217;<br />
six DB &#8217;7 -&gt; 300MS DELAY &#8216;,&#8217;$&#8217;<br />
seven DB &#8217;8 -&gt; 200MS DELAY &#8216;,&#8217;$&#8217;<br />
eight DB &#8217;9 -&gt; 100MS DELAY &#8216;,&#8217;$&#8217;<br />
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
.CODE<br />
MAIN:    MOV AX,@DATA<br />
MOV DS,AX</p>
<p>;*********************************<br />
; Show main screen</p>
<p>MAINSCREEN:<br />
CLS_SCREEN<br />
CURS_POSITION 2,2<br />
SHOW_INSCREEN MSG1<br />
CURS_POSITION 3,2<br />
SHOW_INSCREEN MSG2<br />
CURS_POSITION 4,2<br />
SHOW_INSCREEN MSG3<br />
CURS_POSITION 5,2<br />
SHOW_INSCREEN MSG8<br />
CURS_POSITION 12,2<br />
SHOW_INSCREEN MSG4<br />
CURS_POSITION 13,2<br />
SHOW_INSCREEN H_SYMBOL<br />
CURS_POSITION 14,2<br />
SHOW_INSCREEN MSG6<br />
CURS_POSITION 15,2<br />
SHOW_INSCREEN MSG7<br />
CURS_POSITION 16,2<br />
SHOW_INSCREEN MSG10<br />
CURS_POSITION 22,2<br />
SHOW_INSCREEN MSG5<br />
CURS_POSITION 30,2<br />
MOV INTSCREEN_MODE,1</p>
<p>;*****************************************************************<br />
; Important jump point is here **********************************</p>
<p>CHECKPOINT:</p>
<p>; Get input from the keyboard<br />
MOV AH,07<br />
INT 21H</p>
<p>; Save the input<br />
MOV BL,AL ; Save AL to BL (i.e. The Ascii value of the key hit)</p>
<p>; Check the input character ?????  What i should do ????<br />
CMP BL,&#8217;H'    ;H Button<br />
JNE H1<br />
JMP INSTSCREEN<br />
H1:    CMP BL,&#8217;h&#8217;<br />
JNE H2<br />
JMP INSTSCREEN<br />
H2:    CMP BL,&#8217;P'    ;P Button<br />
JNE P1<br />
JMP PAUSE<br />
P1:    CMP BL,&#8217;p&#8217;<br />
JNE P2<br />
JMP PAUSE<br />
P2:    CMP BL,&#8217;E'    ;E Button<br />
JNE E1<br />
JMP GOODBYE<br />
E1:    CMP BL,&#8217;e&#8217;<br />
JNE E2<br />
JMP GOODBYE<br />
E2:    CMP BL,&#8217;B'    ;B Button<br />
JNE B1<br />
JMP MAINSCREEN<br />
B1:    CMP BL,&#8217;b&#8217;<br />
JNE B2<br />
JMP MAINSCREEN<br />
B2:    CMP BL,&#8217;W'    ;W Button<br />
JNE W1<br />
JMP SPEEDUP<br />
W1:    CMP BL,&#8217;w&#8217;<br />
JNE W2<br />
JMP SPEEDUP<br />
W2:    CMP BL,&#8217;S'    ;S Button<br />
JNE S1<br />
JMP SPEEDDOWN<br />
S1:    CMP BL,&#8217;s&#8217;<br />
JNE S2<br />
JMP SPEEDDOWN<br />
S2:    CMP BL,&#8217;D'    ;D Button<br />
JNE D1<br />
JMP FORWARD<br />
D1:    CMP BL,&#8217;d&#8217;<br />
JNE D2<br />
JMP FORWARD<br />
D2:    CMP BL,&#8217;A'    ;A Button<br />
JNE A1<br />
JMP BACKWARD<br />
A1:    CMP BL,&#8217;a&#8217;<br />
JNE A2<br />
JMP BACKWARD<br />
A2:    CMP BL,&#8217;T'    ;T Button<br />
JNE T1<br />
JMP SEGMENTTEST<br />
T1:    CMP BL,&#8217;t&#8217;<br />
JNE M<br />
JMP SEGMENTTEST</p>
<p>; If no key exists jump to the mainscreen..!<br />
M:    JMP CHECKPOINT</p>
<p>;*********************************<br />
; Show instruction screen</p>
<p>INSTSCREEN:<br />
CLS_SCREEN<br />
CURS_POSITION 2,2<br />
SHOW_INSCREEN INSTMSG1<br />
CURS_POSITION 3,2<br />
SHOW_INSCREEN H_SYMBOL<br />
CURS_POSITION 4,2<br />
SHOW_INSCREEN INSTMSG2<br />
CURS_POSITION 5,2<br />
SHOW_INSCREEN INSTMSG3<br />
CURS_POSITION 6,2<br />
SHOW_INSCREEN INSTMSG4<br />
CURS_POSITION 7,2<br />
SHOW_INSCREEN INSTMSG5<br />
CURS_POSITION 8,2<br />
SHOW_INSCREEN INSTMSG6<br />
CURS_POSITION 9,2<br />
SHOW_INSCREEN INSTMSG7<br />
CURS_POSITION 10,2<br />
SHOW_INSCREEN INSTMSG9<br />
CURS_POSITION 15,2<br />
SHOW_INSCREEN INSTMSG8<br />
CURS_POSITION 50,50<br />
MOV INTSCREEN_MODE,2<br />
MOV AL,00<br />
JMP CHECKPOINT</p>
<p>;*********************************<br />
;All system paused</p>
<p>PAUSE:<br />
PINS_OUT 11110000B<br />
CURS_POSITION 16,25<br />
SHOW_INSCREEN MSG12<br />
CURS_POSITION 50,50<br />
JMP CHECKPOINT</p>
<p>;*********************************<br />
; Speed up</p>
<p>SPEEDUP:<br />
CMP SHOWSPEED,8<br />
JE NOG<br />
ADD SHOWSPEED,1<br />
NOG:    CMP SHOWSPEED,0<br />
JNE aaaa<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN zero<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,00010000B<br />
PINS_OUT 00010000B<br />
JMP NOU<br />
aaaa:    CMP SHOWSPEED,1<br />
JNE qqq<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN one<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,00100000B<br />
PINS_OUT 00100000B<br />
JMP NOU<br />
qqq:    CMP SHOWSPEED,2<br />
JNE www<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN two<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,00110000B<br />
PINS_OUT 00110000B<br />
JMP NOU<br />
www:    CMP SHOWSPEED,3<br />
JNE eee<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN three<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,01000000B<br />
PINS_OUT 01000000B<br />
JMP NOU<br />
eee:    CMP SHOWSPEED,4<br />
JNE rrr<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN four<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,01010000B<br />
PINS_OUT 01010000B<br />
JMP NOU<br />
rrr:    CMP SHOWSPEED,5<br />
JNE ttt<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN five<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,01100000B<br />
PINS_OUT 01100000B<br />
JMP NOU<br />
ttt:    CMP SHOWSPEED,6<br />
JNE yyy<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN six<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,01110000B<br />
PINS_OUT 01110000B<br />
JMP NOU<br />
yyy:    CMP SHOWSPEED,7<br />
JNE uuu<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN seven<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,10000000B<br />
PINS_OUT 10000000B<br />
JMP NOU<br />
uuu:    CMP SHOWSPEED,8<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN eight<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,10010000B<br />
PINS_OUT 10010000B<br />
NOU:<br />
JMP CHECKPOINT</p>
<p>;*********************************<br />
; Speed down</p>
<p>SPEEDDOWN:<br />
CMP SHOWSPEED,0<br />
JE NOGG<br />
SUB SHOWSPEED,1<br />
NOGG:    CMP SHOWSPEED,0<br />
JNE aaaaa<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN zero<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,00010000B<br />
PINS_OUT 00010000B<br />
JMP NOUU<br />
aaaaa:    CMP SHOWSPEED,1<br />
JNE qqqq<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN one<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,00100000B<br />
PINS_OUT 00100000B<br />
JMP NOUU<br />
qqqq:    CMP SHOWSPEED,2<br />
JNE wwww<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN two<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,00110000B<br />
PINS_OUT 00110000B<br />
JMP NOUU<br />
wwww:    CMP SHOWSPEED,3<br />
JNE eeee<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN three<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,01000000B<br />
PINS_OUT 01000000B<br />
JMP NOUU<br />
eeee:    CMP SHOWSPEED,4<br />
JNE rrrr<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN four<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,01010000B<br />
PINS_OUT 01010000B<br />
JMP NOUU<br />
rrrr:    CMP SHOWSPEED,5<br />
JNE tttt<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN five<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,01100000B<br />
PINS_OUT 01100000B<br />
JMP NOUU<br />
tttt:    CMP SHOWSPEED,6<br />
JNE yyyy<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN six<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,01110000B<br />
PINS_OUT 01110000B<br />
JMP NOUU<br />
yyyy:    CMP SHOWSPEED,7<br />
JNE uuuu<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN seven<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,10000000B<br />
PINS_OUT 10000000B<br />
JMP NOUU<br />
uuuu:    CMP SHOWSPEED,8<br />
CURS_POSITION 15,11<br />
SHOW_INSCREEN eight<br />
CURS_POSITION 50,50<br />
MOV CONSTANTBCD,10010000B<br />
PINS_OUT 10010000B<br />
NOUU:<br />
JMP CHECKPOINT</p>
<p>;*********************************<br />
; Show me the step pleasee&#8230;.</p>
<p>;Forward &#8212;<br />
STF:    MOV COUNT,20<br />
STEPSF:    CALL DELAY<br />
PINS_OUT 10100011B<br />
CALL DELAY<br />
PINS_OUT 11110110B<br />
CALL DELAY<br />
PINS_OUT 10101100B<br />
CALL DELAY<br />
PINS_OUT 11111001B<br />
DEC COUNT<br />
CMP COUNT,0<br />
JE F<br />
LOOP STEPSF<br />
F:    CURS_POSITION 12,18<br />
SHOW_INSCREEN STOPPED<br />
CURS_POSITION 14,15<br />
SHOW_INSCREEN MSG_DELETE<br />
CURS_POSITION 50,50<br />
JMP CHECKPOINT<br />
RET</p>
<p>;Backward &#8212;</p>
<p>STB:    MOV COUNT,20<br />
STEPSB:    CALL DELAY<br />
PINS_OUT 10111001B<br />
CALL DELAY<br />
PINS_OUT 11111100B<br />
CALL DELAY<br />
PINS_OUT 10110110B<br />
CALL DELAY<br />
PINS_OUT 11110011B<br />
DEC COUNT<br />
CMP COUNT,0<br />
JE B<br />
LOOP STEPSB<br />
B:    CURS_POSITION 12,18<br />
SHOW_INSCREEN STOPPED<br />
CURS_POSITION 14,15<br />
SHOW_INSCREEN MSG_DELETE<br />
CURS_POSITION 50,50<br />
JMP CHECKPOINT<br />
RET</p>
<p>;*********************************<br />
; System little forward please</p>
<p>FORWARD:<br />
MOV DIRECTION_SIDE,1<br />
CURS_POSITION 14,15<br />
SHOW_INSCREEN DIRECTION_FORWARD<br />
CURS_POSITION 12,18<br />
SHOW_INSCREEN STARTED<br />
CURS_POSITION 50,50<br />
CALL STF<br />
JMP CHECKPOINT</p>
<p>;*********************************<br />
; System little backward please</p>
<p>BACKWARD:<br />
MOV DIRECTION_SIDE,2<br />
CURS_POSITION 14,15<br />
SHOW_INSCREEN DIRECTION_BACKWARD<br />
CURS_POSITION 12,18<br />
SHOW_INSCREEN STARTED<br />
CURS_POSITION 50,50<br />
CALL STB<br />
JMP CHECKPOINT</p>
<p>;*********************************<br />
; Test the 7 segment display</p>
<p>SEGMENTTEST:<br />
PINS_OUT 10000000B<br />
CURS_POSITION 16,25<br />
SHOW_INSCREEN MSG11<br />
CURS_POSITION 50,50<br />
JMP CHECKPOINT</p>
<p>;*********************************<br />
; Delay routines &#8230;. which u need it fot stepper motor steps</p>
<p>DELAY:    CMP SHOWSPEED,0<br />
JNE aa<br />
MOV CX,65535<br />
JMP NO<br />
aa:    CMP SHOWSPEED,1<br />
JNE qq<br />
MOV CX,53032<br />
JMP NO<br />
qq:    CMP SHOWSPEED,2<br />
JNE ww<br />
MOV CX,46403<br />
JMP NO<br />
ww:    CMP SHOWSPEED,3<br />
JNE ee<br />
MOV CX,39774<br />
JMP NO<br />
ee:    CMP SHOWSPEED,4<br />
JNE rr<br />
MOV CX,33145<br />
JMP NO<br />
rr:    CMP SHOWSPEED,5<br />
JNE tt<br />
MOV CX,26516<br />
JMP NO<br />
tt:    CMP SHOWSPEED,6<br />
JNE yy<br />
MOV CX,19887<br />
JMP NO<br />
yy:    CMP SHOWSPEED,7<br />
JNE uu<br />
MOV CX,13258<br />
JMP NO<br />
uu:    CMP SHOWSPEED,8<br />
MOV CX,6629</p>
<p>NO:<br />
CALL WAITF<br />
RET</p>
<p>WAITF:    PUSH AX<br />
WAITF1:<br />
IN    AL,61H<br />
AND    AL,10H<br />
CMP    AL,AH<br />
JE    WAITF1<br />
MOV    AH,AL<br />
LOOP    WAITF1<br />
POP    AX<br />
RET<br />
SUB CX,CX<br />
RET</p>
<p>;*********************************<br />
; Print the good bye message</p>
<p>GOODBYE:<br />
CLS_SCREEN<br />
CURS_POSITION 15,25<br />
SHOW_INSCREEN MSG9<br />
CURS_POSITION 30,25<br />
PINS_OUT 11110000B<br />
MOV AH,4CH<br />
INT 21H<br />
END MAIN</p></blockquote>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D107&count=vertical&related=&text=Assembly%20Tutorials' class='twitter-share-button' data-text='Assembly Tutorials' data-url='http://samet.kilictas.com/?p=107' data-counturl='http://samet.kilictas.com/assembly-tutorials-program-controlling-dc-motor-and-stepper-motor-from-parallel-port/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/assembly-tutorials-program-controlling-dc-motor-and-stepper-motor-from-parallel-port/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Coding Guidelines For Developers</title>
		<link>http://samet.kilictas.com/coding-guidelines-for-developers/</link>
		<comments>http://samet.kilictas.com/coding-guidelines-for-developers/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 10:57:31 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Samet]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=62</guid>
		<description><![CDATA[@author andrej arn @author sam blume @version 4.6 updated 2005-11-24 Basically&#8230; we&#8217;d like to have a clean and professional, bug-free code. Most people have different coding styles. And most think that &#8220;the other style&#8221; is ugly. We don&#8217;t want to force you changing your style. Here is how we do it and like it: o) [...]]]></description>
			<content:encoded><![CDATA[<p><strong>@author andrej arn<br />
@author sam blume<br />
@version 4.6 updated 2005-11-24</strong></p>
<p>Basically&#8230;<br />
we&#8217;d like to have a clean and professional, bug-free code.<br />
Most people have different coding styles. And most think that<br />
&#8220;the other style&#8221; is ugly. We don&#8217;t want to force you changing<br />
your style. Here is how we do it and like it:</p>
<p>o) We use capital letters for constants. e.g. define(&#8216;CONSTANT&#8217;, 1).<br />
We also use the capital form of  TRUE, FALSE and NULL.<br />
This is true for PHP, note that javascript needs lowercase.</p>
<p>o) If a function is described to return bool, expect to get a real bool<br />
(TRUE/FALSE) and not an int (0/1). So please code your functions and<br />
methods that way.</p>
<p>o) Don&#8217;t trust the return values from php methods. If they are stated<br />
to return bool, they often return an int (0/1). So don&#8217;t directly<br />
return that from your functions, convert to (bool) if necessary.</p>
<p>o) Never ever use echo, print and die and the like inside your methods.<br />
Use return.</p>
<p>o) this applies also for white spaces. if you start your file with anything<br />
(an empty line) before the     considered as output. This makes header() calls impossible (cookie,<br />
session). The same applies for white spaces after the ?&gt; tag. take care!<br />
Even a newline is too much. This is a typical php newbie mistake.</p>
<p>o) Everything should be as os independant as possible. Including windows.</p>
<p>o) Make your code work with PHP version 4.3.0+ and 5.0.5+.<br />
Don&#8217;t support php3.</p>
<p>o) Make the php exam. Repeat it from time to time.</p>
<p>http://www.blueshoes.org/en/developer/syntax_exam/</p>
<p><span id="more-62"></span></p>
<p>o) Code object oriented. (PHP4)</p>
<p>o) Avoid setting vars in the global scope. If you need one, prefix it.<br />
Example: $GLOBALS['_Bs_MyClass_MyVar'] = &#8216;foo&#8217;;</p>
<p>o) Avoid using things from global scope inside methods. Instead &#8216;include&#8217;<br />
them in the constructor.</p>
<p>o) Prefix classes with Bs_. This is a poor man&#8217;s namespace.</p>
<p>o) Name your files like the classes: a class named &#8216;Bs_Something&#8217; will<br />
have the file name &#8216;Bs_Something.class.php&#8217;.</p>
<p>o) One class per file.</p>
<p>o) References:<br />
Don&#8217;t return temporaries by reference.<br />
function &amp;foo() {<br />
return new StdClass(); //this is wrong<br />
return $ret = new StdClass(); //this is wrong too</p>
<p>//this is wrong too. (it works at least in php 4.4.1,<br />
//but who knows, it&#8217;s inconsistent, so please don&#8217;t use it.)<br />
return $ret =&amp; new StdClass();</p>
<p>$ret =&amp; new StdClass(); return $ret; //this is right<br />
return FALSE; //this is wrong<br />
return $ret = FALSE; //this is wrong<br />
$ret = FALSE; return $ret; //this is right<br />
$classOne =&amp; new StdClass();<br />
$classTwo =&amp; new StdClass();<br />
return (true) ? $classOne : $classTwo; //this is wrong<br />
}<br />
$object =&amp; foo();</p>
<p>Don&#8217;t pass temporaries by reference:<br />
function foo(&amp;$param) {}<br />
foo(TRUE); //this is wrong<br />
$param = TRUE; foo($param); //this is wrong</p>
<p>//this is wrong. (it works, but who knows, it&#8217;s inconsistent,<br />
//so please don&#8217;t use it.)<br />
foo(new StdClass);</p>
<p>$param =&amp; new StdClass(); foo($param); //this is right</p>
<p>Also take care when encapsulating functions:<br />
function foo() { return new StdClass(); }<br />
function bar(&amp;$param) {}<br />
bar(foo()); //this is wrong<br />
$object = foo(); bar($object); //this is right</p>
<p>When you create a new instance of a class, *always* do it by reference:<br />
$object =&amp; new SomeClass();<br />
^&#8212;-&gt;this one<br />
This is *important*, *important*, *important*!!. Trust me. if you don&#8217;t,<br />
you will after having strange bugs in your code and not finding them<br />
for hours.<br />
Also read http://www.zend.com/manual/language.oop.newref.php please.</p>
<p>o) Please use the same coding style as it is already used, if you can.<br />
I know that changing your coding style is not easy if you&#8217;re used to<br />
something.</p>
<p>old: &#8211; a tab is 2 spaces<br />
new: &#8211; a tab is a tab, we set it to the width of 2, but feel free to<br />
configure your editor to show it as 3, 4, 8, whatever.</p>
<p>- A function is written like:<br />
function something(param, param) {<br />
//some code<br />
}</p>
<p>- An if statement is written like:<br />
if ($this == $that) {<br />
} elseif ($this &gt; $that) {<br />
} else {<br />
}</p>
<p>- Use spaces to separate:<br />
$x .= $y . &#8216;hello&#8217;;   instead of   $x.=$y.&#8217;hello&#8217;;<br />
exceptions are (for readability):<br />
- $array = array(&#8216;key&#8217;=&gt;&#8217;value&#8217;, &#8216;key2&#8242;=&gt;&#8217;value2&#8242;);<br />
- for ($i=1; $i&lt;=10; $i++) {<br />
- function myFunction($a=&#8217;default&#8217;, $b=&#8217;foobar&#8217;) {</p>
<p>o) Naming conventions:</p>
<p>- PHP itself is *very* inconsistent about the naming:<br />
isset() but is_string() =&gt; underscore or not,<br />
strtolower but bin2hex =&gt; to or 2,<br />
create_function but str_shuffle =&gt; verb object, object verb,<br />
strpos(haystack, needle) but in_array(needle, haystack) =&gt; order of param<br />
so let&#8217;s do it better.</p>
<p>- Use studly caps (first letter of each word capitalized (but not the<br />
first one), otherwise lower case, no underscores) for vars, functions<br />
(methods), lists, anything that needs a unique name.<br />
class names go like &#8216;Bs_SomeClass&#8217;.<br />
vars/functions/objects/db-names are started lowercase, class<br />
names/db-table names are started uppercase:<br />
$someVarName         instead of   $some_var_name<br />
someFunctionName()   instead of   some_function_name()<br />
SomeObject           instead of   some_object<br />
this especially also applies for short forms:<br />
$someDbTable         instead of   $someDBTable<br />
$someHtmlString      instead of   $someHTMLString</p>
<p>It is easier to read, and you can be sure how it was written. We think<br />
it&#8217;s better from experience. (An exception is the table field name/term<br />
ID because of a naming convention.)</p>
<p>Often it is hard to decide if a word is made up of multiple words.</p>
<p>These words are considered being one word, not two, and thus have<br />
no capital:<br />
- username  (not userName)<br />
- password  (not passWord)<br />
- blueshoes (not blueShoes)</p>
<p>These words are considered being two words and thus have a capital:<br />
- fileName (not filename)<br />
- passPhraze (not passphraze)<br />
- dateTime  (not datetime)</p>
<p>A few other writings:<br />
- email    (not eMail or so, because someEmail will work while<br />
someeMail or someEmail or someEMail would break the rules.)</p>
<p>Please avoid something like &#8216;$conn1&#8242; (&#8216;$conn2&#8242;, &#8216;$conn3&#8242; &#8230;) because<br />
you cannot see if it was $conn1 or $connl. See what i mean? (one or<br />
a small L, depending on the font)</p>
<p>- Don&#8217;t use the fancy way pdf2html. It&#8217;s kinda breaking the studly<br />
caps rule. it would be pdf2Html and then it&#8217;s not that readable<br />
anymore because both &#8217;2&#8242; and &#8216;H&#8217; are &#8220;upper case&#8221;. So always use<br />
pdfToHtml.</p>
<p>- Use verb object, not object verb. So makeObject(), not objectMake().</p>
<p>- If in doubt, use java syntax/style.</p>
<p>o) Learn the difference between == and === and != and !==. Read the manual<br />
and check http://www.blueshoes.org/en/developer/php_cheat_sheet/</p>
<p>o) Passing by reference: Our code needs to be compatible with PHP 4 and 5.<br />
PHP5 passes all objects by reference while PHP4 passes them by copy.<br />
To make both versions behave the same way, do the following:<br />
To pass by reference (99% of all cases):<br />
function foo(&amp;$theObject, $theInteger) {<br />
&#8230;<br />
}<br />
foo($someObject, 5);<br />
To pass by value (1% of all cases):<br />
function foo($theObject, $theInteger) {<br />
&#8230;<br />
}<br />
$copyOfObject = bs_clone($someObject);<br />
foo($copyOfObject, 5);</p>
<p>o) Private vars and methods start with an underscore.<br />
_foo is a private var, foo is a public var, _foo() is a private method<br />
and foo() a public one.</p>
<p>o) In your classes, define all your public and private class vars using<br />
var $something; or var $_something;<br />
even if you don&#8217;t set a default value. It will help maintaining the code.</p>
<p>o) Document while you code. Please document (phpdoc, like javadoc) your<br />
functions, classes, methods, even class vars. I know that coders are<br />
always in a hurry. But it will save a lot of time in the end!</p>
<p>It looks like this:<br />
/**<br />
* What the function does in one line.<br />
* Here goes some more detailed description on 0-n lines, if needed.<br />
* @access  [public|static|pseudostatic]<br />
* @param   [string|int|double|bool|array|object|mixed] $paramName desc<br />
* @return  datatype  description<br />
* @throws  [bs_exception|bool FALSE|NULL...]<br />
* @see     someFunction(), var someVar<br />
* @todo    description<br />
* @since   bs4.1, php4.3             (comma separated list)<br />
* @status  stable|experimental       (if not set then considered stable)<br />
* @pattern singleton|factory|mvc|observer|facade|&#8230;<br />
*/<br />
function something() {<br />
}</p>
<p>For variables the @var keyword is used instead of @param:<br />
/**<br />
* Some internally used var.<br />
* @access private<br />
* @var    bool $someStatus<br />
* @see    setSomeStatus()<br />
*/<br />
var $_someStatus = FALSE;</p>
<p>The description may include HTML, but please avoid it on the first line.</p>
<p>#@pattern singleton means that the constructor returns a reference<br />
#to an already existing instance, if there is one.</p>
<p>o) Write ecg classes for your code. They will serve other coders<br />
as examples and make the code more safe. Especially when it is<br />
installed on other os&#8217;es, when new php/apache/mysql/&#8230; versions come<br />
out etc. See naming for a definition of ecg.<br />
The classes are in subfolders named &#8216;ecg&#8217;, for an example have a look<br />
at core/util/ecg/Bs_String_PhpUnit.class.php</p>
<p>o) Don&#8217;t eat junk food and never drink Red Bull at night. Pizza is ok. <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>o) Don&#8217;t use underscores _ in databases (table names, field names).<br />
They are reserved for relations (foreign key by naming convention).<br />
Don&#8217;t use the numbers 2, 3 and 4 inside of db table names. They are<br />
reserved for the same reason.</p>
<p>o) Associative arrays are called &#8216;hash&#8217;, zero-based arrays are called<br />
&#8216;vector&#8217;. Please use these terms. Undefined arrays are called &#8216;array&#8217;.</p>
<p>o) Use the term &#8216;function&#8217; for &#8216;structured&#8217; procedural code. Use the term<br />
&#8216;method&#8217; for functions inside classes. Don&#8217;t use the terms &#8216;procedures&#8217;,<br />
&#8216;subs&#8217;, &#8216;routines&#8217; etc.<br />
sam: &#8220;methods are verbs, classes are substantives.&#8221; <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>o) When you return inside a switch or something, write the break too.<br />
example:<br />
switch ($x) {<br />
case &#8216;hello&#8217;:<br />
return TRUE;<br />
break;<br />
}<br />
This way it will be harder for someone to &#8216;implement&#8217; bugs into your code.</p>
<p>o) Avoid buggy code. For example if you&#8217;re not 100% sure that a var is<br />
an array, do is_array(), sizeOf($array) and such.</p>
<p>o) To be PHP4 compatible instead of using try-catch use the do-while(FALSE)<br />
try-catch code, something like:<br />
do { // try block<br />
$isOk = someFunction();<br />
if (!$isOk) break;<br />
$isOk = otherFunction();<br />
if (!$isOk) break;<br />
//&#8230;<br />
$isOk = TRUE; //everything worked<br />
} while (FALSE);<br />
if ($isOk) echo &#8216;yeah&#8217;;</p>
<p>o) Form your var declaration blocks etc in a nice way: (note the extra<br />
spaces)<br />
$a        = &#8216;hello&#8217;;<br />
$bbbb     = &#8216;world&#8217;;<br />
$cccccccc = &#8216;foobar&#8217;;</p>
<p>o) Mostly use foreach instead of while-list to loop arrays. See sam&#8217;s<br />
php-bench: http://www.blueshoes.org/en/developer/php_bench/</p>
<p>Note: there are also, and i like them (andrej)<br />
while (list($k,) = each($a)) {<br />
while (list(,$v) = each($a)) {</p>
<p>o) Magic_quotes_gpc was a good idea to prevent sql injection.<br />
Unfortunately this feature can be turned on or off, was on in<br />
previous PHP releases and is turned off by default now. This makes<br />
the situation for libraries and released software a lot harder<br />
which has to work with different configurations.<br />
Check your php.ini, look for &#8220;magic_quotes_gpc&#8221;. It<br />
should be set to Off, not On. (magic_quotes_gpc = Off)<br />
BlueShoes fixes this by checking magic_quotes_gpc, and if it is on,<br />
it goes and undo&#8217;es the changes in _REQUEST, _GET, _POST and _COOKIE<br />
see bs_undoMagicQuotes().<br />
Note that there is other software around that does the opposite.</p>
<p>o) Make sure your code runs error free even if warnings and notices are<br />
enabled.</p>
<p>o) Use the new superglobals (_GET, _POST etc), make sure your code works<br />
if register_globals turned off. And we highly recommend to set<br />
register_globals to off.</p>
<p>o) JavaScript classes are named like in php, for example<br />
&#8220;Bs_FormFieldSelect.class.js&#8221;. If it&#8217;s a lib then it goes like<br />
Bs_FormFieldSelect.lib.js. A lib is simply a collection of functions<br />
for a special task, so not oo-code.</p>
<p>o) If you change something in code someone else maintains (and/or you&#8217;re<br />
not in the @author of the class or the function) then add your comments<br />
along with the date and your name, example:<br />
someCode(); //i did this because of that. 2002/10/16 &#8211;yourname</p>
<p>o) Don&#8217;t add email addresses in plain text. Even the phpdoc comments in<br />
the code get indexed, and thus could be spidered by email crawlers.<br />
Please use &#8220;&#8221; which makes it a bit harder to parse.</p>
<p>o) Naming (Glossary)</p>
<p>ecg          ElectroCardioGram<br />
In the code base you&#8217;ll find many subdirectories with that<br />
name. There are php code files that test our code. we<br />
thought calling them just &#8216;test&#8217; would not give them the<br />
honor they deserve, and prolly someone would just delete<br />
them. The ecg tests show a sysadmin very fast what&#8217;s not<br />
working (anymore) on his system, for example after the<br />
installation or after a php upgrade or whatever.</p>
<p>whtml        wysiwyg html. It&#8217;s a mime type in blueshoes. It means that<br />
the block [part] may be edited using wysiwyg. So it&#8217;s not<br />
xml compliant. A synonym would be &#8220;crappy html&#8221;.</p>
<p>URL: (see Bs_Url.class.php and its methods)<br />
scheme://user:pass@host:port/path?query#fragment<br />
example: url https://bill:gates@order.blue-shoes.com:81/forms/<br />
form.php?lang=fr&amp;sid=456456#address<br />
scheme     = https<br />
host       = order.blue-shoes.com<br />
port       = 81<br />
user       = bill<br />
pass       = gates<br />
path       = /forms/form.php<br />
query      = lang=fr&amp;sid=456456<br />
fragment   = address<br />
domain     = blue-shoes.com<br />
directory  = /forms/<br />
file       = form.php</p>
<p>xpv stands for xPointer vector. Match always returns an array, so xp<br />
is always an array, maybe an empty one.</p>
<p>UID          Unified ID.</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D62&count=vertical&related=&text=Coding%20Guidelines%20For%20Developers' class='twitter-share-button' data-text='Coding Guidelines For Developers' data-url='http://samet.kilictas.com/?p=62' data-counturl='http://samet.kilictas.com/coding-guidelines-for-developers/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/coding-guidelines-for-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Frame by Frame Diving</title>
		<link>http://samet.kilictas.com/frame-by-frame-diving/</link>
		<comments>http://samet.kilictas.com/frame-by-frame-diving/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 04:31:43 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[MPEG]]></category>
		<category><![CDATA[Samet]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=57</guid>
		<description><![CDATA[This picture is taken by Tom.Lechner&#8217;s photostream from flickr. I think this is an amazing picture. Go ahead an check the link to see big version Tweet]]></description>
			<content:encoded><![CDATA[<p>This picture is taken by <a id="contextLink_stream24073985@N07" class="currentContextLink" href="http://www.flickr.com/photos/tomlechner/">Tom.Lechner&#8217;s photostream</a><span class="currentContextLink"> from flickr. I think this is an amazing picture. Go ahead an check the link to see big version<br />
</span></p>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/2559243354_ecdd43b25e.jpg"><img class="alignnone size-medium wp-image-58" title="2559243354_ecdd43b25e" src="http://samet.kilictas.com/wp-content/uploads/2008/06/2559243354_ecdd43b25e-238x300.jpg" alt="" width="238" height="300" /></a></p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D57&count=vertical&related=&text=Frame%20by%20Frame%20Diving' class='twitter-share-button' data-text='Frame by Frame Diving' data-url='http://samet.kilictas.com/?p=57' data-counturl='http://samet.kilictas.com/frame-by-frame-diving/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/frame-by-frame-diving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TDFSB 3D File Browser</title>
		<link>http://samet.kilictas.com/tdfsb-3d-file-browser/</link>
		<comments>http://samet.kilictas.com/tdfsb-3d-file-browser/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 16:30:36 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[MP3]]></category>
		<category><![CDATA[MPEG]]></category>
		<category><![CDATA[Samet]]></category>
		<category><![CDATA[TDFSB]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=28</guid>
		<description><![CDATA[Here is a new nice project i&#8217;ve just heard about TDFSB&#8230;. Which reads directory information and displays it as a 3D world. cd’ing into another directory is possible by simply walking into the assigned sphere. It also reads images and text files and displays their contents. It plays MP3 files and MPEG-1 videos as 3D [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a new nice project i&#8217;ve just heard about TDFSB&#8230;. Which reads directory information and displays it as a 3D world. cd’ing into another directory is possible by simply walking into the assigned sphere. It also reads images and text files and displays their contents. It plays MP3 files and MPEG-1 videos as 3D objects.</p>
<p style="text-align: center;"><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/screenshot1.png"><img class="alignnone size-medium wp-image-29" title="screenshot1" src="http://samet.kilictas.com/wp-content/uploads/2008/06/screenshot1-300x223.png" alt="" width="300" height="223" /></a></p>
<p>Shortly, it is a 3D world inside your pc. This is really nice and interesting tool for your boring pc. Just imagine.. you can fly between your files.. your documents.. even your pictures..</p>
<p>This project came to me with really nice ideas. I am glad to talk about TDFSB because it has been coded 6 years ago. A developer [Leander Seige - i hope this is true] coded this tools with simple code in first time. But now just take a look at it. He and some other developers are came with new ideas.</p>
<p style="text-align: center;"><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/screenshot2.png"><img class="alignnone size-medium wp-image-30" title="screenshot2" src="http://samet.kilictas.com/wp-content/uploads/2008/06/screenshot2-300x216.png" alt="" width="300" height="216" /></a></p>
<p>I have run this tool with my system which is Ubuntu Hardy 8.04 and of course to run TDFSB nicely, you gonna need a hardware accelerated 3d graphic card. While walking arround your documents you can also listen mp3s or you can watch some of your video files.</p>
<p><span id="more-28"></span></p>
<p>As i mentioned in the beginning part of my post  this tools gave me a couple of nice ideas. Since companies are producing more efficient graphic cards and CPU&#8217;s .. i am just asking that why there is no 3D browser for real..</p>
<p style="text-align: center;"><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/screenshot3.png"><img class="alignnone size-medium wp-image-33" title="screenshot3" src="http://samet.kilictas.com/wp-content/uploads/2008/06/screenshot3-300x223.png" alt="" width="300" height="223" /></a></p>
<p style="text-align: center;"><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/screenshot4.png"><img class="alignnone size-medium wp-image-34" title="screenshot4" src="http://samet.kilictas.com/wp-content/uploads/2008/06/screenshot4-300x220.png" alt="" width="300" height="220" /></a></p>
<p>Of course TDFSB comes with some bad sides such as;</p>
<ol>
<li>Not very practical</li>
<li>Bad graphics</li>
<li>Few video file type support</li>
<li>Big work load on CPU</li>
<li>Over 1000 files, really long warping time</li>
<li>Bad accesibility</li>
<li>some more&#8230;..</li>
</ol>
<p>There are many good sides as well. <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: center;"><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/screenshot5.png"><img class="alignnone size-medium wp-image-35" title="screenshot5" src="http://samet.kilictas.com/wp-content/uploads/2008/06/screenshot5-300x219.png" alt="" width="300" height="219" /></a></p>
<p><span style="text-decoration: underline;"><strong>How to install</strong></span></p>
<p>It is really simple.</p>
<blockquote><p><strong><span style="color: #888888;">sudo apt-get install tdfsb</span></strong></p></blockquote>
<p>Just run this command on terminal.</p>
<p>There you go&#8230;</p>
<p>Now you are able to run this tool by using the termianal. Type tdfsb in terminal and enjoy..</p>
<p>Here is a print out of the default keyboard settings.<br />
You may change these by editing ~/.tdfsb</p>
<p>=======================================</p>
<p><span style="color: #888888;">Esc           quit                  F1/F2    speed +/-<br />
Mouse move    look          F3/F4      rot +/-<br />
UP         forward               F5/F6  ball detail<br />
DOWN      backward          HOME     start pos<br />
L/R     step aside             LMB  select object<br />
END    ground zero          +RMB|CTRL appr.obj<br />
F7/F8  max fps  +/-          +ENTER ply mpg/mp3<br />
&#8220;t&#8221;      filenames               &#8220;g&#8221;   ground cross<br />
&#8220;c&#8221;      crosshair                 &#8220;d&#8221;        display<br />
&#8220;.&#8221;      dot files                    &#8220;p&#8221;      print FPS<br />
&#8220;r&#8221; rel./get mouse              &#8220;f&#8221;     fullscreen<br />
&#8220;l&#8221;     reload dir                  &#8220;b&#8221;   image bricks<br />
&#8220;u&#8221;           cd..                   &#8220;a&#8221;      alphasort<br />
&#8220;m&#8221;        shading               &#8221; &#8220;         flying<br />
&#8220;h&#8221;      show help               &#8220;i&#8221;  print GL info<br />
&#8220;0&#8243;      jump home            &#8220;o&#8221;    classic nav<br />
&#8220;s&#8221;    save config               &#8220;#&#8221;   fps throttle</span></p>
<p><span style="color: #888888;">&#8220;1|3|q|e&#8221;            Up|Down|Left|Right<br />
&#8220;2|w&#8221;                  Forward|Backward<br />
PgUp/Down or MMB+Mouse move up/downward</span><br />
=======================================</p>
<p>it is possible to execute a custom command from within tdfsb. configure<br />
your command in the config file! the command can be called by pressing<br />
the tabulator key. put a &#8220;%s&#8221; in the command line, this will be replaced<br />
by the current directory or selected file.<br />
for instance if you set the command to<br />
xmms &#8220;%s&#8221; &amp;<br />
and press tab from a directory, xmms will be started with the directory<br />
given as argument.<br />
if you select an audio file and press the tab key xmms will play the file.<br />
the default command is<br />
cd &#8220;%s&#8221;; xterm&amp;<br />
it will open a xterm in the current directory.<br />
this command is always present by pressing shift+tab!<br />
so you have two commands:<br />
- one by configuring your custom command for the tab key<br />
- one by pressing shift+tab, it will execute the built in xterm call<br />
but dont forget the quotation marks!<br />
you are free to not add &#8220;%s&#8221; to your custom command if you just<br />
want to launch any program. but if you do so, you can customize<br />
tdfsb for your needs, choose a certain kind of files and than launch<br />
emacs for editing text files, mplayer for playing avis or whatever&#8230;</p>
<p>Have Fun&#8230;</p>
<p><a href="http://www.determinate.net/webdata/seg/tdfsb.html">Project Web Site</a></p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D28&count=vertical&related=&text=TDFSB%203D%20File%20Browser' class='twitter-share-button' data-text='TDFSB 3D File Browser' data-url='http://samet.kilictas.com/?p=28' data-counturl='http://samet.kilictas.com/tdfsb-3d-file-browser/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/tdfsb-3d-file-browser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Message from me</title>
		<link>http://samet.kilictas.com/message-from-me/</link>
		<comments>http://samet.kilictas.com/message-from-me/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 22:29:22 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Me]]></category>
		<category><![CDATA[Samet]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=26</guid>
		<description><![CDATA[Hayat uzun bir yolculuktur aslında.Gittigin zamanları geri alamaz, bir sonraki filmin en güzel sahnelerini bir saniye öne alamazsın..Sadece sana sunulan hediyeyi zamanın altın tepsisinde nefes alarak yasarsın.Bu bazen hüzünlü bir öyküdür bazen ise mutluluk masaldır yasadıkların..tek degisen nefesinin kalbine bıraktıgı renktir .bu hayat yolculugunda binlerce kalp tanırsın kah hüzünlü kah karamsar bazıları ise gamsız kedersiz [...]]]></description>
			<content:encoded><![CDATA[<p>Hayat uzun bir yolculuktur aslında.Gittigin zamanları geri alamaz, bir sonraki filmin en güzel sahnelerini bir saniye öne alamazsın..Sadece sana sunulan hediyeyi zamanın altın tepsisinde nefes alarak yasarsın.Bu bazen hüzünlü bir öyküdür bazen ise mutluluk masaldır yasadıkların..tek degisen nefesinin kalbine bıraktıgı renktir .bu hayat yolculugunda binlerce kalp tanırsın kah hüzünlü kah karamsar bazıları ise gamsız kedersiz bazıları senin gibi meleksi kalbli insan suretindeki periler..)</p>
<p>Dogan günes herkese farklı bir hediye sunar hüzünlerde mutluluklar verir ya da mutlulkukların icinde acıyı tattırır sana..ne mutluluklarını elinden kacır ne de acılarına boynu bük..Bazen hüzünlerinin kalbine yansıyan zamanında; acı bir sızıya gözbeklerindeki masum gözyasları eşlik eder; bazen de mutluluklarının resmine renk renk cicek hükmündeki gülüşlerin eklenir..</p>
<p><span id="more-26"></span></p>
<p>Her cicekte sana sunulmak üzere bir mutluluk vardır.Acelyaların mutlulukları, güllerin tatlı sevgisi ve lalerin ise gülüşleri vardır senin kalbini bekleyen..Onlar senin hediyelerindir.Seni aramazlar sen bulmasın onları&#8230;</p>
<p>Bu hayat yolcugunda gittgin yer önemli degildir aslında; sadece bu yolculuktaki sonsuz beklentilerindir önemli olan..kazandıkların, her zaman kaybettiklerinden cok olmalı ;mutlulukların ise hüzünlere her zaman galip olarak ayrılmalı..ögrendigin güzellikler, kaybettigin hüzünleri aratmayacak olmalı..Yüzündeki gülüşler gecmiste acılara hediye ettigin gözyaslarından daha güzeldir..Farklı bir zamanda farklı sabahlara uyanacaksın..</p>
<p>Hayat bir sınavdır.kaybedeni cok kazanını ise cok az ama sen her zaman kazanacaksın bu gözlerindeki yasama sevinciyle dolu iken..belki de bu sınavın ödülü senin gülüşlerindir &#8230;Acıların hüzünleri ve sevinclerin senin hayattan kazandırlarındır.Acılarda gözyası keder cekerken bunu nasıl kazanc olarak görürüm kalbime dersen sana cevabım ; hüzünlerindeki gözyasların yarınlarındaki mutlulukların habericisidir aslında&#8230;gözyasların ıslaktır ama bil ki yarınlarındaki mutlulukların günes kadar sıcak olacaktır. Yalnızlıkların ve dertlerin her zaman siyah ve soguktur .Ama gelecekteki bir gün ( bu gün belki de yarından önce bu gece de olabilir) yasayacıgın mutlulukların ne kadar rengarenk ve de ne kadar samimi oldugu ve gözlerin ne kadar ısıl ısıl parladagına sende sasıracaksın.icinde o kadar samimi mutluluklar var ki saklı kalan..Onlar bi gün bir yerde tam senin ihtiyac anında avuclarında olacaktır..</p>
<p>Dikenler her zaman güllerle anılacaktır&#8230;Gülü koprarırken dikeni senin avuclarrını kanatsa da bir süre sonra güllün bülbülün bile övdügü büyüsüne kapılacaktır yüregin..Aynı gül misali gibi kelebek ömürlü hüzünlerinde gözbebeklerinden süzülen gözyaslarını silerken o gözyaslarının bir gün sana binlerce mutluluklarınla avucları süzülecegini bilmek ne güzeldir degil mi ?</p>
<p>Yasadıgın dakikalar aslında bir kalemdir kalemin rengi senin kalbindeki hayata baktıgın pencerenin hangi rengin icinde boyandıgına baglı..Hayatının beyaz defterinin satır aralarına bazen buruk ama umutlu yalnızlıklarını yazacaksın bazen de mutlulukların güzel anlarına gülüşlerin en güzel rengini cizeceksin..ve de acılarının dayanılmaz yükünü yazarken satırlara belki gözbebeklerinin masum gözyaslarını eklenecektir ıslak ıslak..</p>
<p>Eger sen gözlerini kaptatırsan günese..dünyanın en güzel renklerini bir anda elinin tersiyle itersin ama sen gözlerin kapalıyken günes her zaman ısıklarıyla insanlara aydınlı olmaya ve de umut dağıtmaya devam edecektir.Eger sen gözlerindeki mutlulukları değerini bilmeden acılara boyun bükersen hayat her ne kadar etrafına mutluluk perilerini de yollasa sen her zaman yalnızlıgın kahırlı sokaklarında gözyaslarnla dolasırsın&#8230;</p>
<p>Hayatının her dakikasında dünyayın tüm mutlulukların en güzel renkleri elllerine cicek buketi olarak verilsin..Yarınlarındaki umutların ise nakıs nakıs kalbine armagan edilsin Sakın unutma: hayat seninle güzel ve kısa ama hayatın en güzel yanı kısa zamanda en güzel mutlulukları tadma sansın var.Bu sans senin elinde..Bu sans senin gözbebeklerin icindeki masumiyette&#8230;</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D26&count=vertical&related=&text=Message%20from%20me' class='twitter-share-button' data-text='Message from me' data-url='http://samet.kilictas.com/?p=26' data-counturl='http://samet.kilictas.com/message-from-me/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/message-from-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

