Search found 248 matches

by wimoos
Wed Jan 03, 2018 3:11 am
Forum: Programming
Topic: Where to put the code? !!!
Replies: 14
Views: 378

Re: Where to put the code? !!!

My favorite location for relocatable code is at the end of the Basic program, as described in http://sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?f=2&t=5742&p=65698&hilit=relocatable#p65698

Regards,

Wim.
by wimoos
Tue Dec 19, 2017 3:25 am
Forum: Programming
Topic: Printing float numbers in Hex using USR()
Replies: 5
Views: 259

Re: Printing float numbers in Hex using USR()

Hello CurtisP A (USR-)function should not print by itself, it should return a result that could be printed (or assigned to a variable or used in another expression). Also, setting the USR vector can be done by just POKEing the low and high byte of the address into 1 and 2. Because the string process...
by wimoos
Mon Dec 18, 2017 2:04 am
Forum: Programming
Topic: ML design patterns (calling ROM subroutines)
Replies: 7
Views: 257

Re: ML design patterns (calling ROM subroutines)

Refer to http://sleepingelephant.com/ipw-web/bulletin/bb/viewtopic.php?f=2&t=676&start=15#p68669 for a collection of interesting facts on interpreter subroutines. I found and used these during my development efforts on the WimBasic extension. Also, Lee's well-document disassembly listing on ...
by wimoos
Tue Dec 05, 2017 4:33 am
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 23743

Re: Using and improving Exbasic

No changes to the algorithm, only to memory locations (and useful routine-entries) used. It saved some bytes :) 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 ; ...
by wimoos
Fri Nov 24, 2017 2:22 am
Forum: Programming
Topic: ?FORMULA TOO COMPLEX
Replies: 12
Views: 454

Re: ?FORMULA TOO COMPLEX

A similar bug as in POS(""), is in IF. 10 IF " " THEN X=1 20 IF " " THEN X=2 30 IF " " THEN X=3 40 IF " " THEN X=4 results in ?FORMULA TOO COMPLEX at line 40. No one would ever be tempted to code this, but the handling is wrong. There should be a ?TY...
by wimoos
Wed Nov 22, 2017 3:38 pm
Forum: Programming
Topic: ?FORMULA TOO COMPLEX
Replies: 12
Views: 454

Re: ?FORMULA TOO COMPLEX

As far as I know this remains permanent until a CLR or RUN. This is correct. Additionally NEW, and non-immediate LOAD, do this. Also the routine that prints "ERROR" whenever an error occurs does a call to $C67A where the string descriptor stackpointer is reset. In WimBasic, I have done so...
by wimoos
Fri Nov 17, 2017 9:18 am
Forum: Programming
Topic: ML routines in BASIC programs
Replies: 9
Views: 3605

Re: ML routines in BASIC programs

I improved on this one: LA107 LDA $911F AND #$1C LSR A LSR A TAY LDA LA0FF-1,Y LDX $9122 LDY #$7F STY $9122 BIT $9120 STX $9122 BMI LA109 ADC #$01 LA109 JMP $DC3C LA0FF .BYTE $15 .BYTE $E9 .BYTE $FF .BYTE $FF .BYTE $16 .BYTE $EA .BYTE $00 Regards, Wim.
by wimoos
Fri Nov 03, 2017 2:23 pm
Forum: Programming
Topic: ?FORMULA TOO COMPLEX
Replies: 12
Views: 454

Re: ?FORMULA TOO COMPLEX

Hmm...good example, thank you for that. Now I compared the vanilla Basic formula with the Left-MID$ WimBasic implementation. I compared them on usage of strings scrap space and on the usage of the temporary descriptor stack. The vanilla implementation uses more scrap space than the WimBasic equivale...
by wimoos
Thu Nov 02, 2017 3:07 am
Forum: Programming
Topic: ?FORMULA TOO COMPLEX
Replies: 12
Views: 454

Re: ?FORMULA TOO COMPLEX

The stack for string expressions is only 3 strings deep. 1 PRINT "A"+("B"+("C"+"D")) throws a ?FORMULA TOO COMPLEX error, whereas 1 PRINT "A"+("B"+"C") doesn't. Hmmm....who would ever use brackets in combination with string conca...
by wimoos
Mon Oct 23, 2017 12:32 am
Forum: Programming
Topic: ?FORMULA TOO COMPLEX
Replies: 12
Views: 454

?FORMULA TOO COMPLEX

Hello all,

Anybody ever witnessed a "?FORMULA TOO COMPLEX" error from a CBM Basic V2.0 program (that is, without any extensions or ML additions).
To my opinion, this error can never occur. Can you think of a program (line) that proves otherwise ?

Regards,


Wim.
by wimoos
Sun Oct 01, 2017 8:03 am
Forum: Programming
Topic: BASIC 3.5 on a VIC?
Replies: 6
Views: 373

Re: BASIC 3.5 on a VIC?

A BASIC with more instructions is also slower. Not necessarily so, it entirely depends what you want from it. WimBasic http://wimbasic.webs.com has some features that really can improve speed of your Basic programs: SuperNumbers, DIVMOD, Mike's SQR implementation, DEEK/DOKE, FRAC, WHiLE/WEND/QUIT, ...
by wimoos
Wed Aug 30, 2017 11:57 am
Forum: Programming
Topic: New version of WimBasic
Replies: 10
Views: 3457

Re: New version of WimBasic

After two years, I have released yet another new version of WimBasic, in which more improvements have been implemented. The most noticeable improvements are around the PRINT USING statement. In previous versions: 1) a formatting string containing double quotes would be misinterpreted 2) the syntaxis...
by wimoos
Mon Mar 20, 2017 5:51 am
Forum: Programming
Topic: Help converting numbers onto Char in ML
Replies: 7
Views: 450

Re: Help converting numbers onto Char in ML

Printing signed 16-bit integers (where the high bit of the msb denotes the sign):

Code: Select all

   LDA msb
   LDY lsb
   JSR $D391
   INY
   JMP $DDD7


Regards,

Wim.
by wimoos
Tue Feb 28, 2017 1:05 am
Forum: Programming
Topic: The IF statement....
Replies: 12
Views: 448

Re: The IF statement....

It is not so much that the IF statement slows things down, it's more the formula after the IF statement. There's a few things that you can do to speed that up. Machinelanguage is one of them. In arcade games this helps dramatically. Arcade games are usuallly around integers and byte, whereas in BASI...

Go to advanced search