Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 1, 2015 19:27:23 GMT -5
I'm sure some of you may have figured out what I was up to with the BEX licensing and such, and since it seems to be okay to use BASICASM.CNI, and since devster never responded to my PM (he's logged on since ), I figured it would be okay to move along with the project and see if I could potentially do some fixing to BEX and such. This will only be for the Genesis/Mega Drive, though. No Sega CD or 32X support, at least not anytime soon. Here's a video of the progress so far: youtu.be/ORzcj_lW8ioSo far, the only things that are functional are the PRINT command and math operators, and a new function POW() for exponents. I've also fixed the division by 2 (a = 10: b = a / 2 ' doesn't function unless a variable is assigned 2), and added another operator: ^ (same as the pow function). Anywho, just wanted to share
|
|
|
Post by landeel on Nov 2, 2015 7:21:41 GMT -5
This is nice! Will you add negative numbers and floats?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 2, 2015 7:38:19 GMT -5
You can add negative numbers in BEX, so yes it won't display a negative sign, though, since these are unsigned variables (you would sacrifice a bit for the negative flag, so an int couldn't be any higher than 32767. Same with floats as you'd need a whole new numbering system.
|
|
|
Post by landeel on Nov 2, 2015 8:02:25 GMT -5
I'm not demanding or anything, I'm just very excited SGDK uses integers and long integers to simulate floats: github.com/Stephane-D/SGDK/wiki/Tuto-MathsOf course this is slow, but very useful sometimes. FreeBASIC uses SHORT for signed short integers (-32768 to 32767) and USHORT for unsigned short integers (0 to 65535). In BEX, type INTEGER is already taken for the unsigned integers, maybe you could add a "SINTEGER" for signed integers. You could also consider BYTE integers. I really appreciate your effort! Good luck with the compiler!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 2, 2015 8:12:50 GMT -5
Thanks! Oh, I'm not saying it won't ever get done, but I think the important part is getting it to be 100% functional and support all BEX Genesis/mega drive functionality first The nice thing about how I'm setting it up is that you'll be able to use your own libraries and functions, so if something needs fixing or new additions want to be added, you'll be able to do that from the start
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 6, 2015 22:35:25 GMT -5
Got some more work done on this this week:
- IF...ELSE...END IF blocks are functional - Argunerics are functional - Added system variables - Added bit assigning
Here's some code of the 2nd half:
a = 3 ' 0011 = 3 a.3 = @on ' 1011 = 11 PRINT a a.1 = @off ' 1001 = 9 PRINT a
|
|
|
Post by vetea on Nov 7, 2015 4:43:47 GMT -5
Hey Elusive, Thanks for your big works ! One interest thing to do will be the type variable. Ex: Type Human Life as integer Speed as integer Name$ as string End type Human.life=100 Human.speed=2 Human.name$="Elusive" That will be VERY cool !! And sorry, I don't understand your exemple below ... :s Vetea
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 7, 2015 8:12:03 GMT -5
I love types I'll probably start up on requests after the compiler is done but I did think about those. The system variables are the variables with the @ symbol. They can't be reassigned values (they're just replaced with the actual number they represent), so @on and @true = 1, and @off and @false = 0. In BEX, you can't assign bits natively, but you can read them. Devster calls them argumerics (a.0 to a.15 for integers and up to .31 for longs). The above code sets a to the value of 3, then the 3rd bit is set so it changes a = 11, then the next assignment sets bit 1 to off, which makes a = 9.
|
|
|
Post by lunchbox on Nov 7, 2015 20:11:45 GMT -5
Ah very cool, Good to see this is happening!!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 8, 2015 1:41:16 GMT -5
After a lot of mucking around with the IF...ELSE/ELSEIF...END logic, I think I've finally finished that portion up. I did some nesting and multiple IF...END IF statements to make sure everything worked, so there's that
|
|
|
Post by landeel on Nov 8, 2015 9:14:35 GMT -5
Will you make your compiler open source?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 8, 2015 13:22:11 GMT -5
Will you make your compiler open source? Most likely not. Sorry.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 9, 2015 15:16:50 GMT -5
Will you make your compiler open source? Most likely not. Sorry. In fact, I tried to convince him to be so closed source that only he could supply special genesis carts compatible with extra features in his BASIC compiler. I keep trying, though
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 9, 2015 16:21:40 GMT -5
In fact, I tried to convince him to be so closed source that only he could supply special genesis carts compatible with extra features in his BASIC compiler. I keep trying, though It doesn't quite work like that, though You basically want a flash drive storage on cart, and while not impossible, it's just expensive and impractical (by expensive, it would probably be near Everdrive expensive). Maybe once this is done, and you ask really really nicely haha
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 9, 2015 17:15:31 GMT -5
In fact, I tried to convince him to be so closed source that only he could supply special genesis carts compatible with extra features in his BASIC compiler. I keep trying, though It doesn't quite work like that, though You basically want a flash drive storage on cart, and while not impossible, it's just expensive and impractical (by expensive, it would probably be near Everdrive expensive). Maybe once this is done, and you ask really really nicely haha Just joking around. If ya ain't excited about it then there's a good reason.
|
|