Copying CODE into Oshonsoft and keep the INDENTS

Thread Starter

camerart

Joined Feb 25, 2013
3,730
Hi,
Each time I copy and paste CODE or open CODE with Oshonsoft, it looses it's INDENTS, how do I avoid this please?
Camerat
 

ericgibbs

Joined Jan 29, 2010
18,849
hi C,
How are you indenting.?
E

Update, try this.
Code:
'18F2431 ASM led test

Define CONFIG1L = 0x00
    Define CONFIG1H = 0x86
        Define CONFIG2L = 0x0c
            Define CONFIG2H = 0x00
Define CONFIG3L = 0x00
Define CONFIG3H = 0x81
Define CONFIG4L = 0x80
Define CONFIG4H = 0x00
Define CONFIG5L = 0x0f
Define CONFIG5H = 0xc0
Define CONFIG6L = 0x0f
Define CONFIG6H = 0xe0
Define CONFIG7L = 0x0f
Define CONFIG7H = 0x40

''Define SIMULATION_WAITMS_VALUE = 1  'SIMULATION ONLY

        AllDigital  '''''''''' On power PORTA is Analog!  so make digital!!


        OSCCON = %01110001  'internal 8Mhz clock

'I have only changed these to suit a board I am testing,
'dont want To rewire judt To test an LED
TRISA = %10011111
TRISB = %00001111
TRISC = %10001001


main:

    If PORTA.7 = 1 Then
        RA6 = 1  'LED
    Endif

If PORTA.7 = 0 Then
RA6 = 0  'LED
Endif

        Goto main
End
 

Attachments

Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,730
hi C,
How are you indenting.?
E

Update, try this.
Code:
'18F2431 ASM led test

Define CONFIG1L = 0x00
    Define CONFIG1H = 0x86
        Define CONFIG2L = 0x0c
            Define CONFIG2H = 0x00
Define CONFIG3L = 0x00
Define CONFIG3H = 0x81
Define CONFIG4L = 0x80
Define CONFIG4H = 0x00
Define CONFIG5L = 0x0f
Define CONFIG5H = 0xc0
Define CONFIG6L = 0x0f
Define CONFIG6H = 0xe0
Define CONFIG7L = 0x0f
Define CONFIG7H = 0x40

''Define SIMULATION_WAITMS_VALUE = 1  'SIMULATION ONLY

        AllDigital  '''''''''' On power PORTA is Analog!  so make digital!!


        OSCCON = %01110001  'internal 8Mhz clock

'I have only changed these to suit a board I am testing,
'dont want To rewire judt To test an LED
TRISA = %10011111
TRISB = %00001111
TRISC = %10001001


main:

    If PORTA.7 = 1 Then
        RA6 = 1  'LED
    Endif

If PORTA.7 = 0 Then
RA6 = 0  'LED
Endif

        Goto main
End
Hi E,
Your CODE's fine.
I've just found out that the CODE I'm getting is partially TABS and partially SPACES, so there's the problem.
Thanks.
C
 
Top