<?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; Research</title>
	<atom:link href="http://samet.kilictas.com/category/research/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>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>Assembly (x86) Turbo Lecture Notes</title>
		<link>http://samet.kilictas.com/assembly-x86-turbo-lecture-notes/</link>
		<comments>http://samet.kilictas.com/assembly-x86-turbo-lecture-notes/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 18:22:01 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[Assembly]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Assembly programing]]></category>
		<category><![CDATA[lecture notes]]></category>
		<category><![CDATA[Microprocessors]]></category>
		<category><![CDATA[TASM]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[x86]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=56</guid>
		<description><![CDATA[Here is my microprocessors lecture notes. Also you can have information about assembly programming with TASM. All the 20 lectures are available. Lecture 1 Microcomputers and Microprocessors Evolution of Intel 80&#215;86 Family Microprocessors Binary and Hexadecimal Number Systems Lecture 2 Brief History of 80&#215;86 Family of Microprocessors Pipelining and Registers Introduction to Assembly Programming Lecture [...]]]></description>
			<content:encoded><![CDATA[<p>Here is my microprocessors lecture notes. Also you can have information about assembly programming with TASM. All the <strong>20</strong> lectures are available.</p>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture1.pdf">Lecture 1</a></p>
<ol>
<li>Microcomputers and Microprocessors</li>
<li>Evolution of Intel 80&#215;86 Family Microprocessors</li>
<li>Binary and Hexadecimal Number Systems</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture2.pdf">Lecture 2</a></p>
<ol>
<li>Brief History of 80&#215;86 Family of Microprocessors</li>
<li>Pipelining and Registers</li>
<li>Introduction to Assembly Programming</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture3.pdf">Lecture 3</a></p>
<ol>
<li>Introduction to Assembly Programming (cont. from Lecture 2)</li>
<li>Introduction to Program Segments</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture4.pdf">Lecture 4</a></p>
<ol>
<li>Memory Map of the IBM PC</li>
<li>Pushing and Popping Operations (Stack)</li>
<li>Flag Registers and bit fields</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture5.pdf">Lecture 5</a></p>
<ol>
<li>Flag Registers and bit fields</li>
<li>80&#215;86 addressing modes.</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture6.pdf">Lecture 6</a></p>
<ol>
<li>Directives and sample programs</li>
<li>Assemble, link and run a program</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture7.pdf">Lecture 7</a></p>
<ol>
<li>Control transfer instructions</li>
<li>CALL statement</li>
<li>Subroutines</li>
<li>Data Types and Data Definition</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture8.pdf">Lecture 8</a></p>
<ol>
<li>Arithmetic and Logic Instructions and Programs</li>
<li>Unsigned Addition and Subtraction</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture9.pdf">Lecture 9</a></p>
<ol>
<li>Unsigned Subtraction</li>
<li>Unsigned Multiplication and Division</li>
<li>Arithmetic and Logic Instructions and Programs</li>
</ol>
<p><span id="more-56"></span></p>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture10.pdf">Lecture 10</a></p>
<ol>
<li>Arithmetic and Logic Instructions and Programs</li>
<li>COMPARE of unsigned numbers</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture11.pdf">Lecture 11</a></p>
<ol>
<li>BCD Addition and correction</li>
<li>ASCII addition and subtraction</li>
<li>Rotate Instructions</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture12.pdf">Lecture 12</a></p>
<ol>
<li>BIOS and DOS programming in Assembly</li>
<li>BIOS INT 10H</li>
<li>DOS INT 21H</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture13.pdf">Lecture 13</a></p>
<ol>
<li>Signed Numbers and Signed Number Operations</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture14.pdf">Lecture 14</a></p>
<ol>
<li>Signed Numbers and Signed Number Operations</li>
<li>String Operations</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture15.pdf">Lecture 15</a></p>
<ol>
<li>Basic Computer Architecture</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture16.pdf">Lecture 16</a></p>
<ol>
<li>Input/Output (I/O) and Device Interfacing</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture17.pdf">Lecture 17</a></p>
<ol>
<li>I/O Programming in Assembly Language</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture18.pdf">Lecture 18</a></p>
<ol>
<li>Interfacing the Parallel Port</li>
<li>Standard Parallel Port (SPP)</li>
<li>Port addresses</li>
<li>Software registers and programming</li>
<li>Bi-directional ports</li>
<li>Using parallel port’s IRQ</li>
<li>Enhanced Parallel Port (EPP)</li>
<li>Extended Capabilities Port (ECP)</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture19.pdf">Lecture 19</a></p>
<ol>
<li>Interfacing the Serial Port</li>
<li>Basics of Serial Communication</li>
<li>Asynchronous Data Communication and Data Framing</li>
<li>RS232 and other Serial I/O Standards</li>
</ol>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/06/eee410_lecture20.pdf">Lecture 20</a></p>
<ol>
<li>Interfacing the Serial Port</li>
<li>Serial Port registers</li>
<li>Transmitting Serial Data</li>
<li>Receiving Serial Data</li>
</ol>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D56&count=vertical&related=&text=Assembly%20%28x86%29%20Turbo%20Lecture%20Notes' class='twitter-share-button' data-text='Assembly (x86) Turbo Lecture Notes' data-url='http://samet.kilictas.com/?p=56' data-counturl='http://samet.kilictas.com/assembly-x86-turbo-lecture-notes/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/assembly-x86-turbo-lecture-notes/feed/</wfw:commentRss>
		<slash:comments>2</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>Compiz Fusion &#8216;a Extra eklenti kurulumu (Gusty 7.10)</title>
		<link>http://samet.kilictas.com/compiz-fusion-a-extra-eklenti-kurulumu-gusty/</link>
		<comments>http://samet.kilictas.com/compiz-fusion-a-extra-eklenti-kurulumu-gusty/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 10:06:33 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[3D Windows]]></category>
		<category><![CDATA[Anaglyph]]></category>
		<category><![CDATA[Atlantis]]></category>
		<category><![CDATA[Atlantis2]]></category>
		<category><![CDATA[Compiz]]></category>
		<category><![CDATA[Fireflies]]></category>
		<category><![CDATA[Freewins]]></category>
		<category><![CDATA[gusty]]></category>
		<category><![CDATA[Magnifier]]></category>
		<category><![CDATA[Mouse position polling]]></category>
		<category><![CDATA[Photowheel]]></category>
		<category><![CDATA[Screensaver]]></category>
		<category><![CDATA[Show mouse]]></category>
		<category><![CDATA[Snow]]></category>
		<category><![CDATA[Snowglobe]]></category>
		<category><![CDATA[Stars]]></category>
		<category><![CDATA[Tile]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wallpaper]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=15</guid>
		<description><![CDATA[Önemli! : Burda anlattığım kurulum aşamaları Ubuntu 8.04 Hardy Heron distrosundaki default compiz veya compiz versionu 0.6.* dan büyük olanlar tafarından uygulanmamalıdır. İlk önce şunu söylemek yerinde olur diye düşünüyorum. Burada anlatacağım kurulum aşamaları vs. home user diye tabir ettiğimiz kullanıcılar tarafından karışık olarak görülebilir. Lütfen şu anda ne ile uğraştığınızı bilmiyorsanız, ve buna rağmen [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="color: #ff0000;">Önemli!</span> : Burda anlattığım kurulum aşamaları Ubuntu 8.04 Hardy Heron distrosundaki default compiz veya compiz versionu <span style="color: #ff6600;">0.6.*</span> dan büyük olanlar tafarından uygulanmamalıdır.</strong></p>
<p>İlk önce şunu söylemek yerinde olur diye düşünüyorum. Burada anlatacağım kurulum aşamaları vs. home user diye tabir ettiğimiz kullanıcılar tarafından karışık olarak görülebilir. Lütfen şu anda ne ile uğraştığınızı bilmiyorsanız, ve buna rağmen Compiz kurulumunu yapmak istiyorsanız bu işlemleri uygulamanızı tavsiye etmeyiniz.</p>
<p style="text-align: center;"><a href="http://samet.kilictas.com/wp-content/uploads/2008/04/compiz_fusion_logos2.png"><img class="alignnone size-medium wp-image-16" title="Compiz Fusion Gusty" src="http://samet.kilictas.com/wp-content/uploads/2008/04/compiz_fusion_logos2-300x250.png" alt="Ubuntu Gusty 7.10" width="300" height="250" /></a></p>
<p>Bu işlemleri uygulamanız için şunlara sahip olduğunuzu varsayıyorum;</p>
<ul>
<li>Yeni kurulmuş bir Gusty</li>
<li>Halen sisteminize Gusty kurulumu ile gelen default compiz paketlerinin çalışıyor şekilde olması (0.6.*)</li>
<li>Ve kurulum sırasında root yetkisinde değil kullanıcı seviyesinde olduğunuz</li>
</ul>
<ol></ol>
<p><strong>Not: </strong>Compiz-Fusion kurulumuna başlamadan önce sisteminizde ki ekran kartlarının <a href="http://wiki.compiz-fusion.org/Hardware">bu listedekilerden</a> biri olmasına ve sisteminizde çalışıyor halde olmasına dikkat edin!</p>
<p><strong><span style="color: #ff0000;"><span style="text-decoration: underline;">Kurulumunu yapacağımız eklentiler :</span></span></strong> <strong>3D Windows</strong>, <strong>Atlantis2</strong>, <strong>Snow</strong>, <strong>Stars</strong>, <strong>Atlantis</strong>, <strong>Screensaver</strong>, <strong>Anaglyph</strong>, <strong>Wallpaper</strong>, <strong>Tile</strong>, <strong>Freewins</strong>, <strong>Fireflies</strong>, <strong>Photowheel</strong> ve <strong>Snowglobe. </strong>Bunlara ek olarakta <strong>Mouse position polling</strong>, <strong>Magnifier</strong> ve <strong>Show mouse </strong>eklentilerinin kurulumunuda bulabileceksiniz.</p>
<p><span style="color: #000000;"><span style="text-decoration: underline;"><strong>Compiz Eklenti Bağımlılıklarının Kurulumu</strong></span></span></p>
<p>Öncelikle aşağıdaki komutu konsol(terminal) e yazarak gerekli bağımlılıkları sistemimize kurmalıyız. Çünkü compiz eklentilerini derlerken ve yüklerken bunlara ihtiyacımız olucak.</p>
<blockquote><p>sudo apt-get install compiz-bcop compiz-dev build-essential libxcomposite-dev libpng12-dev libsm-dev libxrandr-dev libxdamage-dev libxinerama-dev libstartup-notification0-dev libgconf2-dev librsvg2-dev libdbus-1-dev libdbus-glib-1-dev libgnome-desktop-dev x11proto-scrnsaver-dev libxss-dev libxslt1-dev libtool</p></blockquote>
<p><span style="text-decoration: underline;"><strong>Eklentilerin İndirilmesi</strong></span></p>
<p>Şimdi /home/samet/  altında compiz eklentilerini açacağımız bir klasör oluşturuyoruz.</p>
<blockquote><p>mkdir -p  ~/compiz/</p></blockquote>
<p>Sıradaki işlemimiz ise eklentileri bilgisayarımıza indirmek.Aşağıdaki kod dizisini terminal&#8217; e tamamen</p>
<p><span id="more-15"></span></p>
<p>yapıştırabilirsiniz. Terminal satır satır okuyarak indirme işlemini tamamlayacaktır veya satır satır sizde terminale girebilirsiniz. Not: burada &#8216;wget&#8217; komutu ile başlayan 13 satır vardır.</p>
<blockquote><p>wget -O /tmp/3d.tar.gz &#8216;http://oreaus.googlepages.com/3d.tar.gz&#8217;<br />
wget -O /tmp/atlantis2.tar.gz &#8216;http://oreaus.googlepages.com/atlantis2.tar.gz&#8217;<br />
wget -O /tmp/snow.tar.gz &#8216;http://oreaus.googlepages.com/snow.tar.gz&#8217;<br />
wget -O /tmp/stars.tar.gz &#8216;http://oreaus.googlepages.com/starz.tar.gz&#8217;<br />
wget -O /tmp/atlantis.tar.gz &#8216;http://oreaus.googlepages.com/atlantis.tar.gz&#8217;<br />
wget -O /tmp/screensaver.tar.gz &#8216;http://oreaus.googlepages.com/screensaver.tar.gz&#8217;<br />
wget -O /tmp/anaglyph.tar.gz &#8216;http://oreaus.googlepages.com/anaglyphz.tar.gz&#8217;<br />
wget -O /tmp/wallpaper.tar.gz &#8216;http://oreaus.googlepages.com/wallpaper.tar.gz&#8217;<br />
wget -O /tmp/tile.tar.gz &#8216;http://oreaus.googlepages.com/tile.tar.gz&#8217;<br />
wget -O /tmp/freewins.tar.gz &#8216;http://oreaus.googlepages.com/freewinz.tar.gz&#8217;<br />
wget -O /tmp/fireflies.tar.gz &#8216;http://oreaus.googlepages.com/firefliez.tar.gz&#8217;<br />
wget -O /tmp/photowheel-0.6.tar.gz &#8216;http://oreaus.googlepages.com/photowheel-0.6.tar.gz&#8217;<br />
wget -O /tmp/snowglobe.tar.gz &#8216;http://oreaus.googlepages.com/snowglobe.tar.gz&#8217;</p></blockquote>
<p><span style="text-decoration: underline;"><strong>İndirilen eklentileri Tar&#8217; dan çıkaralması</strong></span></p>
<p>Burada 3d eklentisi için yapılması gerekenleri anlatıcam. Tabiki bu işlemi diğer eklentiler içinde tek tek uygulamanız gerekiyor. Kullanacağımız <span style="text-decoration: underline;">~/compiz/</span> yolu aslında <span style="text-decoration: underline;">/home/samet/compiz/</span> dizini ile eşdeğerdir.</p>
<blockquote><p>tar -xf &#8216;/tmp/<strong>3d.tar.gz</strong>&#8216; -C ~/compiz/</p></blockquote>
<p>Girmiş olduğumuz bu komut indirmiş olduğumuz 3d.tar.gz eklentisini şu anda bulunduğu dizin olan /tmp/3d.tar.gz den alıp sıkıştırılmış halden çıkararak ~/compiz/3d/ dizininin içerisine kopyalıyor. Bu aşamadan sonra ise yapacağımız şey ~/compiz/3d/ dizinindeki koynak kodları derlemek ve yüklemek olacaktır.</p>
<p>Derleme işlemine geçebilmek için ilk önce o dizine gidelim</p>
<blockquote><p>cd ~/compiz/3d/</p></blockquote>
<p>daha sonra ise;</p>
<blockquote><p>make &amp;&amp; make install</p></blockquote>
<p>kodlarını kullanarak derleme ve yükleme işlemlerini tamamlayalım. Bu işlemle birlikte 3d eklentisinin kurulumunu tamamlamış oluyoruz.  Bu işlemden sonra tek yapmamız gereken ise tabiki isteğiniz dahilindeki eklentileride bu şekilde kurulum yapmak ve tüm işlemleri bitirdiğinizde Ekran kartı özelliklerinin yeniden başlamasını sağlamanızdır. Bunun için ise Ctrl+Alt+Backspace tuş kombinasyonunu kullanabilirsiniz.</p>
<p>Tabiki kurulum yaptığınız eklentileri Compiz Yönetim panelinden açmayıda unutmayın <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>peki şimdi kurulum yaptık peki bu eklentiyi kaldırmak istiyorsak;</p>
<p>gerekli eklenti dizinini bulduktan sonra (mesela : cd ~/compiz/3d/ )</p>
<blockquote><p>make uninstall</p></blockquote>
<p>komutunu uygulamak olacaktır.</p>
<p><span style="text-decoration: underline;"><strong>Daha fazla eklenti için</strong></span></p>
<p>Burada şunu bilmemiz gerekiyor, yükleyeceğimiz eklentilerden Show mouse ve Magnifier eklentisinin bağımlılığı olan Mouse position polling &#8216; in önceden yüklü olması gerekiyor. Bunu da zaten ilk kısımda anlattığım şekilde kurabilirsiniz.</p>
<p>Bunun için;</p>
<blockquote><p>mkdir -p  ~/compiz/<br />
wget -O /tmp/k4plugins.tar.gz &#8216;http://oreaus.googlepages.com/k4plugins.tar.gz&#8217;<br />
tar -xf &#8216;/tmp/k4plugins.tar.gz&#8217; -C ~/compiz/<br />
cd ~/compiz/k4plugins/mousepoll/<br />
make &amp;&amp; BUILD_GLOBAL=true sudo make install<br />
cd ~/compiz/k4plugins/mag/<br />
make &amp;&amp; sudo make install<br />
cd ~/compiz/k4plugins/showmouse<br />
make &amp;&amp; make install</p></blockquote>
<p>komutlarının sırasıyla uygulanması gerekiyor.</p>
<p>Bu işlemden sonra bağımlılıklarından bahsettiğim eklentilerin aktif olabilmesi için öncelikle Mouse position polling ekletisinin <strong>C</strong>ompiz<strong>C</strong>onfig <strong>S</strong>ettings <strong>M</strong>anager (ccsm) kullanılarak aktif hale getirilmesi gerekiyor.</p>
<p>Eğer bunlara yabancı olduğunuz halde bu aşamaya kadar başarı ile gelmişseniz fakat CCSM haakında bir bilgiye sahip değilseniz bunun için</p>
<blockquote><p>sudo apt-get install compizconfig-settings-manager</p></blockquote>
<p>komutunu yine terminalde çalıştırarak bu paketi sisteminize kurmanız gerekmektedir. Daha sonra bu pakete <strong>System/Preferences/Advandec Desktop Effect Settings</strong> den ulaşabilirsiniz.</p>
<p>Tüm bu eklentileri doğru bir şekilde çalıştırabilmek istiyorsanız yukarıda anlattığım tüm işlemlerin <strong><span style="color: #ff0000;">Sorunsuz!</span></strong> bir şekilde yapılması gerekmektedir.</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="373" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="http://www.youtube.com/v/lawkc3jH3ws&amp;hl=en&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1" /><embed type="application/x-shockwave-flash" width="425" height="373" src="http://www.youtube.com/v/lawkc3jH3ws&amp;hl=en&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1" wmode="transparent"></embed></object></p>
<p>Kolay Gelsin.</p>
<p>İyi eğlenceler <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D15&count=vertical&related=&text=Compiz%20Fusion%20%26%23039%3Ba%20Extra%20eklenti%20kurulumu%20%28Gusty%207.10%29' class='twitter-share-button' data-text='Compiz Fusion &#039;a Extra eklenti kurulumu (Gusty 7.10)' data-url='http://samet.kilictas.com/?p=15' data-counturl='http://samet.kilictas.com/compiz-fusion-a-extra-eklenti-kurulumu-gusty/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/compiz-fusion-a-extra-eklenti-kurulumu-gusty/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>About PARDUS Project</title>
		<link>http://samet.kilictas.com/about-pardus-project-2007-tubitak/</link>
		<comments>http://samet.kilictas.com/about-pardus-project-2007-tubitak/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 22:28:05 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Pardus]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Knoppix]]></category>
		<category><![CDATA[Linspire]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=11</guid>
		<description><![CDATA[Hello People, Do you know about PARDUS? .. Yes in this post i am going to mention to you about PARDUS project. I assume that you know some about linux operating system. Unfortunately im not going to tell you about the history of linux. But first of all i want you to know the basics [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ozgurlukicin.com" target="_blank"><img title="Pardus... Özgürlük İçin..." src="http://www.pardus.org.tr/banner/btm02.png" border="0" alt="Pardus... Özgürlük İçin..." /></a></p>
<p>Hello People,</p>
<p>Do you know about PARDUS? ..  Yes in this post i am going to mention to you about PARDUS project. I assume that you know some about <a title="linux operating system" href="http://en.wikipedia.org/wiki/Linux" target="_blank">linux operating system</a>. Unfortunately im not going to tell you about the history of linux.</p>
<p>But first of all i want you to know the basics before i start. Common known <a href="http://en.wikipedia.org/wiki/Linux_distribution" target="_blank">distros</a> of linux are Fedora, Slackware, Ubuntu[i was using this], CentOS, Debian, Gentoo, Knoppix, Linspire, openSUSE, PCLinuxOS etc. As you see we got many of them. I see you got a question. -&gt; &#8220;Woow This is too much.. &#8221;  You are definitely right it is too much and it is not the other side of it. But you should know that each disribution has it&#8217;s own properties. For example ubuntu is which i used to use is more efficient for generaly users not for specially multimedia users. CentOS is good for CPanel uses. My Point is If you are running on Linux you can choose the best one for you. This not possible on Windows side. I am not here to tell you &#8220;Windows is BAD!!&#8221;  .. Of Course it is doing someting.. : ) without blue screens .. : )</p>
<p>Let&#8217;s turn on the main topic..  PARDUS Project. <a href="http://www.uekae.tubitak.gov.tr/home.do;&amp;lang=en" target="_blank">TÜBİTAK UEKAE</a> is developing this disrubution. Of course is it linux based operating system. I can say this is another oppourtunity for home users. First of all this is the first official operating system of TURKEY. Second distro of PARDUS has came in the last quarter of 2006. First edition was PARDUS 1.0 and it took a year to announce about Second edition. PARDUS is really special OS System for me big reason is this PARDUS is for a user who wants to run all the multimedia applications with no problems. It comes with codecs and such on it.</p>
<p>I have installed my PARDUS distro about a year ago and using it since this time. I&#8217;ve read many article about PARDUS <a href="http://en.wikipedia.org/wiki/Pardus_%28operating_system%29" target="_blank">Here is a link</a> you can find more about it.</p>
<p><span id="more-11"></span></p>
<p>Language Support!</p>
<p>Yes this is an official turkish operating system and also it has language support of course. There are some web sites for PARDUS project that you can find some more information on your own language. There is an official <a href="http://www.pardus.org.tr/eng/" target="_blank">English Website</a> . And people created unofficial <a href="http://www.pardus.it/">Italian Website</a> and <a href="http://www.pardus-linux.nl/" target="_blank">Holland Website</a> . Nowadays people are talking about PARDUS all around the world this is good news and there is a <a href="http://distrowatch.com/table.php?distribution=pardus" target="_blank">webpage</a> in the <a href="http://distrowatch.com/" target="_blank">DistroWatch.com</a> about PARDUS.</p>
<p>I Say..?</p>
<p>I say the PARDUS distro has user friendly interface, good graphics..Satisfied!.. During the installation it is very easy. You can find PARDUS as CD/DVD. <a href="http://pardus.org.tr/eng/download.html" target="_blank">Here is link</a> and you can download PARDUS distro.</p>
<p>Some More Information:</p>
<ul>
<li>http://pardus.org.tr/eng/index.html</li>
<li>http://www.pardus-wiki.org/</li>
<li>http://pardus.org.tr/eng/documents/index.html</li>
</ul>
<p>Note: The new version is coming up soon-&gt; PARDUS 2008<br />
Samet Kilictas</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D11&count=vertical&related=&text=About%20PARDUS%20Project' class='twitter-share-button' data-text='About PARDUS Project' data-url='http://samet.kilictas.com/?p=11' data-counturl='http://samet.kilictas.com/about-pardus-project-2007-tubitak/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/about-pardus-project-2007-tubitak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alacarte Menu Editor Hatası</title>
		<link>http://samet.kilictas.com/alacarte-menu-editor-hatasi/</link>
		<comments>http://samet.kilictas.com/alacarte-menu-editor-hatasi/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 21:13:17 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[alacarte]]></category>
		<category><![CDATA[gusty]]></category>
		<category><![CDATA[hata]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=10</guid>
		<description><![CDATA[Ubuntu Gutsy 7.10 da birden applications menusu çalışmamaya başlası netten edindiğim bilgiye göre (: Termalden menuyü açabilmek için alacarte yazıyoruz. Ben şu hata ile karşılaştım. cin@ottoman:~$ alacarte /usr/lib/python2.5/site-packages/apt/progress.py: inconsistent use of tabs and spaces in indentation Traceback (most recent call last): File &#8220;/usr/bin/alacarte&#8221;, line 36, in main() File &#8220;/usr/bin/alacarte&#8221;, line 32, in main app = [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu Gutsy 7.10 da birden applications menusu çalışmamaya başlası netten edindiğim bilgiye göre (:  Termalden menuyü açabilmek için </p>
<blockquote><p>alacarte</p></blockquote>
<p>yazıyoruz. Ben şu hata ile karşılaştım.</p>
<blockquote><p>cin@ottoman:~$ alacarte<br />
/usr/lib/python2.5/site-packages/apt/progress.py: inconsistent use of tabs and spaces in indentation<br />
Traceback (most recent call last):<br />
  File &#8220;/usr/bin/alacarte&#8221;, line 36, in <module><br />
    main()<br />
  File &#8220;/usr/bin/alacarte&#8221;, line 32, in main<br />
    app = MainWindow(datadir, version, sys.argv)<br />
  File &#8220;/usr/lib/python2.5/site-packages/Alacarte/MainWindow.py&#8221;, line 49, in __init__<br />
    self.editor = MenuEditor()<br />
  File &#8220;/usr/lib/python2.5/site-packages/Alacarte/MenuEditor.py&#8221;, line 36, in __init__<br />
    self.__loadMenus()<br />
  File &#8220;/usr/lib/python2.5/site-packages/Alacarte/MenuEditor.py&#8221;, line 46, in __loadMenus<br />
    self.applications.dom = xml.dom.minidom.parse(self.applications.path)<br />
  File &#8220;/usr/lib/python2.5/site-packages/_xmlplus/dom/minidom.py&#8221;, line 1915, in parse<br />
    return expatbuilder.parse(file)<br />
  File &#8220;/usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py&#8221;, line 926, in parse<br />
    result = builder.parseFile(fp)<br />
  File &#8220;/usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py&#8221;, line 211, in parseFile<br />
    parser.Parse(&#8220;&#8221;, True)<br />
xml.parsers.expat.ExpatError: no element found: line 1, column 0</p></blockquote>
<p>Bu hata menu editorun applications.menu dosyasını tekrar yazmaya çalışmasıyla ortaya çıkıyor. Bu aşamada places ve system menuleri normal çalışıyor fakat sorun applications menusunde ve menu editorun kendisinde ortaya çıkıyor. </p>
<p>Hatayı Gidermek için bu fazlalık dosyayı siliyoruz.. </p>
<blockquote><p>cin@ottoman:~$ rm -f ~/.config/menus/applications.menu</p></blockquote>
<p>artık herşeyin eski halina dönmüş olması lazım bu kod ile belitrilen dizin altında oluşturulan applications.menu dosyasını siliyoruz.</p>
<p>Kolay Gelsin (:</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D10&count=vertical&related=&text=Alacarte%20Menu%20Editor%20Hatas%C4%B1' class='twitter-share-button' data-text='Alacarte Menu Editor Hatası' data-url='http://samet.kilictas.com/?p=10' data-counturl='http://samet.kilictas.com/alacarte-menu-editor-hatasi/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/alacarte-menu-editor-hatasi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntuda .mov dan .mpeg,.mpeg2,.avi&#8217; a çeviri</title>
		<link>http://samet.kilictas.com/ubuntu-da-mov-dan-mpegmpeg2-ceviri/</link>
		<comments>http://samet.kilictas.com/ubuntu-da-mov-dan-mpegmpeg2-ceviri/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 19:26:40 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[AVI]]></category>
		<category><![CDATA[encode]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[MOV]]></category>
		<category><![CDATA[MPEG]]></category>
		<category><![CDATA[MPEG2]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=6</guid>
		<description><![CDATA[Geçenlerde elimdeki .MOV uzantılı video yu Youtube atmaya kalkışınca avi ye cevirmeliyim dedim çünkü MOV ile AVI arasında mükemmel bir boyut farkı var. Ben bunun için MEncoder i kullandım. Tabiki bunu kullanabilmek için sisteminize öncelikle &#8220;mencoder&#8221; paketini kurmamız gerekiyor.Bunun için; $sudo apt-get install mencoder komutunu terminale yazıp işlemi tamamlıyoruz. Bu arada şunu hatırlatayım mencoder uygulaması [...]]]></description>
			<content:encoded><![CDATA[<p>Geçenlerde elimdeki .MOV uzantılı video yu Youtube atmaya kalkışınca avi ye cevirmeliyim dedim çünkü MOV ile AVI arasında mükemmel bir boyut farkı var. Ben bunun için MEncoder i kullandım. Tabiki bunu kullanabilmek için sisteminize öncelikle &#8220;mencoder&#8221; paketini kurmamız gerekiyor.Bunun için;</p>
<p><strong>$sudo apt-get install mencoder</strong></p>
<p>komutunu  terminale yazıp işlemi tamamlıyoruz. Bu arada şunu hatırlatayım mencoder uygulaması terminalden kullanılır. Bir GUI ye sahip değil. </p>
<p>Şimdi kısaca mencoder in nasıl kullanıldığından basedicem.</p>
<p>MPEG formatı için; </p>
<blockquote><p>mencoder input.avi -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video \ -oac copy other_options -o output.mpg</p></blockquote>
<p>Kod dizisi işimizi görecektir. Burada yapılan işlem varsayılan olarak kabul edilen MPEG-1 formatı yapılır. </p>
<blockquote><p>mencoder input.mpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell \ -vf scale=640:480 -o output.avi</p></blockquote>
<p>yukarıdaki kod dizisi ilede elimizdeki video dosyasını yeniden boyutlandırma şansı elde ediyoruz. AVI ye çeviri yapmak için ise </p>
<blockquote><p>~/Desktop$ mencoder -ovc lavc -oac pcm -o output.avi /home/samet/Desktop/IMGP0262.MOV </p></blockquote>
<p>şekilnde bir kullanım yapabiliriz. <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Mencoder ile ilgili daha fazla bilgiyi buradan alabilirsiziniz. </p>
<p><a href="http://www.mplayerhq.hu/DOCS/HTML/en/">Geniş Bilgi İçin</a></p>
<p>Kolay Gelsin&#8230;</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D6&count=vertical&related=&text=Ubuntuda%20.mov%20dan%20.mpeg%2C.mpeg2%2C.avi%26%23039%3B%20a%20%C3%A7eviri' class='twitter-share-button' data-text='Ubuntuda .mov dan .mpeg,.mpeg2,.avi&#039; a çeviri' data-url='http://samet.kilictas.com/?p=6' data-counturl='http://samet.kilictas.com/ubuntu-da-mov-dan-mpegmpeg2-ceviri/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/ubuntu-da-mov-dan-mpegmpeg2-ceviri/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bir İşlemi Sonlandırmak [Kill]</title>
		<link>http://samet.kilictas.com/bir-islemi-sonlandirmak-kill/</link>
		<comments>http://samet.kilictas.com/bir-islemi-sonlandirmak-kill/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 06:02:58 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[bitir]]></category>
		<category><![CDATA[işlem]]></category>
		<category><![CDATA[kill]]></category>
		<category><![CDATA[PID]]></category>
		<category><![CDATA[process]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=4</guid>
		<description><![CDATA[Bazen bazı işlemler -yada programlar diyelim daha anlaşılır olsun- o kadar canımızı sıkarki artık kapan yedin ömrümü şeklinde cümleleri kurmamıza neden bile olur İstemediğiniz bir uygulamayı başlatmış olabilirsiniz veya siz uygulmayı kapattınız ama hala çalıştığını görüp sistem kaynaklarını halen tükettiğini biliyorsunuz. Şimdi bu istemediğimiz uygulamaları nasıl kill komutu ile sonlandırabiliriz birkaç işlemde onu anlatıcam. 1- [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Bazen bazı işlemler -yada programlar diyelim daha anlaşılır olsun- o kadar canımızı sıkarki artık kapan yedin ömrümü şeklinde cümleleri kurmamıza neden bile olur <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  İstemediğiniz bir uygulamayı başlatmış olabilirsiniz veya siz uygulmayı kapattınız ama hala çalıştığını görüp sistem kaynaklarını halen tükettiğini biliyorsunuz. Şimdi bu istemediğimiz uygulamaları nasıl kill komutu ile sonlandırabiliriz birkaç işlemde onu anlatıcam.</p></blockquote>
<p><a href="http://samet.kilictas.com/wp-content/uploads/2008/04/kill-process.jpg"><img class="alignnone size-medium wp-image-5" title="kill-process" src="http://samet.kilictas.com/wp-content/uploads/2008/04/kill-process-300x205.jpg" alt="" width="300" height="205" /></a></p>
<p>1- Öncelikle hedefi belirlemek açısından hedefi bulmalıyız. Process ID (İşlem Numarası) -&gt; PID olarak bilinen numarayı bulup buna göre uygulamayı sonlandırabiliriz. &#8220;<strong>ps -fu [kullanıcı adı]&#8221; </strong>komutuyla o an sistemde bize ait çalışan uygulamaları görebilriz ve tabiki buna baglı olarak PID numarasınıda almamız gerekiyor. Aradığımız PID numarası çıkan listenin 2inci sütununda yer alıyor. Şimdi dikkatlice uygulamamın PID numarasını not edeceğiz ancak sistemde login olmuş birçok kullanıcı varsa &#8220;pts&#8221; sütununada bakamız gerekiyor. Burada PID i alırken dikkatli olun yoksa çalıştıgınız önemli bir uygulamayı da kapatıyor olabilisiniz.</p>
<p>2- PID numarasınız bildiğimiz sürece artık uyugulamamızın canına okuyabiliriz. <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  En basit kullanım şekli söyledir;</p>
<p><code><strong>kill PID</strong></code></p>
<p>Şunuda söylemek lazım kill sinyalinin birçok şekli var mesela bazı kill sinyallerini uygulama engelleyebilir. Yani uygulama kendini kapatmamak için zorlayabilir. Sinyaller hakkında geniş bilgiyi</p>
<p><code><strong>man -s 5 signal</strong></code></p>
<p>komutu ile alabilirsiniz. Benim söyleyebileceğim kullanışlı olan iki yol var. Mesela kapatmak istediğiniz uygulamada daha önceden değişiklikler yaptınız ve uygulamamının kendini kapatmadan önce değişiklikleri kaydetmesini istiyorsunuz bunun için  <strong>&#8220;kill -HUP</strong> <samp>PID</samp> (veya <strong>kill -1</strong> <samp>PID</samp>)&#8221; şeklinde kullanabilirsiniz. Bu -hangup- sinyali denilen sinyali yollar. Uygulamayı sonlandırmadan önce ona biraz zaman tanıyorda diyebiliriz. <img src='http://samet.kilictas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span id="more-4"></span></p>
<p>Diğer bir kullanışlı kullanım şekli ise &#8220;<strong>kill -9</strong> <samp>PID</samp> (veya <strong>kill -KILL</strong> <samp>PID</samp>)&#8221; şeklindedir. Bu komut ise artık uygulamayı -ne durumda oldugunu önemsemeksizin- sonlandırır diyebiliriz.</p>
<p>Mesela önce PID i aldınız daha sonrada &#8220;kill -1 ***&#8221; şeklinde kullandınız ve halen uygulama aktif görünüyor bu noktada &#8220;kill -9 ***&#8221; kullanımını ikinci seçenek olarak sunabiliriz. Komutu uyguladıktan sonra <strong>&#8220;ps -fu [kullanıcı adı]&#8221; </strong>ile gerçekten sonlandırıldığını kontrol etmekte fayda var.</p>
<p>Son olarak bazı uygulamalar &#8220;sonlandırılamaz&#8221; şeklinde karşımıza çıkabilir bunlar genelde sistem tarafından kullanılan uygulamalardır ve bişeyler için bekliyorlardır. Kendileri sonlanır büyük ihtimal.</p>
<p>Teşekkürler.</p>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D4&count=vertical&related=&text=Bir%20%C4%B0%C5%9Flemi%20Sonland%C4%B1rmak%20%5BKill%5D' class='twitter-share-button' data-text='Bir İşlemi Sonlandırmak [Kill]' data-url='http://samet.kilictas.com/?p=4' data-counturl='http://samet.kilictas.com/bir-islemi-sonlandirmak-kill/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/bir-islemi-sonlandirmak-kill/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

