In SX Microcontrollers, SX/B Compiler and SX-Key Tool, PJMonty wrote: Phil, Very cool. I wonder if this is something that could be integrated into the forum software. I tried formatting my assembly language template file here: [code] [b]ifdef[/b] __SASM [b]DEVICE[/b] [b]SX28[/b], [b]turbo[/b], [b]stackx[/b], [b]optionx[/b], [b]OSCHS3[/b] [b]else[/b] [b]DEVICE[/b] SX28L,[b]turbo[/b],stackx_optionx [b]endif[/b] [b]FREQ[/b] 50_000_000 [b]ID[/b] 'DUMMY' ;Program ID label [b]RESET[/b] GotoMain ;Set reset/boot address [b]ifdef[/b] __SASM [b]LIST[/b] Q=37;, Q=64 ; This quiets specfic SASM warnings [b]irc_cal[/b] [b]IRC_FAST[/b] [b]endif[/b] INT_DURATION [b]equ[/b] 200 ; Number of RTCC timer counts for interrupt ; Interrupt code MUST start at address 0 [b]org[/b] $00 [b]mov[/b] [b]w[/b], #-INT_DURATION ;interrupt every INT_DURATION RTCC clocks [b]retiw[/b] ;exit interrupt GotoMain [b]jmp[/b] @Main [b]ORG[/b] $200 Main ; Clear all file register memory in the chip [b]clr[/b] [b]FSR[/b] ;Reset all ram starting at 08h :zero_ram [b]sb[/b] [b]FSR[/b].4 ;Are we on low half of bank? [b]setb[/b] [b]FSR[/b].3 ;If so, don't touch regs 0-7 [b]clr[/b] [b]IND[/b] ;Clear using indirect addressing [b]ijnz[/b] [b]FSR[/b],:zero_ram ;Repeat until done :Loop4Ever [b]jmp[/b] :Loop4Ever [/code] Looks good except for the conversion of tabs. I set the tabs to "2" before pasting my code, but it looks weird here. I'm not sure if that is an issue with your code, or the way the forum software handles spaces when using FireFox. Thanks, PeterM ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=176326#m176336 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)