[ create a new paste ] login | about

Link: http://codepad.org/fSzcD5gR    [ raw code | output | fork ]

C, pasted on Mar 7:
list      p=16f628            	; list directive to define processor
	#include <p16f628.inc>        	; processor specific variable definitions

	__CONFIG _CP_OFF & _WDT_OFF & _BODEN_ON & _PWRTE_ON & _INTRC_OSC_NOCLKOUT & _MCLRE_ON & _LVP_OFF

COUNT		equ	0x20
DUMMY1	equ	0x21
DUMMY2	equ	0x22

	org	0x000			; Reset Vetor Address
	bsf	STATUS,RP0		; Set RB4-RB7 For Drive Stepper Motor
	movlw	b'00001111'
	movwf	PORTB
	bcf	STATUS,RP0

Begin	movlw	.12			; Loop 12 Time For 7.5 Degree/Step 4x12x7.5 = 360
	movwf	COUNT
Loop
    ;movlw	b'00010000'		; 1 Phase Full Step
	;movwf	PORTB
	;call	Delay			; Change Delay For Change Speed
	movlw	b'00100000'
	movwf	PORTB
	call	Delay
	movlw	b'01000000'
	movwf	PORTB
	call	Delay
	movlw	b'10000000'
	movwf	PORTB
	call	Delay
	goto	Loop			; If Not Loop Again

Delay	movlw	0x20			; Delay Between Step
	movwf	DUMMY1
Delay1	clrf	DUMMY2
	decfsz	DUMMY2,f
	goto	$-1
	decfsz	DUMMY1,f
	goto	Delay1
	return

	END                    		; of program


Output:
Line 1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'p'
Line 12: error: invalid suffix "f628" on integer constant
Line 1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'directive'
Line 32: warning: extra tokens at end of #include directive
Line 73: error: p16f628.inc: No such file or directory
Line 10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Vetor'
Line 11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'RB4'
Line 8: warning: character constant too long for its type
Line 16: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
Line 53: error: invalid suffix "x12x7.5" on integer constant
Line 19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'b'
Line 12: warning: character constant too long for its type
Line 19: error: expected identifier or '(' before numeric constant
Line 20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PORTB'
Line 21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Delay'
Line 21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Delay'
Line 8: warning: character constant too long for its type
Line 8: warning: character constant too long for its type
Line 8: warning: character constant too long for its type
Line 31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Not'
Line 33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Between'
Line 42: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'program'


Create a new paste based on this one


Comments: