Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
05-25-2010, 11:53 PM
(This post was last modified: 04-05-2020, 12:12 PM by boriel.)
Hallo my friends...
Currently the BorIDE is progressing very good. But Multitab coding is not working yet. I just want to ask if I added ALL available keywords, or are there some missing? Or are some not working?
Commands:
"And As Asm At Bold Beep Border Bright ByRef ByVal Cast Circle Cls Code Const Continue Dim Do Draw Else Elseif End Exit Fastcall Flash For Function Go Gosub Goto If Ink Inverse Italic Let Loop Malloc Multikeys Next Not Or Out Over Paper Pause Pi Plot Poke Print Randomize Realloc Return Stdcall Sub Then To Until Wend While"
Okay, I know! Pi is a constant and not a command.
Functions:
"Abs Acs Asn Atn Chr Chr$ Cos Exp Getkeyscancodes Hex Hex16 In Inkey Inkey$ Input Int Len Ln Mod Peek Point Rnd Sgn Shl Shr Sin Sqr Str Str$ Tan Val"
Assembler (I think, this is complete):
"adc add and bit call ccf cp cpd cpdr cpi cpir cpl daa dec di ei ex exx im in inc ind indr ini inir jp jr ld ldd lddr ldi ldir neg nop or outd outi pop push res ret reti retn rl rlc rlca rld rr rrc rrca rrcb rrcc rrcd rrce rrch rrcl rrd rst sbc scf set sla sra srl xor org defb defw defs defm equ"
Compiler:
"#Include Once"
Types:
"Byte Float Integer Long String Ubyte Uinteger Ulong"
Comments:
"Rem ' "
The latest version recognises now two-word commands like "Continue Do" and allow code folding. There are also different syntax coloring styles for commands, functions, comments and so. Unfortunally SUB clashes because it is available in ASM and in BASIC. Maybe changing the name from SUB to PROC will help, but then it goes away from FreeBasic names...
Posts: 1,763
Threads: 55
Joined: Aug 2019
Reputation:
24
05-26-2010, 07:09 AM
(This post was last modified: 04-05-2020, 12:13 PM by boriel.)
Excellent work, LCD.
Remember you can check the list of reserved identifiers in the wiki:
https://zxbasic.readthedocs.io/en/latest/identifier/
I also suggest to put identifier lists in an external cfg text file, so adding new keywords to the language does not force you to recompile your application.
Having said that, well done!
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
05-26-2010, 08:42 PM
(This post was last modified: 04-05-2020, 12:14 PM by boriel.)
boriel Wrote:Excellent work, LCD.
Remember you can check the list of reserved identifiers in the wiki: https://zxbasic.readthedocs.io/en/latest/identifier/
I checked that, but I also added some of the commands that are not described yet, only from "whats new" description, which syntax and function I had not testet yet, like "Multikeys" (I think, it is a function).
boriel Wrote:I also suggest to put identifier lists in an external cfg text file, so adding new keywords to the language does not force you to recompile your application.
Having said that, well done! The fact is, I do not mind to recompile for each new version which adds more commands, because I must recompile it. That is caused by Scilexer which uses space to sepparate keywords, and the use of two-word commands like END IF, also the fact that a quick help for the commands is build in. Such a list would only allow to style the commands, but not quick help and Help, which will be a important part of BorIDE. The actual command under the cursor is displayed in Status bar with a short description, but I plan to add a chm help, so if you press F1, the detailed descriprion with examples will be displayed. I just need a good chm editor.
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
05-27-2010, 10:50 PM
(This post was last modified: 04-05-2020, 12:15 PM by boriel.)
Just made a independend style for ZXB external functions:
"Asc Attr Csrlin Free GetKey GetKeyScanCode Hex Hex16 Input Lcase Malloc Memcopy Multikeys Point Pos Printat42 Screen Scrollleft Scrollright Realloc Ucase". The different style remembers the user to include the correct Library, which will be displayed in Quick help.
The problems are following: InLine ASM Mnemonics SUB are styled as BASIC and causes Open fold, so folding does not work correctly anymore if SUB is used, FreeBasic Commands are not very good for mixing them with Z80 ASM, so my proposal is to change SUB into DEFSUB, PROC or DEFPROC. END SUB should be then changed to END DEFSUB, END PROC or END DEFPROC.
OUT and IN in Assembler are styled as BASIC OUT command, but this is not a big problem as they have no effect on fold. Maybe it is also not a bad idea to make BASIC REM sign ( ' ) also a REM Sign for Assembler, additional to the usual ";"
Posts: 1,763
Threads: 55
Joined: Aug 2019
Reputation:
24
Putting # at the very first of the line is *always* a preprocessor directive. In fact, the standard way of tabulate preprocessor directives is:
Code: #ifdef ZXSPECTRUM
# include once "spectrum-lib.bas"
#endif
Notice the tab goes *after* the #. Putting a # at the beginning of a line which does not start at column 0 will raise an error.
I tell you this, because this might simplify the syntax parsing for preprocessor directives.
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
boriel Wrote:Putting # at the very first of the line is *always* a preprocessor directive. In fact, the standard way of tabulate preprocessor directives is:
Code: #ifdef ZXSPECTRUM
# include once "spectrum-lib.bas"
#endif
Notice the tab goes *after* the #. Putting a # at the beginning of a line which does not start at column 0 will raise an error.
I tell you this, because this might simplify the syntax parsing for preprocessor directives.
Thanks! In this case I will try to use a delimiter for this. Will check it later. To be honest, I never coded in FreeBasic, and in PureBasic # marks a constant: #ErrorLine_Marker=1
Edit: I just added the correct delimiter. Now all preprocessor directives can have spaces or tabulators between # and the command.
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
![[Image: BorIDE.png]](http://members.inode.at/838331/pc/BorIDE.png)
Thats how it looks now. I hopy, you like it.
Posts: 1,763
Threads: 55
Joined: Aug 2019
Reputation:
24
:o Wow! This looks impressive! 8)
You should start releasing beta downloads for testing it and finding bugs.
I would like to create a debugger (yes, I've been secretly working on it). Unfortunately, there's much to do yet...
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
boriel Wrote::o Wow! This looks impressive! 8)
You should start releasing beta downloads for testing it and finding bugs.
I would like to create a debugger (yes, I've been secretly working on it). Unfortunately, there's much to do yet... ![Cry Cry](https://www.boriel.com/forum/images/smilies/cry.png)
Soon I will do so, but first I still have not included all "minimum" features. So there are no bugs yet to discover. Let me include first some of them :lol:.
Debugger? Are you talking about a emulator with special Features like obeying DEBUG variabe commands, browse variable and memory values and so on? COOL! ![Confused Confused](https://www.boriel.com/forum/images/smilies/confused.png) hock:
I included a font editor with some example fonts in BorIDE, and the font can be exported to a array or DEFB code, later I will include a graphics and a Map editor for games, but first I think, the code editor should work as expected. I do not understand the meaning of the -E switch (Emmit backend).
Posts: 1,763
Threads: 55
Joined: Aug 2019
Reputation:
24
There's something alike, called BASIN. Unfortunately, it's closed source, so we can't see how it works.
I'm thinking on two approaches:
- Using an embedded (or even external) debugger, using a Z80 emulation library (or using a C code for a Z80 emulation).
- Creating my own interpreter, so it will interpreter ZX BASIC language as an scripted and debuggeable language.
2nd approach is my favorite, seems it's multi-platform and could even allow using ZX BASIC "scripts". :!:
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
boriel Wrote:There's something alike, called BASIN. Unfortunately, it's closed source, so we can't see how it works.
I'm thinking on two approaches:
- Using an embedded (or even external) debugger, using a Z80 emulation library (or using a C code for a Z80 emulation).
- Creating my own interpreter, so it will interpreter ZX BASIC language as an scripted and debuggeable language.
2nd approach is my favorite, seems it's multi-platform and could even allow using ZX BASIC "scripts". :!: ![Idea Idea](https://www.boriel.com/forum/images/smilies/lightbulb.png)
Cool idea, but will the second approach work with inline ASM?
My idea would be to generate a debug file in a open and well documented Debugger script language, which would be interpreted on runtime by the emulator, and then ask nicely some emulator authors to include this debug feature in their masterpieces.
I'm sure, I can code a Spectrum Emulator in PureBasic, but exact timing and AY sound emulation are very hard to do, so I'm not sure, I can include these features. But debugging can be included very easy using opcodes which are otherwise not used like LD A,A to define a breakpoint or so.
Speaking about BasIN: It uses the Spin source code, so it can use ASM routines. Dunny promised a compiler, but I prefer yours as it is *unbelievable* good and extends Sinclair BASIC to 21st centaury standards.
In expectation of extening ZX BASIC Compiler to other plattforms, I purchased a Goldstar MSX1 Computer some days ago 8). I also have the Atari XL, C64, SAM Coupé and will get a QL soon. Do you have plans to include Sprinter 2000 support on the roadmap?
Edit:
I think, there are BasIN sources floating around. I know, I had them downloaded. Maybe I can find them (Its written in Delphi).
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
Status update:
Most stuff I like to finish, is now finished, only a few improvments and I can release the version 0.2 for public testing next week. Font Editor is a revamped version from Retro-X and now able to import data from DEFB and UBYTE DATA lines (DIM fontdata(768) as UBYTE => ...). There are some fonts build-in.
Stuff not done yet:
Graphics editor (Blocks, Tilesheets), Screen Editor (Blocky graphics, ASCII), Map editor, Final compilation with packing and adding of screen, and most managers... These will be added later. Also instruction and help is not done yet. because I'm very busy at moment. So watch out this space.
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
Okay, I released the BorIDE Preview 0.2 today. Download from my website in PC section. 70+ 8x8 Fonts included.
Posts: 805
Threads: 135
Joined: Apr 2009
Reputation:
5
I've only had a few minutes to play with it, but it looks amazing!
Ideas: Would it be awful for files to be .bas, which seems to be the file standard Boriel goes for?
Options: It's standard for program options to be on the tools/options menu tab?
I love the +/- options, which seems to be working on multi-line dim statements. One issue - I tried collapsing one (the last one in the dim section) and the whole program disappeared. I thought it would be just the dim statement.
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
Quote:Ideas: Would it be awful for files to be .bas, which seems to be the file standard Boriel goes for?
Later, if I make file associations, I think, it is good idea to assign BAS with Wordpad. But I want to support BAS and my extension both, ZXBC does not care about extension.
Quote:Options: It's standard for program options to be on the tools/options menu tab?
For some IDE, Program (not IDE) options are in the sidebar, because they are much faster to access than using Menu and a own Window (It was there first, but I replaced it later with the sidebar menu. You probably noticed that each opened Program has its own options, and they are updatet as the program is switched, so you can watch on the fly if the settings are correct for your needs. I think that is so much better than using Menu with own Window.
Working with this system for around two weeks now and I don't want to miss it. But I can add additionaly program options in the Menu too.
Quote:I love the +/- options, which seems to be working on multi-line dim statements. One issue - I tried collapsing one (the last one in the dim section) and the whole program disappeared. I thought it would be just the dim statement.
Yes, the code folding... I defined "{" to open and "}" to close the fold. Maybe you forgot to close the fold with "}"? Even if it display a close fold margin icon at the last line, it awaits a close. Will check this later.
|