In SX Microcontrollers, SX/B Compiler and SX-Key Tool, phipi wrote: There was a post on the Support forum that regarded posting readable SX assembly code in the forums. This is hard to do, due to the way the forum code handles tabs. So I've put a code formatter on my website that converts SX code into something that can be displayed here. The web address is: [url]www.phipi.com/sxformat[/url]. Here's an example of code that's gone through the formatter: [code] DEVICE SX28L,OSCHS3,BOR26,TURBO,STACKX_OPTIONX RESET START ;Begin executing at START. ; OPTDAT EQU %10000110 ;Option register value: ; Reg $01 is RTCC, not WREG. ; Enable RTCC roll-over interrupt. ; RTCC clocked internally. ; RTCC uses prescaler. ; RTCC divide rate = 1:32 ; FREQ 50_000_000 ; ;**********************MODE REGISTER VALUE NAMES********************** M_CMP EQU $08 M_WKPND EQU $09 M_WKED EQU $0A M_WKEN EQU $0B M_ST EQU $0C M_LVL EQU $0D M_PLP EQU $0E M_TRIS EQU $0F ;***********************PROCESS CONSTANTS***************************** RTCON EQU 186 ;Added to RTCC after interrupt. ; ;****************************MACROS*********************************** BLOCK MACRO IF $ & $100 ERROR 'Block begins in upper half of page.' ENDIF ENDM ; ENDB MACRO IF ($-1) & $100 ERROR 'Block ends in upper half of page.' ENDIF ENDM ; NOP3 MACRO JMP $+1 ENDM ; NOEXPAND [/code] Enjoy! -Phil ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=176326 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)