Shop OBEX P1 Docs P2 Docs Learn Events
Download PropBASIC here... 00.01.14 LAST VERSION FOR BST - Page 20 — Parallax Forums

Download PropBASIC here... 00.01.14 LAST VERSION FOR BST

1171820222329

Comments

  • Kevin WoodKevin Wood Posts: 1,266
    edited 2010-07-25 04:18
    Hi Bean. I was messing around with PropBasic on a demo board, and the following code doesn't prodice the expected result...

    DEVICE P8X32A, XTAL1, PLL16X
    FREQ 80_000_000
    
    LEDs      PIN     23..16     LOW
    BLINKER   PIN     21         LOW
    
    PROGRAM Start
    
    Start:
      PULSOUT BLINKER, 0
      PAUSE 20
      GOTO Start
    END
    
    



    If I use 0 for the PULSOUT duration, I would expect the LED to be completely off, but it appears to be completely on. If I use 1 or higher, it lights up proportionally.

    Thanks.
  • $WMc%$WMc% Posts: 1,884
    edited 2010-08-16 17:54
    Bean

    I have down loaded the latest and greatest PDF for PropBasic, But I get and error that the file is corrupt when I try to open it. I'm having some issues while useing PST, I would like to read up a little more before I ask for help!

    Is the PDF problem on my end or is the file really corrupt?

    Thanks WMc
  • Tony B.Tony B. Posts: 356
    edited 2010-08-17 05:51
    $WMc%

    There have been corruption issues in the migration to the new forums. I have tried posting my copies. The file sizes look right I hope they work

    Tony
  • $WMc%$WMc% Posts: 1,884
    edited 2010-08-17 15:08
    Tony B

    Thanks
    This is a newer version over the one I have.This will help me out a lot.

    Thanks again
  • BeanBean Posts: 8,129
    edited 2010-08-17 16:25
    I just sent Brad the files for version 00.01.03

    Here is what I fixed:

    Fixed: RDWORD buffer($1C0), temp
    Fixed: name HUB STRING(10) = "Hello"
    Fixed: trailing "," in data causes offset in next data label (counts it as element). Now causes a syntax error.
    Fixed: PULSIN hangs with RCSLOW

    Bean

    * Note that with slow clocks PULSIN still returns microseconds, but the resolution is lower. For example with RCSLOW (20KHz), the resolution is 1000 microseconds. So the result will always be a multiple of 1000.
  • BeanBean Posts: 8,129
    edited 2010-08-18 04:23
    BradC has posted the new version.

    I cannot edit the title of this thread, so I'll just create an additional post when a new version is made.

    Bean
  • codemonkeycodemonkey Posts: 38
    edited 2010-08-18 07:19
    Looked through the propbasic thread, looks like it will be a great tool. Thanks for all your hard work bean and jonnymac

    Tried downloading propbasic docs from beginning of thread, getting adobe message "There was an error opening this document. The file is damaged and could not be repaired." This happens on both machines (running xp/vista and latest adobe reader, one machine i re-installed adobe). Any suggestions?

    Thanks.
  • BeanBean Posts: 8,129
    edited 2010-08-18 07:57
    I fixed the pdf files in the first post.
    They should be okay now.

    I see that I need to update my pdf (it still says 00.00.97). I'll get started on that right away.

    Bean
  • codemonkeycodemonkey Posts: 38
    edited 2010-08-18 08:24
    Yep, that cured the problem. Thanks for the quick response!
  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2010-08-18 13:02
    Bean,

    Will there be a dedicated PropBasic ide similar to the SXB ide in the near future?

    Bill M.
  • BeanBean Posts: 8,129
    edited 2010-08-18 14:35
    Bill,

    BST is the official IDE for PropBasic.
    Mainly because it makes PropBasic multi-platform (Mac/Linux/Windows).

    Bean
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-18 16:09
    If you write a program in PropBasic, compile it, send the compiled results to someone, can they easily change it back into the original PropBasic (BASIC) code? Or is it now PASM for good?!

    Humanoido
  • BeanBean Posts: 8,129
    edited 2010-08-18 17:50
    The PASM code has the original PropBasic source in it as comments. This is done so users can learn PASM.

    If you want to keep the original source private, you could go through and remove the comments. Or there is a switch that will omit the original source. I'd have to look at the compiler to see what it is. It is NOT supported by BST you would have to run the compiler from the command line.

    Bean
  • codemonkeycodemonkey Posts: 38
    edited 2010-08-19 18:55
    I'm also getting an error with PASD_062.zip, windows<xp, vista> is reporting the archive is either in unknown format or damaged. Thanks!
  • BeanBean Posts: 8,129
    edited 2010-08-20 10:04
    Okay, I think I have all the files fixed now.
    Let me know if it still doesn't work.

    Bean
  • codemonkeycodemonkey Posts: 38
    edited 2010-08-20 13:36
    Ok, they all seem to be working now. Thanks very much for your quick response.
  • $WMc%$WMc% Posts: 1,884
    edited 2010-08-20 17:08
    Hello All:
    '
    I'm looking for a memory map for the Propeller?
    '
    I need to map the memory of a cog or 2 and the HUB RAM so I can see what I'm doing wrong with My code in PropBasic.
    I keep running out of RAM/cog space.
    '
    I think I have used this tool before, But I can't find it anywhere!
    '
    Any help will be greatly appreciated.
  • Tony B.Tony B. Posts: 356
    edited 2010-08-20 17:41
    $WMc%

    I use the comand under "compile", "compile basic to Spin" in BST. I then open the file in the Spin Tool and use the "Run - compile current - view info..." or you could just use the F8 key to compile and view the memory map . Remember if you have task in you code when compiled to Spin it will generate multiple Spin files that will all need to be in the same directory for the Spin Tool to compile.

    Hope this helps

    Tony
  • $WMc%$WMc% Posts: 1,884
    edited 2010-08-21 14:44
    Tony B. wrote: »
    $WMc%

    I use the comand under "compile", "compile basic to Spin" in BST. I then open the file in the Spin Tool and use the "Run - compile current - view info..." or you could just use the F8 key to compile and view the memory map . Remember if you have task in you code when compiled to Spin it will generate multiple Spin files that will all need to be in the same directory for the Spin Tool to compile.

    Hope this helps

    Tony

    Tony

    Thanks for the reply. I was looking for a larger memery map, I know I have used this before, But I can't remeber were I got it from!
    '
    Thanks Again
  • BradCBradC Posts: 2,601
    edited 2010-08-21 16:39
    $WMc% wrote: »
    Tony

    Thanks for the reply. I was looking for a larger memery map, I know I have used this before, But I can't remeber were I got it from!
    '
    Thanks Again

    Why not use the list file window?
    View->Compiler Listing

    Then recompile your code with F9.
  • $WMc%$WMc% Posts: 1,884
    edited 2010-08-22 16:43
    BradC wrote: »
    Why not use the list file window?
    View->Compiler Listing

    Then recompile your code with F9.
    '
    BradC
    '
    This didn't go so well. At first I got a basic compiler error "NO PROGRAM" the second compile returned the same compiler error but also cleared the screen. Now if I try to open "MYcode.pbas" the screen is blank? Luckily I can still see the code in "MYcode.spin",So all hope(code) is not lost.
    '
    I've never tried the list file window before now. Is there a way to undo it?
    '
    I'm using bst0.19.3 and PropBasic-bst-00.01.03-72.exe
    '
    Thanks in advance for any help.
  • BradCBradC Posts: 2,601
    edited 2010-08-22 22:35
    $WMc% wrote: »
    '
    BradC
    '
    This didn't go so well. At first I got a basic compiler error "NO PROGRAM" the second compile returned the same compiler error but also cleared the screen. Now if I try to open "MYcode.pbas" the screen is blank? Luckily I can still see the code in "MYcode.spin",So all hope(code) is not lost.
    '
    I've never tried the list file window before now. Is there a way to undo it?

    Click the close button at the top of the list file window.

    The list file does nothing with the basic programs themselves. When the compiler compiles the resulting spin code it puts the listing in that window.
  • $WMc%$WMc% Posts: 1,884
    edited 2010-08-24 18:22
    Hello All
    '
    Is any one having RAM space problems with PropBasic 00.01.03-72
    '
    Like PC error (943.8) 78 Longs to many, And (981.24) expected spin "etc.,bla,bla,bla"
    '
    P.S. Where can I find a list of what the error messages mean. Like (943.24) and (981.24) ?
    '
    I have tried to work through this with out help,But I'm at a loss.
    '
    Any help would be greatly appreciated.
  • BeanBean Posts: 8,129
    edited 2010-08-24 18:38
    By default PropBasic uses NATIVE PASM code. So all of the generated pasm must fit within the 496 instruction cog space.

    It sounds like your program is just too big.

    Try to put often-used commands into a subroutine, or use LMM.

    Bean
  • BradCBradC Posts: 2,601
    edited 2010-08-25 03:36
    $WMc% wrote: »
    Hello All
    '
    Is any one having RAM space problems with PropBasic 00.01.03-72
    '
    Like PC error (943.8) 78 Longs to many, And (981.24) expected spin "etc.,bla,bla,bla"
    '
    P.S. Where can I find a list of what the error messages mean. Like (943.24) and (981.24) ?


    Are you sure that does not mean :
    Program Counter (PC) error at line 943, character 8?

    And likewise,
    At line 981, character 24 I expected to see some "etc..bla.bla.bla"?
  • $WMc%$WMc% Posts: 1,884
    edited 2010-08-25 19:42
    Thanks for the feed back guys
    '
    Now I know what the error codes mean, Thanks
    '
    I ran the spin [PASM] version of my code and added line-numbers, WOO! 1039 lines, No wonder it wouldn't compile.
    'Thanks BradC
    'Thanks Bean
    '
    I can see me reducing my code by 15 to 25%, But I still have about 50% to go to complete the full demo for the project I'm working on. A spiffy PST window hogs up a lot of code space, But it makes a new product that much more appealing to purchase.
    '
    I have seen some post on the use of LMM, But I have never tried using it? Any good links on how to learn how to use this method?
    '
    Thanks in advance for any help or advice.
  • BaggersBaggers Posts: 3,019
    edited 2010-08-29 03:20
    @Bean, is there a way to point to a buffer in a LDATA statement eg

    scrptr LDATA @scrbuf

    scrbuf hub word (512)=0


    Cheers,
    Baggers.

    PS, I've got TV.spin into it's own TV.LIB file I'm just tidying the pointers etc up a bit now.
    will post later today.
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-08-29 22:05
    Very nice continued work Bean. Can PropBASIC fit into one cog? I'm looking for prop languages that can run self contained in one cog. Thanks very much.

    Humanoido
  • BeanBean Posts: 8,129
    edited 2010-08-30 04:12
    @Baggers,
    Well the problem is that all HUB variables are relative to PAR. But I'll look into how I might be able to do something like that.

    @Humanoido,
    Unless you use TASKs, then yes your PropBasic program will only use one cog.

    Bean
  • Beau SchwabeBeau Schwabe Posts: 6,562
    edited 2010-08-30 05:03
    Bean,

    In reference to Baggers question, could you do it by reference? ...


    (using a Spin example ... sorry)
    VAR
    byte Buffer2[1000]
    long Buffer1[100]
    long Buffer1Address,Buffer2Address
    
    PUB MainProgram
        Buffer1Addresss := @Buffer1
        Buffer2Addresss := @Buffer2
        cogstart(@Pasmtop,@Buffer1Address
    

    ...this way Buffer1Addresss and Buffer2Addresss are relative to one another,
    but within PAsm you read it and treat the contents that you read with rdlong as the Address, so to get the 'actual' contents, you read with rdlong (<-- or what ever suits the data format) again...
    DAT
    Pasmtop		mov	temp,	par
                    rdlong  _BufferAddress1,	  temp
                    rdlong  _BufferAddress1Contents,  _BufferAddress1   
    
    		add	temp,	#4
                    rdlong  _BufferAddress2,	temp
                    rdbyte  _BufferAddress2Contents,  _BufferAddress2
    

    ...I have used a similar method several times this way to reference variable that are not arranged sequentially at Spin level. This method also helps to bridge the gap between reading variables defined as long,word or byte without having to calculate the offset for the address pointer.
Sign In or Register to comment.