Using and improving Exbasic

Basic and Machine Language

Moderator: Moderators

wimoos
Vic 20 Afficionado
Posts: 345
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

Some more improvements

Post by wimoos »

The latest version of WimBasic contains an improved implementation of ON ERROR GOTO and RESUME.
Also, SWAP and VARPTR now support SuperNumbers.
RENUM no longer renumbers references to linenumber 0.

Available now at http://home.kpn.nl/oost4231/wimbasic.zip !
VICE; selfwritten 65asmgen; tasm; maintainer of WimBasic
Diddl
Vic 20 Afficionado
Posts: 425
Joined: Wed Jun 10, 2009 3:18 am

Post by Diddl »

thanks for WimBASIC! :D
wimoos
Vic 20 Afficionado
Posts: 345
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

New version

Post by wimoos »

A new version of WimBasic is out now. It contains support for specifying the auxiliary color, to be used in multicolor applications. This is done by adding an optional parameter to the GROUND statement.

Also, some minor fixes were applied. Take a look at http://wimbasic.webs.com for a complete list of all fixes and improvements.
Download the latest version of WimBasic from http://home.kpn.nl/oost4231/wimbasic.zip

Enjoy and regards,

Wim.
VICE; selfwritten 65asmgen; tasm; maintainer of WimBasic
Diddl
Vic 20 Afficionado
Posts: 425
Joined: Wed Jun 10, 2009 3:18 am

Post by Diddl »

Wow, the list of revision details will be longer and longer.

Especially the XOR staement is very useful for me. :D
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Diddl wrote:Wow, the list of revision details will be longer and longer.
I'd like to see some example programs written with WimBasic, which make substantial use of the new commands, and go beyond trivial applications - like simply showing off what a certain new command could be used for -, instead implement something in the order of a bigger game or tool.
Especially the XOR statement is very useful for me. :D
C=XOR(A,B) can simply be replaced with C = A AND NOT B OR B AND NOT A. No need to allocate 8K RAM with a BASIC extension for this.
User avatar
GreyGhost
Vic 20 Nerd
Posts: 525
Joined: Wed Oct 05, 2005 11:10 pm

Post by GreyGhost »

I kinda see it as a toolbox. Most of the time I grab the same tools over and over again, but every now and then I need that special tool to do a specific job. As for memory what is 8k? I haven't seen any program out there max out a fully expanded Vic except maybe Reams of Quest.

Besides, I think Wimoos mentioned before that it was a learning experience for him. So, let the man work and have some fun. That's what it all is now, right?
Rob
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

GreyGhost wrote:I kinda see it as a toolbox. Most of the time I grab the same tools over and over again, but every now and then I need that special tool to do a specific job.
Obviously you then wrote some programs with WimBasic. How about sharing them?
As for memory what is 8k? I haven't seen any program out there max out a fully expanded Vic except maybe Realms of Quest.
fcbpaint-0.5 and MAXIGRAFIK spring to my mind here immediately, and there are surely some other ones released in the last few years which could be added to these two examples.
Besides, I think Wimoos mentioned before that it was a learning experience for him. So, let the man work and have some fun. That's what it all is now, right?
There's nothing wrong about that point of view. But the topic header reads 'Using and improving Exbasic'. Thus far I've only seen improvements of Exbasic (with the occasional 'how to use' example programs shown inbetween), but no real world use of WimBasic itself.

Over the course of one and a half year it should have been possible to write some serious application which makes good use of the tool set presented by WimBasic. Instead, Wim is still tinkering around with the extension itself. Happened to me, too, with a BASIC extension I once wrote for the C128. That one started out with a core set of features, but over one year got extended with lots of bolts. I just thought it was nice to include this command and that command, up to creeping featurism. But no big application was ever written with it.

IMO, the right way was to think about the specific needs of a certain application which mostly could be written in BASIC, save for some time critical parts. Which then might be implemented as commands of a BASIC extension. If the extension then is written with generalisability in mind, that gives a chance to reuse it for other programs.
User avatar
GreyGhost
Vic 20 Nerd
Posts: 525
Joined: Wed Oct 05, 2005 11:10 pm

Post by GreyGhost »

Nope, I have written one program using Wimbasic, and that was just to play around with it. But, that also isn't where my focus is at the moment. The term "toolbox" refers to any BASIC extension. If what you say is written in stone, then why deviate from the stock BASIC v2.0 in any way. I can probably count on my hands and toes how many programs I have seen for the super expander, and that's been 30 years ago.

I think you are being very critical of the work Wimoos has put into this project. If you don't like it, by all means don't use it. As I said before, it's a labor of love, for all of us here.
Rob
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

GreyGhost wrote:If what you say is written in stone, then why deviate from the stock BASIC v2.0 in any way?
I already mentioned some valid reasons to extend BASIC in an earlier posting in this thread, to rephrase those:

- a sole BASIC implementation of a routine runs too slow to meet requirements,
- the implementation uses lots of BASIC statements: condensing these into a new parametrized command improves readability,
- a faulty and/or inaccurate implementation of a command/function in BASIC is replaced,
- implementation of a function in BASIC is impossible (like interrupt handling, error trapping, keyboard/editor extensions, drive/tape speeders) but desired to be usable from BASIC,
- providing a means to write more structured programs (i.e. including IF ... THEN ... ELSE, loop constructs, procedure calls).
I think you are being very critical of the work Wimoos has put into this project. [...] As I said before, it's a labor of love, for all of us here.
Do you really think I do not appreciate the work involved with such a project? You know, I've got several heavy-weight projects under my hood in the last years as well. As far as criticism is allowed, I'm merely stating facts about how WimBasic has been used to write programs thus far. Whether or not further investment is done in its development is of course at the discretion of Wim himself.
User avatar
GreyGhost
Vic 20 Nerd
Posts: 525
Joined: Wed Oct 05, 2005 11:10 pm

Post by GreyGhost »

In any case, Wimoos, keep up the great work and as always I admire and appreciate any and all programming achievements done on my favorite machine.
Rob
wimoos
Vic 20 Afficionado
Posts: 345
Joined: Tue Apr 14, 2009 8:15 am
Website: http://wimbasic.webs.com
Location: Netherlands
Occupation: farmer

Re: Using and improving Exbasic

Post by wimoos »

No changes to the algorithm, only to memory locations (and useful routine-entries) used. It saved some bytes :)

Code: Select all

LA8F7	JSR  $DC1B	; round acc#1
		JSR  $DC2B	; determine SGN
		BEQ  LA942	; SQR(0) = 0 , that's easy
		BMI  LA8F4	; <0 is not allowed
		LDA  $61		; get exponent
		PHA			; save it
		AND  #$01      	 
		ORA  #$80      	 
		STA  $61		; normalize exponent [0.5-2.0>
		LDA  #$04		; iterate 4 times
		STA  $0D
		JSR  $DBCA	; acc#1 to Zp $57-$5B
		LDA  #$BC		; float value 1.0
		LDY  #$D9      	 
LA933	JSR  $D867	; add to acc#1
		DEC  $0D		; count iteration
		BEQ  LA921     	 
		DEC  $61		; divide acc#1 by 2
		JSR  $DBC7	; acc#1 to Zp $5C-60
		LDA  #$57		 
		JSR  $DB0F	; divide Zp$57-$5B into acc#1
		LDA  #$5C
		BNE  LA933	; branch always
;
LA921	PLA			; retrieve exponent
		LSR  A		; adjust it
		ADC  #$40      	 
		STA  $61       	 
LA942	RTS 
;
LA8F4	JMP $D248		; ILLQUANT
VICE; selfwritten 65asmgen; tasm; maintainer of WimBasic
Post Reply