[[Category:Programming]] Working now, isn't it? :) :) :) <source geshi lang="z80"MAXAM>ld de,;; A useful procedure to display a 8-bit number in binary;; .txt_output equ &4000bb5a ;;------------------------------;; DISPLAY A BYTE IN BINARY FORM ;;;; Enter:;; A = 8-bit value;;;; Exit:;; AF corrupt.;; B corrupt. ;; All other registers preserved .display_binaryld hlb ,&c0008 ;number of bits to display .get_bitrlca ;rotate current top bit into carry ;if the bit was 1, the carry is set. (i.e. carry=1) ;if the bit was 0, the carry is reset. (i.e carry=0) push afld bca,&FFFF"0" ;ASCII character for bit valueldiradc a,0 ;add carry, if carry is set A="1", otherwise A="0"call txt_output ;display character onscreenpop af djnz get_bit ;loop, until all bits have been displayed
ret
</sourcegeshi> == GeSHi ==<php><?php echo 'Hello, world!'; # What else? $my_cnx = mysql_open('localhost', 'user', 'pass'); if ($my_cnx === false) die('Unable to open connection with MySQL database engine'); mysql_select_db('database', $my_cnx) or die('Unable to select database'); $request = sprintf('UPDATE table SET column=data WHERE othercolumn=\'%s\'', $_SESSION['text']); $my_success = mysql_query($request, $my_cnx); if ($my_success === false) { die('Error when trying to update table'); } mysql_close($my_cnx);</php> <geshi lang=sql>select * from lib.tbl where this=that</geshi> <geshi lang=bash>#!/bin/ksh HOST=hostUSER=usernamePASS=passwordFILE=bad.txtLOGFILE=log.txt ftp -n -v -i ${HOST} > ${LOGFILE} 2>&1 << EOFquote USER ${USER}quote PASS ${PASS}binaryput ${FILE}quitEOF grep -q "Transfer complete." ${LOGFILE} if [[ $? != 0 ]]; then echo "ftp failed"else echo "ftp succeeded"fi rm ${LOGFILE}</geshi>