Search found 245 matches

by wimoos
Tue Dec 05, 2017 4:33 am
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 23539

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: 359

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: 359

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: 3546

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: 359

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: 359

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: 359

?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: 306

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: 3333

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: 396

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: 409

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...
by wimoos
Thu Jan 19, 2017 1:45 am
Forum: Programming
Topic: Analog clock in BASIC
Replies: 6
Views: 560

Re: Analog clock in BASIC

P.S. CBM BASIC processes integers *slower* than floats - that's because there are no dedicated integer routines in the interpreter, and use of integers incurs extra conversions. Neither do simple integer variables use less space than floats (both require 7 bytes per variable - 2 bytes for the name,...
by wimoos
Tue Jan 17, 2017 1:09 am
Forum: Collecting and History
Topic: Unknown Stack cartridge
Replies: 10
Views: 385

Re: Unknown Stack cartridge

These RAM chips are the good old 2114's. They are 1024x4 bits. So, 6 of them are arranged on the board as 3072x8 bits. (As you can deduce from the wiring pattern on the left in the second picture, where the datalines are divided 50/50 over the two rows of 3 chips). These are used as base memory in m...
by wimoos
Fri Jan 06, 2017 2:36 am
Forum: Programming
Topic: Hello and problem moving screen memory
Replies: 5
Views: 268

Re: Hello and problem moving screen memory

We know that the VIC-20 video chip gets two things from memory: "screen memory" and "the character set." But it sees the computer's memory in an unusual way: The VIC chip is not able to address memory in the expansion connector. In my VIC I have soldered 3K memory piggyback on e...

Go to advanced search