Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Anyone using BoostBASIC? Wrote a utility for it.

Status
Not open for further replies.

mramos1

Active Member
I followed a link from electro-tech-online.com and found something called BoostBASIC. It looks to fit my needs, as I can inline assemble and the code looks tight. The price when it is released will be around $70.

It is the same engine as the BoostC. Anyway, they say Boost will integrate with MPLABS. And I am looking for a BASIC that integrates. I did not figure out how to make it work inside of MPLABS and I did see a .cof files which I will research later.

What I really want though is to write in BASIC, compile and get an MPLABs compatible .ASM file with my BASIC lines above each section of ASM code. Boost might do that, the BoostC claims it does.

What I did do though, was write a Win32 program to take thier .casm file (a .lst file) with the BASIC lines in it and dropped them (commented of course) into the .ASM and it loads and work great with MPLABS.

I only have the MAIN done right now, I will add the subs and functions when I have time, but it is cool.. Finally getting close.

If anyone knows if the BoostBASIC will directly work in MPLABS, please let me know. Otherwise, I will keep adding to my program..
 
blueroomelectronics said:
Got a link for it?
Hey Bill.

I thought Nigel would be ashamed of me, one more attempt at BASIC on the PIC chips, on the cheap.

http://sourceboost.com/ main page (the have a nice C compiler too)

The program is here.
**broken link removed**

Will attach the sbasm.exe, it only does the main() code now, but I will add the subs and functions. Also the dims (EQUs, etc).

The program would do it all now, but they flip the order of the subroutines when they process the file. So if you have adc_init and adc_read, the LST file has adc_read then adc_init. I caught that after I wrote it. So I will add two more passes to the program.

Here is a sample, it looks a lot better in MPLABS in color ;)

Code:
*************  ORG  *************
main
; { main ; function begin
    MOVLW 0x01
    BSF STATUS, RP0
    MOVWF gbl_trisio
    CALL adc_init_00000
label268438724
    CALL adc_read_00000
; VAR_LIFETIME_END:$ret Id:0x10000CB1
    MOVF CompTempVarRet480, W
    MOVWF gbl_a
    MOVLW 0x32
    SUBWF gbl_a, W
    BTFSS STATUS,C
    GOTO    label4026532478
    BTFSS gbl_a,7
    GOTO    label268438729
label4026532478
    BCF gbl_relay,2
    GOTO    label268438731
label268438729
    BSF gbl_relay,2
label268438731
    BSF gbl_led,1
    MOVLW 0xF4
    MOVWF delay_ms_00000_arg_del
    CALL delay_ms_00000
    BCF gbl_led,1
    MOVLW 0xF4
    MOVWF delay_ms_00000_arg_del
    CALL delay_ms_00000
    GOTO    label268438724
; } main function end





*************  AFTER  *************
main
; { main ; function begin
; 
;     trisio = ( 00000001b )       'pin A0 as input for analog input
    MOVLW 0x01
    BSF STATUS, RP0
    MOVWF gbl_trisio
;     call adc_init()              'initialize the adc port
    CALL adc_init_00000
;     
;     Do while 1 
label268438724
;         a = call adc_read()
    CALL adc_read_00000
; VAR_LIFETIME_END:$ret Id:0x10000CB1
    MOVF CompTempVarRet480, W
    MOVWF gbl_a
;         if a < 50 then
    MOVLW 0x32
    SUBWF gbl_a, W
    BTFSS STATUS,C
    GOTO    label4026532478
    BTFSS gbl_a,7
    GOTO    label268438729
label4026532478
;            relay = 0
    BCF gbl_relay,2
;         else
    GOTO    label268438731
label268438729
;            relay = 1
    BSF gbl_relay,2
label268438731
;         end if
;         led=1                    'light LED                    
    BSF gbl_led,1
;         call delay_ms(500)      'delay to take readings after 1/2 seconds
    MOVLW 0xF4
    MOVWF delay_ms_00000_arg_del
    CALL delay_ms_00000
;         led = 0                 'off LED
    BCF gbl_led,1
;         call delay_ms(500)      'delay to take readings after 1/2 seconds
    MOVLW 0xF4
    MOVWF delay_ms_00000_arg_del
    CALL delay_ms_00000
;     Loop
    GOTO    label268438724
; } main function end
 

Attachments

  • sbasm.zip
    24.3 KB · Views: 79
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top