Shop OBEX P1 Docs P2 Docs Learn Events
Self modifying code on basic stamp testing — Parallax Forums

Self modifying code on basic stamp testing

MMISCOOLMMISCOOL Posts: 36
edited 2005-11-30 15:38 in General Discussion
heLLO, I RECENTLY MADE A PROGRAMING LANGUAGE FOR THE PC CALED SMBI (HTTP://SMBI.TRIPO.COM) AND HAVE RECENTLY FOUND MY SLEF INTERRESTED IN PUTING IT ON A WRIST WATCH. SMBI STANDS FOR SELF MODIFYING BASIC INTERPERTER. i JUST CREATED FROM SCRACH A VERSION FOR THE BASIC STAMP AND I NEED SOMEONE TO TEST IT BECOUSE OF LACK OF SERIAL PORTS AND ALL THE PLACES TO BUY AAPTERS CLOSED FOR THE WEEKEND.EMAIL ME AT SMBI.SOFT@GMAIL.COM OR MMISCOOL@GMAIL.COM.

tHE ATACHED FILE IS THE INTERPERTER THAT REQUIERS THE EEPROM HOWEVER IF YOU EMAIL ME I WILL SEND YOU A VRSION THAT DOES NOT


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"playing with it is the begining to understanding it"
confuciouse say "man who cach bigest fish eat well"
smbi.tripod.com

coolsoftware4free.tripod.com

Post Edited (MMISCOOL) : 11/30/2005 4:20:40 PM GMT

Comments

  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2005-11-24 18:57
    And Here's The Above Message Not In CaPsLoCk
    hello, i recently made a programing language for the pc caled smbi (http://smbi.tripo.com) and have recently found my slef interrested in puting it on a wrist watch. smbi stands for self modifying basic interperter. i just created from scrach a version for the basic stamp and i need someone to test it becouse of lack of serial ports and all the places to buy aapters closed for the weekend. if you want to test it and not put it on kazza nono email me at smbi.soft@gmail.com or mmiscool@gmail.com.

    the atached file is the interperter that requiers the eeprom however if you email me i will send you a vrsion that does not


    *NOTE: THE LINK DOES NOT WORK!

    Post Edited By Moderator (Jon Williams (Parallax)) : 11/24/2005 7:10:27 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-24 22:33
    I would surmise the link was supposed to be: http://smbi.tripod.com/

    Th OP is not verifying spelling or links in this case, and in fact this post was moved from the Projects forum.· If the OP doesn't read private messages either, then perhaps they aren't aware of it's new location.· Oh, and bear in mind, "[font=Arial,Helvetica,sans-serif color=black size=1]ALL DOWNLOADS COME WITHOUT ANY WARRANTY WHAT SO EVER!!!"· <---from the site[/font]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • MMISCOOLMMISCOOL Posts: 36
    edited 2005-11-26 18:23
    i READ THE LAST POST. tHAT IS MY WEB SITE. SORY I MISPELT IT IN THE FIRST SECTION. i DO HAVE A DISPLAMER ON MY WEB SITE THAT IS ABOUT SITES LINKED TO IT. i REALY DON'T HAVE MANY DOWNLOADS.
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-11-26 18:39
    I find it interesting that you are trying to sell Open Office (http://coolsoftware4free.tripod.com/id7.html) yet you can get open office for free here: http://www.openoffice.org/ -

    I also find it interesting that you are trying to sell software such as Mozilla (http://coolsoftware4free.tripod.com/id9.html) that is also free: (http://www.mozilla.org/)

    Just keep in mind the GPL and definition of Open Souce:

    http://www.opensource.org/docs/definition.php

    http://www.gnu.org/copyleft/gpl.html


    In addition to that you are trying to sell software for $399.95 that you are having members on these forums help you with. (Obviously it is not finished, and not in a state that it could be sold.)-

    Please be sure that any software you sell is not in violation of copyright, GPL, Open Source, or any other license that it may be subject to.

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com

    Post Edited (Ryan Clarke (Parallax)) : 11/26/2005 7:34:56 PM GMT
  • MMISCOOLMMISCOOL Posts: 36
    edited 2005-11-26 20:27
    PLEASE EXCUSE SPELLING ERORS.

    GO AHEAD AND USE THIS CODE HOWEVER YOU WANT. IT IS NOT FINISHED. I HAVE DONE A LOT OF OF WORK ON IT SINCE I FIRST POSED IT. hERE IS THE CURENT. IF YOU WANT TO USE THIS USE IT FOR ANY THING YOU WANT.

    THE SOFTWARE ON MY WEB SITE IS FOR WINDOWS. SMBI IS MY OWN CREATION.
    SMALL SMBI IS JUST A LITLE PROJECT I STARTED ABOUT 3 OR FOUR DAYS AGOE.

    IF ANY ONE WANTS TO HELP WORK ON IT LET EM HELP. ONCE I BUY ANOTHRER BASIC STAMP (CONSIDERING THE $30 OEM KIT) TO REPLAICE THE HOMEWORK BORD I BROKE I WILL GET RIGHT BACK AND START GETING THE HARDEWARE CONTROALES AND A 1 CHARACTER DISPLAY PROGRAMED I WILL TRY TO SQUEEZ IT IN TO THE SMALLEST PACAGE I CAN AND GET IN TO MAKING PROTOTYPES.

    ALL THE SCEMATICS AND CODE WILL BE POSTED ON MY SITE ONCE I MAKE A PAGE FOR IT (SO THAT ANY ONE CAN MAKE ONE) AND ONCE I ACTUALY START GETING RUNIG ON STAMP HARDEWARE AND NOT CHEATING THRUE EDITING THE SOURCE CODE FOM ONE OF THE EXAPLE PROGRAMS IN THE VIRTUAL STAMP WORKS (VERY NICE PROGRAM BUT A LITLE HIGH IN COST). I WILL AFTER THAT IF I GET IT REALY WORKINH TRY TO SELL A COUPLE OF KITS AND MABE ONE OR 2 ASEMBLED WATCHES. MIGHT BE WORTH A TRY.

    I MAKE A BIG DISTINCTION BETWEEN SMBI AND SMALL SMBI. SMBI WAS SOMETHING I CAME UP IN A BORING MATH CLAS AND I WROTE DOWN ON PAPER. IF ANY ONE WANTS TO TEST A COPY PLEASE EMAIL ME @ MMISCOOL@GMAIL.COM . I WILL SEND YOU A FREE COPY BECOUSE IT IS IN TESTING STAGES. I LIST ON MY WEB SITE THAT IT IS BETA SOFTWARE.


    ALSO THE GPL AND GNU ALOW'S ANY ONE TO COPY, MODIFY AND SELL THE SOFTWARE AS LONG AS IT STILL RETANES IT'S ORIGINAL LICENS AGREEMENT IE.
    "You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

    *You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. *" (http://www.gnu.org/copyleft/gpl.html). THE STUF I SELL ON MY WEB SITE COMES ON A CD SO I AM IN COMPLYANCE WITH THE GNU.



    THE BELOW IS THE CURENT VERSION OF SMBI SMALL. GO AHEAD AN DO ANY THING YOU WANT USING IT SHORT OF HURTING ANY ONE. smile.gif

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    '
    [noparse][[/noparse](C) 2005, MICHAEL MOLINARI ]
    aa VAR Byte
    bb VAR Byte
    cc VAR Byte
    dd VAR Byte
    ee VAR Byte


    CURENTLINE VAR Byte
    BLA VAR Byte


    A VAR Byte
    B VAR Byte
    C VAR Byte
    D VAR Byte
    E VAR Byte
    F VAR Byte
    G VAR Byte
    H VAR Byte
    I VAR Byte
    J VAR Byte

    OUT VAR Byte

    BLABLA VAR Nib
    EN VAR Byte

    MENUE:

    READ 0 , AA
    READ 1 , BB
    READ 2 , CC
    READ 3 , DD
    READ 4 , EE

    CURENTLINE = 0
    DEBUG "(A) EDIT (B) RUN"
    DEBUGIN BLA
    IF BLA = "A" THEN GOTO EDITOR ELSE GOTO EXICUTE

    '
    [noparse][[/noparse]THIS IS THE EDITOR]
    EDITOR:
    DEBUG "HOW MANY LINES?"
    DEBUGIN EN
    EN = EN - 65
    EDITOR_LOOP:
    DEBUG "[noparse][[/noparse]A] "
    DEBUGIN BLA
    WRITE BLABLA * 5 + 0, BLA

    DEBUG " "
    DEBUGIN BLA
    WRITE BLABLA * 5 + 1, BLA

    DEBUG "[noparse][[/noparse]C] "
    DEBUGIN BLA
    WRITE BLABLA * 5 + 2, BLA

    DEBUG "[noparse][[/noparse]D] "
    DEBUGIN BLA
    WRITE BLABLA * 5 + 3, BLA

    DEBUG "[noparse][[/noparse]E] "
    DEBUGIN BLA
    WRITE BLABLA * 5 + 4, BLA

    BLABLA = BLABLA + 1
    IF BLABLA > EN THEN GOTO MENUE
    GOTO EDITOR_LOOP



    '

    [noparse][[/noparse]THIS IS THE INTERPERTER]
    EXICUTE:

    IF AA = "D" THEN GOSUB DISPLAY_IT
    IF AA = "I" THEN GOSUB INPUT_IT
    IF AA = "C" THEN GOSUB COMPARE_IT
    IF AA = "E" THEN GOSUB EDIT_IT
    IF AA = "M" THEN GOSUB MATH
    IF AA = "O" THEN GOSUB PIN_H_L


    IF AA = "G" THEN GOTO GOTO_IT
    IF CURENTLINE = EN THEN DEBUG "-DONE-":GOTO MENUE
    GOTO GOTO_NEXT


    DISPLAY_IT:
    IF BB = "V" THEN GOTO DISPLAY_VAR
    DEBUG CC
    RETURN

    DISPLAY_VAR:
    IF CC = "A" THEN DEBUG A
    IF CC = "B" THEN DEBUG B
    IF CC = "C" THEN DEBUG C
    IF CC = "D" THEN DEBUG D
    IF CC = "E" THEN DEBUG E
    IF CC = "F" THEN DEBUG F
    IF CC = "G" THEN DEBUG G
    IF CC = "H" THEN DEBUG H
    IF CC = "I" THEN DEBUG I
    IF CC = "J" THEN DEBUG J
    RETURN


    INPUT_IT:
    DEBUG " ? "
    IF BB = "A" THEN DEBUGIN A
    IF BB = "B" THEN DEBUGIN B
    IF BB = "C" THEN DEBUGIN C
    IF BB = "D" THEN DEBUGIN D
    IF BB = "E" THEN DEBUGIN E
    IF BB = "F" THEN DEBUGIN F
    IF BB = "G" THEN DEBUGIN G
    IF BB = "H" THEN DEBUGIN H
    IF BB = "I" THEN DEBUGIN I
    IF BB = "J" THEN DEBUGIN J
    RETURN


    GOTO_NEXT:
    BB = CURENTLINE + 66
    GOTO_IT:

    BLA = BB - 65
    READ BLA * 5 + 0 , AA
    READ BLA * 5 + 1 , BB
    READ BLA * 5 + 2 , CC
    READ BLA * 5 + 3 , DD
    READ BLA * 5 + 4 , EE
    CURENTLINE = BLA
    GOTO EXICUTE

    COMPARE_IT:
    IF CC = DD THEN AA = "G"
    RETURN

    EDIT_IT:
    IF DD = "V" THEN GOSUB EDIT_VAR
    WRITE BB * 5 -1 + CC, EE
    RETURN

    EDIT_VAR:
    IF DD = "A" THEN EE = A
    IF DD = "B" THEN EE = B
    IF DD = "C" THEN EE = C
    IF DD = "D" THEN EE = D
    IF DD = "E" THEN EE = E
    IF DD = "F" THEN EE = F
    IF DD = "G" THEN EE = G
    IF DD = "H" THEN EE = H
    IF DD = "I" THEN EE = I
    IF DD = "J" THEN EE = J
    RETURN

    MATH:
    IF BB = "+" THEN BLA = CC + DD
    IF BB = "-" THEN BLA = CC - DD
    IF BB = "*" THEN BLA = CC * DD
    IF BB = "/" THEN BLA = CC / DD

    IF EE = "A" THEN A = BLA
    IF EE = "B" THEN B = BLA
    IF EE = "C" THEN C = BLA
    IF EE = "D" THEN D = BLA
    IF EE = "E" THEN E = BLA
    IF EE = "F" THEN F = BLA
    IF EE = "G" THEN G = BLA
    IF EE = "H" THEN H = BLA
    IF EE = "I" THEN I = BLA
    IF EE = "J" THEN J = BLA
    RETURN

    PIN_H_L:
    IF BB = "H" THEN HIGH CC
    IF BB = "L" THEN LOW CC
    RETURN

    LED_TEXT_OUT:
    'PUT CODE HERE TO CONTROAL LED DISPLAY"
    RETURN

    CHAR_IN:
    'PUT CODE TO GET CHARACTER FROM USER IN THIS AIRYA
    RETURN

    Post Edited (MMISCOOL) : 11/26/2005 8:32:47 PM GMT

  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-11-26 20:37
    You must include the source, and state that the software being sold is under the GPL or Open Source. It does not state that anywhere on your site.

    I still am wondering why you are trying to sell software that isn't finished yet? (Your code, you've stated here several times, isn't finished. Yet it is for sale on your site.)

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • MMISCOOLMMISCOOL Posts: 36
    edited 2005-11-26 20:45
    BIG DIFORENCE BETWEEN THE CODE HER AND THE SMBI ON MY WEB SITE. SMBI ON MY WEB SITE IS A WINDOWS PROGRAMING LANGUAG WITH A COMPILER.

    SMALL SMBI (THIS IS FOR THE BASIC STAMP) IS JUST A LITLE PROJECT.


    BBBBBB IIIIIIIIIIIII GGGGG
    B B III G
    B B III G
    BBBBBB III G
    B B III G GGG
    B B III G G
    B B III G G
    BBBBBBB IIIIIIIIIIIIII GGGGG


    DIFORENCE

    i SHALL HAVE TO COME UP WITH A DIFORENT NAME FOR THIS PROJECT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-26 22:02
    And perhaps you could keep everything in one thread -- it looks like you've got the same thing in three places.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Tom WalkerTom Walker Posts: 509
    edited 2005-11-28 16:26
    FWIW, the intention of the boilerplate of the GPL allows for charging a NOMINAL fee for the duplication of the software. This was intended to allow the duplicator to recoup a pittance for their time and material...not as a "development fee". The other "charge" you pointed out is that for providing warranty service...this is one of the ways that Red Hat makes their money...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • John R.John R. Posts: 1,376
    edited 2005-11-28 16:34
    It is also my understanding, that if any of the GPL (or similarly licensed) tools were used to create YOUR product, it is also subject to being offered under the GPL, including being made available for free, with source code.

    Thus if you used something like gcc to create your SMBI, while you can indeed sell the product for any price you can get, you are also obligated to provide it, and the source code, free of charge.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2005-11-28 22:43
    Guys. GPL is not the center of this topic. Let's get off of it
  • metron9metron9 Posts: 1,100
    edited 2005-11-29 17:36
    To reduce your code size and make your program faster you can use arrays instead of separate variables.




    Your code:
    
    A VAR Byte
    B VAR Byte
    C VAR Byte
    D VAR Byte
    E VAR Byte
    F VAR Byte
    G VAR Byte
    H VAR Byte
    I VAR Byte
    J VAR Byte
    
    EDIT_VAR:
    IF DD = "A" THEN EE = A
    IF DD = "B" THEN EE = B
    IF DD = "C" THEN EE = C
    IF DD = "D" THEN EE = D
    IF DD = "E" THEN EE = E
    IF DD = "F" THEN EE = F
    IF DD = "G" THEN EE = G
    IF DD = "H" THEN EE = H
    IF DD = "I" THEN EE = I
    IF DD = "J" THEN EE = J
    RETURN
    
    
    




    Using arrays

    
    A_J VAR Byte(9)
    
    EDIT_VAR:
    IF DD >= "A" AND DD<= "J" THEN EE = A_J(DD-65)
    RETURN
    
    
    




    That only uses one line of code and allows for commands "A" through "Z" of course adding other if/then code you can handle "a" through "z" , "0" thru "9" etc...
    The ascii code for the letter A is 65 so subtracting 65 from the value in DD you get 0 as a pointer to the first element of the A_J array





    I have a question on your windows SMBI , what language did you use to write the code?
    You may also be interested in a project called freebasic at http://www.freebasic.net/ for windows, it's a really nice basic compiler based on qbasic style.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think outside the BOX!
  • MMISCOOLMMISCOOL Posts: 36
    edited 2005-11-30 15:38
    I wrote the windows version of smbi in liberty basic. I did use arays in it and files. That helps alot when you have the resources of a computer. If you want a copy i can give you one.

    thank you for reminding me that i can use arays to store data. i forgot about that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "playing with it is the begining to understanding it"
    confuciouse say "man who cach bigest fish eat well"
    smbi.tripod.com

    coolsoftware4free.tripod.com
Sign In or Register to comment.