+MrFish Posted September 20, 2021 Share Posted September 20, 2021 19 minutes ago, Philsan said: I made a video to show that you can code on real Atari too. Other modern languages cannot do it. Yeah, it's nice to see on support for real metal. What's with all the arrows going down the left side? It's distracting for me. Also, I think inverse video for the status/command line might look better than the way it's currently done. 1 Quote Link to comment Share on other sites More sharing options...
dmsc Posted September 21, 2021 Author Share Posted September 21, 2021 Hi! 5 hours ago, MrFish said: Yeah, it's nice to see on support for real metal. What's with all the arrows going down the left side? It's distracting for me. It is meant to show the end-of-file; It was very useful during development of the editor, because you can easily see the state of the buffer and detect any error. But perhaps you are right, and it does not really help. Removing the code to draw the arrow makes the binary 8 bytes shorter ? 5 hours ago, MrFish said: Also, I think inverse video for the status/command line might look better than the way it's currently done. I agree, but it is not easy - the line is simply drawn using PRINT, and there is no way to force inverse video output on PRINT. Adding this feature would be useful for BASIC games, specially using Graphics modes 1 and 2, where you would like to print a string (or your score) using a different color. I also want to add a "TAB()" function, then the status line could be printed with: PRINT COLOR(128);TAB(2);FileName$;TAB(32); 1+topLine+scrLine; TAB(39); Well, many features to add in next versions Have Fun! 4 Quote Link to comment Share on other sites More sharing options...
OxC0FFEE Posted November 7, 2021 Share Posted November 7, 2021 Pardon me if this is very straightforward to do, but I couldn’t work out how to put in control characters (like ATASCII) in the fastbasic editor. How to enter ATASCII in the editor, and also when cross-compiling? I couldn’t find it in the documentation. In basicparser/tbxlparser you can enter arbitrary hex codes and named characters, but I’m not sure this can be done in FB? Perhaps also an easy answer, how to delete and insert lines in the editor? Quote Link to comment Share on other sites More sharing options...
dmsc Posted November 7, 2021 Author Share Posted November 7, 2021 Hi! 3 hours ago, OxC0FFEE said: Pardon me if this is very straightforward to do, but I couldn’t work out how to put in control characters (like ATASCII) in the fastbasic editor. How to enter ATASCII in the editor, and also when cross-compiling? I couldn’t find it in the documentation. In basicparser/tbxlparser you can enter arbitrary hex codes and named characters, but I’m not sure this can be done in FB? Perhaps also an easy answer, how to delete and insert lines in the editor? The IDE uses the same conventions as the standard Atari OS editor: - To insert a line, press SHIFT+INSERT (the ">" key in the Atari keyboard) - To delete a line, press SHIFT+DELETE (the "BACKSPACE" key in the Atari keyboard) - To insert an ATASCII character, press "ESC" and then the character, for example "ESC" and "TAB" inserts an "▸", or "ESC" and CONTROL-A inserts "├". About inserting an arbitrary character in the cross-compiler, you can use the "$" syntax, this is the example in the manual: PRINT "Hello"$9B"world"$2E$2E This prints "Hello" in one line and "world.." in the next line, as "$9B" is the EOL character in ATASCII. This works in the cross compiler but also works in the Atari IDE. Have Fun! 2 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted July 2, 2022 Share Posted July 2, 2022 New FastBASIC user using it for 5200 games here. Not good enough to ask programming questions yet but the developer seemed to not have much 5200 feedback yet. sieve.bas compiled and ran via Altirra in 5200 mode just fine. joyas.bas failed to compile even though I made sure to pick the "int" version. C:\Dev\fastbasic>fastbasic.exe -t:atari-5200 joyas.bas BAS compile 'joyas.bas' to 'joyas.asm' joyas.bas:87:7: parse error, expected: integer expression, integer constant, left parenthesis, variable name, string expression, '=' print <--- HERE -->#6, , , " joyas", , , "HI SCORE:"; hiSco Not a complaint. Just thought the result might be relevant. I'm probably doing something wrong as a first time user. Quote Link to comment Share on other sites More sharing options...
dmsc Posted July 3, 2022 Author Share Posted July 3, 2022 Hi! 4 hours ago, Gemintronic said: New FastBASIC user using it for 5200 games here. Not good enough to ask programming questions yet but the developer seemed to not have much 5200 feedback yet. sieve.bas compiled and ran via Altirra in 5200 mode just fine. joyas.bas failed to compile even though I made sure to pick the "int" version. C:\Dev\fastbasic>fastbasic.exe -t:atari-5200 joyas.bas BAS compile 'joyas.bas' to 'joyas.asm' joyas.bas:87:7: parse error, expected: integer expression, integer constant, left parenthesis, variable name, string expression, '=' print <--- HERE -->#6, , , " joyas", , , "HI SCORE:"; hiSco Not a complaint. Just thought the result might be relevant. I'm probably doing something wrong as a first time user. Yes, "#6" does not makes sense for the A5200, as there is no I/O support. The new version in the other thread allows this, but it will not work, as the game has a lot of addresses hard-coded. This is why I made an A5200 specific port (at the start of the thread): As the A800 and A5200 are different enough, almost any game should have to be converted, by replacing memory addresses of POKEs and memory layouts. Have Fun! 1 Quote Link to comment Share on other sites More sharing options...
OxC0FFEE Posted October 25, 2022 Share Posted October 25, 2022 (edited) I'm on an Apple Silicon M1 MBP running Monterey 12.5.1. I downloaded the latest release for mac, tried the cross-compiler, and got an error: kim@Kims-MBP fastbasic-v4 % ./fastbasic test.bas dyld[7657]: Symbol not found: (__ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEPKcm) Referenced from: '/Users/kim/Downloads/fastbasic-v4/fastbasic' Expected in: '/usr/lib/libstdc++.6.dylib' zsh: abort ./fastbasic test.bas Tried to compile from source, but got a couple of errors, one about spaces between > > kim@Kims-MBP fastbasic % make Submodule 'testsuite/mini65' (https://github.com/dmsc/mini65-sim) registered for path 'testsuite/mini65' Cloning into '/Users/kim/Repositories/fastbasic/testsuite/mini65'... Submodule path 'testsuite/mini65': checked out '4b991c92d019a409db12e2315da85daead9a08aa' Compile CA65 Assembly FP src/actions.asm Assembly FP src/errors.asm Assembly FP src/memptr.asm Compile src/compiler/synt-emit-asm.cc In file included from src/compiler/synt-emit-asm.cc:20: In file included from src/compiler/synt-emit-asm.h:21: src/compiler/synt-sm-list.h:34:55: error: a space is required between consecutive right angle brackets (use '> >') std::map<std::string, std::unique_ptr<statemachine>> sms; ^~ > > src/compiler/synt-emit-asm.cc:27:15: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using dcode = statemachine::dcode; ^ src/compiler/synt-emit-asm.cc:41:13: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &c : data) ^ src/compiler/synt-emit-asm.cc:41:21: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &c : data) ^ src/compiler/synt-emit-asm.cc:75:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto x = transform_bytes(data); ^ src/compiler/synt-emit-asm.cc:86:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto x = transform_bytes(data); ^ src/compiler/synt-emit-asm.cc:91:13: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &ch : str) ^ src/compiler/synt-emit-asm.cc:91:22: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &ch : str) ^ src/compiler/synt-emit-asm.cc:104:19: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(const auto &c : pc) ^ src/compiler/synt-emit-asm.cc:104:27: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(const auto &c : pc) ^ src/compiler/synt-emit-asm.cc:133:19: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(const auto &line : sm.get_code()) ^ src/compiler/synt-emit-asm.cc:133:30: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(const auto &line : sm.get_code()) ^ src/compiler/synt-emit-asm.cc:151:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto i : sl.tok.map()) ^ src/compiler/synt-emit-asm.cc:151:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto i : sl.tok.map()) ^ src/compiler/synt-emit-asm.cc:164:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:164:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:171:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:171:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:179:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ src/compiler/synt-emit-asm.cc:179:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ src/compiler/synt-emit-asm.cc:187:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:187:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:189:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ src/compiler/synt-emit-asm.cc:189:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ src/compiler/synt-emit-asm.cc:195:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ src/compiler/synt-emit-asm.cc:195:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ 25 warnings and 1 error generated. make: *** [build/obj/cxx/synt-emit-asm.o] Error 1 Then, after I put a space between them, I got this, longer and more serious standard library error: kim@Kims-MBP fastbasic % make Compile src/compiler/synt-emit-asm.cc src/compiler/synt-emit-asm.cc:27:15: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using dcode = statemachine::dcode; ^ src/compiler/synt-emit-asm.cc:41:13: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &c : data) ^ src/compiler/synt-emit-asm.cc:41:21: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &c : data) ^ src/compiler/synt-emit-asm.cc:75:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto x = transform_bytes(data); ^ src/compiler/synt-emit-asm.cc:86:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto x = transform_bytes(data); ^ src/compiler/synt-emit-asm.cc:91:13: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &ch : str) ^ src/compiler/synt-emit-asm.cc:91:22: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &ch : str) ^ src/compiler/synt-emit-asm.cc:104:19: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(const auto &c : pc) ^ src/compiler/synt-emit-asm.cc:104:27: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(const auto &c : pc) ^ src/compiler/synt-emit-asm.cc:133:19: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(const auto &line : sm.get_code()) ^ src/compiler/synt-emit-asm.cc:133:30: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(const auto &line : sm.get_code()) ^ src/compiler/synt-emit-asm.cc:151:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto i : sl.tok.map()) ^ src/compiler/synt-emit-asm.cc:151:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto i : sl.tok.map()) ^ src/compiler/synt-emit-asm.cc:164:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:164:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:171:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:171:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:179:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ src/compiler/synt-emit-asm.cc:179:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ src/compiler/synt-emit-asm.cc:187:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:187:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto i : sl.ext.map()) ^ src/compiler/synt-emit-asm.cc:189:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ src/compiler/synt-emit-asm.cc:189:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ src/compiler/synt-emit-asm.cc:195:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ src/compiler/synt-emit-asm.cc:195:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ 25 warnings generated. Compile src/compiler/synt-optimize.cc src/compiler/synt-optimize.cc:37:15: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(const auto &sm : sl.sms) ^ src/compiler/synt-optimize.cc:37:24: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(const auto &sm : sl.sms) ^ src/compiler/synt-optimize.cc:39:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto n = sm.second->name(); ^ src/compiler/synt-optimize.cc:42:19: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(const auto &sm2 : sl.sms) ^ src/compiler/synt-optimize.cc:42:29: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(const auto &sm2 : sl.sms) ^ src/compiler/synt-optimize.cc:52:23: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(const auto &sm2 : sl.sms) ^ src/compiler/synt-optimize.cc:52:33: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(const auto &sm2 : sl.sms) ^ src/compiler/synt-optimize.cc:80:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &n : to_delete) ^ src/compiler/synt-optimize.cc:80:17: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &n : to_delete) ^ src/compiler/synt-optimize.cc:98:15: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(const auto &sm : sl.sms) ^ src/compiler/synt-optimize.cc:98:24: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(const auto &sm : sl.sms) ^ src/compiler/synt-optimize.cc:102:13: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto n = sm.second->name(); ^ src/compiler/synt-optimize.cc:111:23: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(const auto &sm2 : sl.sms) ^ src/compiler/synt-optimize.cc:111:33: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(const auto &sm2 : sl.sms) ^ src/compiler/synt-optimize.cc:117:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &n : to_delete) ^ src/compiler/synt-optimize.cc:117:17: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &n : to_delete) ^ src/compiler/synt-optimize.cc:121:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ src/compiler/synt-optimize.cc:121:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &sm : sl.sms) ^ 18 warnings generated. Compile src/compiler/synt-parser.cc src/compiler/synt-parser.cc:72:13: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto smi = sl.sms.find(name); ^ src/compiler/synt-parser.cc:80:17: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto sm = ^ src/compiler/synt-parser.cc:81:26: error: no member named 'make_unique' in namespace 'std' std::make_unique<statemachine>(p, name, sl.tok, sl.ext, sl.syms); ~~~~~^ src/compiler/synt-parser.cc:81:38: error: 'statemachine' does not refer to a value std::make_unique<statemachine>(p, name, sl.tok, sl.ext, sl.syms); ^ src/compiler/synt-sm.h:31:7: note: declared here class statemachine ^ src/compiler/synt-parser.cc:81:52: warning: expression result unused [-Wunused-value] std::make_unique<statemachine>(p, name, sl.tok, sl.ext, sl.syms); ^ src/compiler/synt-parser.cc:81:55: warning: expression result unused [-Wunused-value] std::make_unique<statemachine>(p, name, sl.tok, sl.ext, sl.syms); ^~~~ src/compiler/synt-parser.cc:81:64: warning: expression result unused [-Wunused-value] std::make_unique<statemachine>(p, name, sl.tok, sl.ext, sl.syms); ~~ ^~~ src/compiler/synt-parser.cc:81:72: warning: expression result unused [-Wunused-value] std::make_unique<statemachine>(p, name, sl.tok, sl.ext, sl.syms); ~~ ^~~ 6 warnings and 2 errors generated. make: *** [build/obj/cxx/synt-parser.o] Error 1 (it's a pity there's no <details><summary>...</summary>...</details> support here. Sorry about the wall of text.) Edited October 25, 2022 by OxC0FFEE add system info Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted October 25, 2022 Share Posted October 25, 2022 2 hours ago, OxC0FFEE said: it's a pity there's no <details><summary>...</summary>...</details> support here. Sorry about the wall of text Mark it as spoiler text. 1 Quote Link to comment Share on other sites More sharing options...
dmsc Posted October 25, 2022 Author Share Posted October 25, 2022 Hi! 20 hours ago, OxC0FFEE said: I'm on an Apple Silicon M1 MBP running Monterey 12.5.1. I downloaded the latest release for mac, tried the cross-compiler, and got an error: kim@Kims-MBP fastbasic-v4 % ./fastbasic test.bas dyld[7657]: Symbol not found: (__ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEPKcm) Referenced from: '/Users/kim/Downloads/fastbasic-v4/fastbasic' Expected in: '/usr/lib/libstdc++.6.dylib' zsh: abort ./fastbasic test.bas I don't have a mac to test, so I build the release using a cross-compiler from Linux. Don't know why it did not work this time. 20 hours ago, OxC0FFEE said: Tried to compile from source, but got a couple of errors, one about spaces between > > kim@Kims-MBP fastbasic % make Submodule 'testsuite/mini65' (https://github.com/dmsc/mini65-sim) registered for path 'testsuite/mini65' Cloning into '/Users/kim/Repositories/fastbasic/testsuite/mini65'... Submodule path 'testsuite/mini65': checked out '4b991c92d019a409db12e2315da85daead9a08aa' Compile CA65 Assembly FP src/actions.asm Assembly FP src/errors.asm Assembly FP src/memptr.asm Compile src/compiler/synt-emit-asm.cc In file included from src/compiler/synt-emit-asm.cc:20: In file included from src/compiler/synt-emit-asm.h:21: src/compiler/synt-sm-list.h:34:55: error: a space is required between consecutive right angle brackets (use '> >') std::map<std::string, std::unique_ptr<statemachine>> sms; ^~ > > src/compiler/synt-emit-asm.cc:27:15: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using dcode = statemachine::dcode; This means your C++ compiler does not support the C++11 standard by default - after googling a bit I'm baffled that Apple compiler defaults to C++98.... So, simply use: make OPTFLAGS="-DNDEBUG -Os -std=c++14 -Wall" build/fastbasic.zip That should do the trick, and produce a .ZIP file with the cross-compiler. Have Fun! Quote Link to comment Share on other sites More sharing options...
OxC0FFEE Posted November 3, 2022 Share Posted November 3, 2022 On 10/25/2022 at 7:56 PM, dmsc said: This means your C++ compiler does not support the C++11 standard by default - after googling a bit I'm baffled that Apple compiler defaults to C++98.... So, simply use: make OPTFLAGS="-DNDEBUG -Os -std=c++14 -Wall" build/fastbasic.zip That should do the trick, and produce a .ZIP file with the cross-compiler. Have Fun! Tried that, got 25x the error: error: invalid argument '-std=c++14' not allowed with 'C' I'm going to see if updating XCode/commandline tools helps. Quote Link to comment Share on other sites More sharing options...
ggn Posted November 3, 2022 Share Posted November 3, 2022 (edited) 1 hour ago, OxC0FFEE said: Tried that, got 25x the error: error: invalid argument '-std=c++14' not allowed with 'C' I'm going to see if updating XCode/commandline tools helps. Just to state the obvious here: It appears that your C++ compiler is in fact a plain C compiler. So something is fishy there. Now, it is generally known that on Macs the default compiler is in fact Clang/LLVM masquerading itself as gcc/g++, so something might be going wrong there. Perhaps you only have the c toolchain installed and not the c++ one? Worst case, if updating the build tools doesn't solve anything you could try installing the real g++ using homebrew (assuming you do have homebrew installed) by typing something like "brew install g++". Good luck! Edited November 3, 2022 by ggn Quote Link to comment Share on other sites More sharing options...
dmsc Posted November 3, 2022 Author Share Posted November 3, 2022 Hi! 2 hours ago, OxC0FFEE said: Tried that, got 25x the error: error: invalid argument '-std=c++14' not allowed with 'C' I'm going to see if updating XCode/commandline tools helps. So, your compiler errors out when compiling C code with C++ flags... I committed a change to the FastBASIC makefile, so just update to the last git source that adds the C++14 flag to the compilation, not a simple make should work for you. Have Fun! Quote Link to comment Share on other sites More sharing options...
dmsc Posted November 3, 2022 Author Share Posted November 3, 2022 Hi! 1 hour ago, ggn said: Just to state the obvious here: It appears that your C++ compiler is in fact a plain C compiler. So something is fishy there. Now, it is generally known that on Macs the default compiler is in fact Clang/LLVM masquerading itself as gcc/g++, so something might be going wrong there. Perhaps you only have the c toolchain installed and not the c++ one? Worst case, if updating the build tools doesn't solve anything you could try installing the real g++ using homebrew (assuming you do have homebrew installed) by typing something like "brew install g++". Yes, that should work. Also, installing the real CLANG should also work, it is the Apple version that acts weird - and is *very* out of date. Have Fun! Quote Link to comment Share on other sites More sharing options...
ivop Posted November 3, 2022 Share Posted November 3, 2022 2 hours ago, dmsc said: not a simple make should work for you. I assume this should said: now? Quote Link to comment Share on other sites More sharing options...
dmsc Posted November 4, 2022 Author Share Posted November 4, 2022 Hi! 2 hours ago, ivop said: I assume this should said: now? Yes, "now should work" 😛 Have Fun! Quote Link to comment Share on other sites More sharing options...
fenrock Posted December 7, 2022 Share Posted December 7, 2022 Thanks for the code in my AOC thread, thought I'd ask here if there's any bitwise processing ability in FB? I don't think there is as I thoroughly scanned the docs, so wondering what the best way to do bit and/or e.g. ? 1 | 2 ' should get 3 ? 5 & 3 ' should get 1 thanks! Quote Link to comment Share on other sites More sharing options...
dmsc Posted December 7, 2022 Author Share Posted December 7, 2022 Hi! 53 minutes ago, fenrock said: Thanks for the code in my AOC thread, thought I'd ask here if there's any bitwise processing ability in FB? I don't think there is as I thoroughly scanned the docs, so wondering what the best way to do bit and/or e.g. ? 1 | 2 ' should get 3 ? 5 & 3 ' should get 1 thanks! Yes. As the syntax is based in Turbo Basic XL, the operators are '&' for binary and; '!' for binary or; 'EXOR' for binary exclusive or. Have Fun! Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted December 7, 2022 Share Posted December 7, 2022 21 minutes ago, dmsc said: Hi! Yes. As the syntax is based in Turbo Basic XL, the operators are '&' for binary and; '!' for binary or; 'EXOR' for binary exclusive or. Have Fun! is that right? Quote Link to comment Share on other sites More sharing options...
fenrock Posted December 7, 2022 Share Posted December 7, 2022 28 minutes ago, dmsc said: Hi! Yes. As the syntax is based in Turbo Basic XL, the operators are '&' for binary and; '!' for binary or; 'EXOR' for binary exclusive or. Have Fun! Great news. @_The Doctor__ Just tried it: ? 1 ! 2 ? 1 exor 3 ? 3 & 5 output: 3 2 1 Quote Link to comment Share on other sites More sharing options...
fenrock Posted December 7, 2022 Share Posted December 7, 2022 Also, @dmsc will bitwise shifting (i.e. v5) be coming any time soon? I'm looking at https://github.com/dmsc/fastbasic/milestone/1 Quote Link to comment Share on other sites More sharing options...
dmsc Posted December 8, 2022 Author Share Posted December 8, 2022 Hi! 3 hours ago, fenrock said: Also, @dmsc will bitwise shifting (i.e. v5) be coming any time soon? I'm looking at https://github.com/dmsc/fastbasic/milestone/1 I have not implemented those as they can be done with multiplication or divisions, and the optimizer could detect some of those and translate to shifts. Have Fun! Quote Link to comment Share on other sites More sharing options...
pedgarcia Posted April 18, 2023 Share Posted April 18, 2023 On 11/3/2022 at 2:15 PM, ggn said: Just to state the obvious here: It appears that your C++ compiler is in fact a plain C compiler. So something is fishy there. Now, it is generally known that on Macs the default compiler is in fact Clang/LLVM masquerading itself as gcc/g++, so something might be going wrong there. Perhaps you only have the c toolchain installed and not the c++ one? Worst case, if updating the build tools doesn't solve anything you could try installing the real g++ using homebrew (assuming you do have homebrew installed) by typing something like "brew install g++". Good luck! With the following changes I was able to compile in my Mac M1... Not sure if it works for Intel-based Macs. --- a/Makefile +++ b/Makefile @@ -22,14 +22,14 @@ target: all # Set "CROSS" to the compiler prefix, forces compilation of two compilers, one # native and one for the cross-target. CROSS= -CXX=g++ -CC=gcc +CXX=clang++ +CC=clang # Optimization flags, added to C and C++ compiler flags OPTFLAGS=-O2 # General options for C++ compiler -CXXFLAG=-Wall -std=c++14 +CXXFLAGS=-Wall -std=c++14 # General flags for 6502 assembly files CA65_FLAGS=-g -tatari -I cc65/asminc -I src diff --git a/src/compiler/synt-sm-list.h b/src/compiler/synt-sm-list.h index a7ee098..46c11ac 100644 --- a/src/compiler/synt-sm-list.h +++ b/src/compiler/synt-sm-list.h @@ -31,7 +31,7 @@ class wordlist; class sm_list { public: - std::map<std::string, std::unique_ptr<statemachine>> sms; + std::map<std::string, std::unique_ptr<statemachine> > sms; wordlist tok; wordlist ext; symlist syms; (END) I hope that helps Cheers Paulo Quote Link to comment Share on other sites More sharing options...
Ricky Spanish Posted May 3, 2023 Share Posted May 3, 2023 Is this based on Deep Blue C ? Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 5, 2023 Author Share Posted May 5, 2023 Hi! On 5/3/2023 at 7:19 PM, Ricky Spanish said: Is this based on Deep Blue C ? FastBasic was implemented from scratch, without code from any other interpreter or compiler. It includes an integrated editor written in FastBasic itself, and compiles the code to a custom bytecode that is interpreted on runtime. Have Fun! Quote Link to comment Share on other sites More sharing options...
Jess Ragan Posted May 5, 2023 Share Posted May 5, 2023 I guess the big question is this... will this work with the Atari 5200 as well? There was a 5200 compiler, Calamari or something, but it was early and difficult to figure out. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.