gtBASIC

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: gtBASIC

Post by at67 »

giobbi wrote: 19 Aug 2021, 01:51 I managed to compile it, I got the gtBASIC.exe working (I tried to compile the invader.gbas file and it runs fine with the on-line emulator).
I used the cmake from the command line, since cmake_gui can't find Visual Studio -> I have the Visual Studio 2017 community installed.
Good stuff.
giobbi wrote: 19 Aug 2021, 01:51 However the compiled gtemuAT67.exe (as release version) refuses to work under Windows 7. I placed both gtemuAT67.exe and the SDL2.dll in an empty folder but, when I run it, I got the dialog box error "impossible to execute the program (0xc000007b)" [message freely translated from the Italian version of Win7, LOL].
That means you are missing the Visual Studio C RunTime, (CRT), go to Microsoft's web page and download the appropriate one for you.
giobbi wrote: 19 Aug 2021, 01:51 1) should gtemuAT67.exe work under Windows 7 ? (and, just in case: why mine doesn't?)
EDIT: I downloaded your release (EMU.zip) from another thread and it works fine - BTW mine is 2168 kB vs. yours, 487 kB
Yes you can build it for Win7, I built a 32bit Win7 version for someone a year or so ago.
giobbi wrote: 19 Aug 2021, 01:51 2) the gtBASIC doesn't resemble the Commodore BASIC :D , based on what I've seen, it seems to me a crossroad between C++ and Assembly... that's fine, of course; but I'm feeling a little lost. Is there any documentation about commands, functions and syntax? I've seen you left a lot of info in this thread, but I wish to know if there's something like a guide I could learn from.
It's supposed to be a modern BASIC with my own flavour of syntax and an inbuilt assembler. I have documentation partially done, but it's not ready to be released yet. Have a look at all the tutorials and examples under the Contrib/at67/gbas folder. I put a lot of effort in to those to make them simple to understand and use as foundations for your own projects.
giobbi
Posts: 38
Joined: 11 Jul 2021, 22:12

Re: gtBASIC

Post by giobbi »

at67 wrote: 19 Aug 2021, 10:51 That means you are missing the Visual Studio C RunTime, (CRT), go to Microsoft's web page and download the appropriate one for you.
Do you mean the Visual C++ redistributable? I installed both x86 and x64 (2017 - 14.16.27033)...

at67 wrote: 19 Aug 2021, 10:51 It's supposed to be a modern BASIC with my own flavour of syntax and an inbuilt assembler. I have documentation partially done, but it's not ready to be released yet. Have a look at all the tutorials and examples under the Contrib/at67/gbas folder. I put a lot of effort in to those to make them simple to understand and use as foundations for your own projects.
Yep, just kidding about Commodore BASIC. Of course a modern language with a more structured syntax and a "ready to go" assembler inside is great, of course.

Ok I will start using the examples, thank you for your support!
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: gtBASIC

Post by at67 »

giobbi wrote: 19 Aug 2021, 11:05 Do you mean the Visual C++ redistributable? I installed both x86 and x64 (2017 - 14.16.27033)...
Yes, the redistributable contains the CRT and whatever other DLLs/LIBs your current version of Windows and Visual Studio requires, (i.e. STL, C++, etc).

Did you download the correct one for your version of Windows and your version of Visual Studio?

If you google "<your version of Windows> <your version of Visual Studio> 0xc000007b" it should be pretty clear what is wrong.
at67 wrote: 19 Aug 2021, 10:51 Ok I will start using the examples, thank you for your support!
Let me know how you go.
giobbi
Posts: 38
Joined: 11 Jul 2021, 22:12

Re: gtBASIC

Post by giobbi »

at67 wrote: 20 Aug 2021, 20:24
giobbi wrote: 19 Aug 2021, 11:05 Do you mean the Visual C++ redistributable? I installed both x86 and x64 (2017 - 14.16.27033)...
Yes, the redistributable contains the CRT and whatever other DLLs/LIBs your current version of Windows and Visual Studio requires, (i.e. STL, C++, etc).

Did you download the correct one for your version of Windows and your version of Visual Studio?

If you google "<your version of Windows> <your version of Visual Studio> 0xc000007b" it should be pretty clear what is wrong.
at67 wrote: 19 Aug 2021, 10:51 Ok I will start using the examples, thank you for your support!
Let me know how you go.
No success :-(

I installed the Visual Studio 2017 and the C++ redistributables 2017 (both x64 and x86); I got all the installers from the same page on the microsoft site.
I also uninstalled all the older C++ redistributables and I verified I have the .NET installed (I have the 4.8 releas)


It still returns me the 0xc000007b error. Must to be said I'm using your pre-compiled emulator, so I don't absolutely need to discover why it doesn't work... still, I wish to know how to fix it.
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: gtBASIC

Post by at67 »

giobbi wrote: 21 Aug 2021, 21:07 It still returns me the 0xc000007b error. Must to be said I'm using your pre-compiled emulator, so I don't absolutely need to discover why it doesn't work... still, I wish to know how to fix it.
I'd have to check, but I am fairly certain that was compiled for a copy of Windows7 x86, i.e. a 32bit executable.

The way to fix it, is to compile the source yourself on your own specific hardware/OS, relying on outdated pre-compiled executables is fraught with dangers, (even if I compiled them).
giobbi
Posts: 38
Joined: 11 Jul 2021, 22:12

Re: gtBASIC

Post by giobbi »

at67 wrote: 22 Aug 2021, 00:12 The way to fix it, is to compile the source yourself on your own specific hardware/OS, relying on outdated pre-compiled executables is fraught with dangers, (even if I compiled them).
The problem is that YOUR executable works fine, while the one I compiled on my PC doesn't, LOL
However no need to become crazy with that, since yours works and it's enough for me at the moment.
wbushby
Posts: 208
Joined: 16 Jul 2021, 10:59

Re: gtBASIC

Post by wbushby »

Hi,
I have done a rough port of an atari assembler game to GTBasic. I have 2 issues at moment that are causing me some problem

1) Warning, you have used the maximum number of zero page variables...Is there some way to reserve space for internal variables ?

2) XXXXXX PROBLEM SOLVED XXXXXXX (What is the syntax of IF...THEN ...ELSE or ELSEIF ?)
Attachments
gbasissue.jpg
gbasissue.jpg (184.49 KiB) Viewed 1479 times
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: gtBASIC

Post by at67 »

- Use arrays or DEF BYTE/WORD when you run out of zero page vars, both of these are somewhat slower to access than zero page vars, so plan accordingly.

Code: Select all

IF ... THEN ...


IF ...
   ...
ENDIF


IF ...
   ...
ELSE
   ...
ENDIF


IF ...
   ...
ELSEIF ...
   ...
ELSEIF ...
   ...
ELSE
   ...
ENDIF
ELSE must always come after all other ELSEIF's
wbushby
Posts: 208
Joined: 16 Jul 2021, 10:59

Re: gtBASIC

Post by wbushby »

Thank you for the information. It has been 40 years since I wrote any basic so a bit rusty.
wbushby
Posts: 208
Joined: 16 Jul 2021, 10:59

Re: gtBASIC

Post by wbushby »

I have another question regarding GTBasic. When I try to comment individual rows in an array dim the array becomes all zeros.

' Title Phrase Offset, Text
DIM PHRASETAB1(129) = {0x00, ' (unused)
0x05,0x06,0x02 OR EOP, ' $01 "ATTACK COMPUTER ON"
0x05,0x06,0x03 OR EOP, ' $04 "ATTACK COMPUTER OFF"
0x04,0x02 OR EOP, ' $07 "SHIELDS ON"
0x04,0x03 OR EOP, ' $09 "SHIELDS OFF"
0x06,0x07,0x02 OR EOP, ' $0B "COMPUTER TRACKING ON"
......

Is there a way I can write this ?
Post Reply