El compilador se llama Great Cow Basic y sirve para programar en los microchips.
* Es de codigo abierto.
* Free.
* Instalacion en Windows y Linux.
* Las variables tal y como son declaras, se ven reflejados en el codigo ASM final es decir no agrega nombres raros al codigo ASM final.
Manual es Español
http://gcbasic.sourceforge.net/index.html
Código
'Led parpadeante #chip 16F628A, 20 'modelo de pic y velocidad de reloj: 20 Mhz #define led PORTB.1 Main: TRISB=0 PORTB=0 led = 1 wait 500 ms led = 0 wait 500 ms goto Main
Codigo ASM generado de manera limpia.
Código
;Program compiled by Great Cow BASIC (0.9 13/9/2008) ;Need help? See the GCBASIC forums at http://sourceforge.net/forum/?group_id=169286, ;check the documentation or email w_cholmondeley@users.sourceforge.net. ;******************************************************************************** ;Set up the assembler options (Chip type, clock source, other bits and pieces) LIST p=16F628A, r=DEC #include __CONFIG _HS_OSC & _WDT_OFF & _LVP_OFF & _MCLRE_OFF ;******************************************************************************** ;Set aside memory locations for variables DELAYTEMP equ 32 DELAYTEMP2 equ 33 RANDOMSEED equ 34 RANDOMSEED_H equ 35 SysWaitTempMS equ 36 SysWaitTempMS_H equ 37 ;******************************************************************************** ;Jump to initialisation code when PIC is reset ORG 0 call INITSYS goto SystemInitialise ;******************************************************************************** ;Interrupt vector ORG 4 ;Various initialisation routines, automatically called by GCBASIC SystemInitialise ;******************************************************************************** ;Start of the main program MAIN banksel TRISB clrf TRISB banksel PORTB clrf PORTB bsf PORTB,1 movlw 244 movwf SysWaitTempMS movlw 1 movwf SysWaitTempMS_H call Delay_MS bcf PORTB,1 movlw 244 movwf SysWaitTempMS movlw 1 movwf SysWaitTempMS_H call Delay_MS goto MAIN BASPROGRAMEND sleep goto $ ;******************************************************************************** ;Subroutines included in program ;******************************************************************************** Delay_MS incf SysWaitTempMS_H, F DMS_START movlw 10 movwf DELAYTEMP2 DMS_OUTER movlw 166 movwf DELAYTEMP DMS_INNER decfsz DELAYTEMP, F goto DMS_INNER decfsz DELAYTEMP2, F goto DMS_OUTER decfsz SysWaitTempMS, F goto DMS_START decfsz SysWaitTempMS_H, F goto DMS_START return ;******************************************************************************** INITSYS movlw 7 movwf CMCON clrf PORTA clrf PORTB return ;******************************************************************************** END
Dulces Lunas!¡.