Search found 346 matches

by wimoos
Mon Apr 11, 2011 1:38 am
Forum: Programming
Topic: Generate multiple interrupts per vertical refresh?
Replies: 2
Views: 1363

Have you considered this (copied from 6502.org) ? RTI (ReTurn from Interrupt) Affects Flags: all MODE SYNTAX HEX LEN TIM Implied RTI $40 1 6 RTI retrieves the Processor Status Word (flags) and the Program Counter from the stack in that order (interrupts push the PC first and then the PSW). Note that...
by wimoos
Sat Apr 02, 2011 8:10 am
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 38919

Some more improvements

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 !
by wimoos
Thu Mar 03, 2011 12:07 pm
Forum: Programming
Topic: Compute! Maze Generator in Basic, C and now Assembly!!!
Replies: 41
Views: 22184

Now in WimBasic !

This is a conversion into WimBasic that shows a maze with a four times higher resolution. For the "breadcrumbs" I used the spare color memory at $9600 (line 9). Regards, Wim. 1 gosub7 2 print"{clr}":£k=1:£l=1:i=rnd(-ti):set£k,£l:pokefnl(0),4 3 £j=int(rnd(1)*4):£c=£j 4 £m=£k+x(£j)...
by wimoos
Tue Feb 22, 2011 3:01 am
Forum: Programming
Topic: Shortening BASIC-programs
Replies: 8
Views: 2810

This trick is maybe a wee bit faster than its GOTO equivalent (for the example shown it is irrelevant, but other purposes may benefit). The stack will not overflow, the FOR/NEXT is taken from the stack after a key has been pressed. No new FOR/NEXT is built up per iteration. The trick is actually an ...
by wimoos
Tue Feb 15, 2011 7:49 am
Forum: Programming
Topic: ML routines in BASIC programs
Replies: 9
Views: 5722

Another 4 bytes saved

dir: .byte $FF,$15,$E9,$FF,$FF,$16,$EA,$00 LDA 37151 LSR A LSR A AND #7 ; bits are 1 for unused directions TAY LDA 37152 EOR #128 ; invert upper bit AND #128 ASL A ; shift it out as carry flag, and accumulator will contain zero TAX ADC dir,y BPL out DEX out: TAY TXA JMP $D391 ; convert integer in (...
by wimoos
Sun Jan 16, 2011 9:00 am
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 38919

New version available

As I couldn't resist, I have made some more improvements to WimBasic. Amongst others: - Joystick support through the USR() function (as discussed in an earlier post of Mike). USR() returns 0, -1, 1, -22, 22, -23, 23, -21, 21, depending on the position of the joystick. Of course, only as long as the ...
by wimoos
Tue Dec 28, 2010 4:31 am
Forum: Emulation and Cross Development
Topic: VICE and 65C02 ?
Replies: 4
Views: 2829

Hello Curtis,


I have a 65C02 in my VIC-20. I am working on a 65C02 version of WimBasic and I would like to use VICE for debugging/monitoring.

Regards,

Wim.
by wimoos
Thu Dec 16, 2010 6:56 am
Forum: Emulation and Cross Development
Topic: VICE and 65C02 ?
Replies: 4
Views: 2829

VICE and 65C02 ?

Hello all,

The title says it all: is VICE capable of running 65C02 binaries ? If not, can it be made capable of doing this ?

Regards,

Wim.
by wimoos
Tue Nov 30, 2010 7:17 am
Forum: Programming
Topic: Video Poker
Replies: 115
Views: 35392

I have been doing some optimization on videopoker, especially the winning calculation and I came up with the following: 100 for i=1 to 5:k(i)=h(i) and 15:next 110 v=0:for i=1 to 4:a=k(i):if a=-1 then 160 120 p=0:for j=i+1 to 5:if k(j)=a then p=p+1:k(j)=-1 130 next:if p=0 then 160 140 if p>v then w=a...
by wimoos
Sun Nov 07, 2010 12:33 pm
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 38919

oops..

Hello Mike, Your algorithm is the same as what I tested. I now tried it again and got the same score as you. I think I must have built the string from the other end, so an L-I expression was executed unneccesarily 255 times. The CBM program is slightly slower in WimBasic, as was to be expected. The ...
by wimoos
Sun Nov 07, 2010 9:24 am
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 38919

Speed test

Hello all, I did some speed testing with CBM Basic and WimBasic using its most optimal features. The case at hand is reversing a string of 255 characters. In CBM Basic there is only one way to do this and that is to build a new string, taking each of the characters of the original string in the reve...
by wimoos
Fri Nov 05, 2010 2:12 am
Forum: Emulation and Cross Development
Topic: BasEdit.NET
Replies: 306
Views: 137494

After some more thoughts I think Basic V2 simply has 3 comparison flags for <, = and > and simply checks if these operators are present. Afterwards the values left and right of these operators will be compared and then Basic will evaluate if the comparison result matches with one of the available f...
by wimoos
Tue Oct 26, 2010 5:35 am
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 38919

Supportsite

Hello all,


I have raised a support site at http://wimbasic.webs.com.

There is still a few loose ends to fix, but before years' end, this will be done.

Regards,

Wim.
by wimoos
Mon Oct 25, 2010 12:26 am
Forum: Programming
Topic: Printing Tricks
Replies: 5
Views: 2050

And then there is of course ExBasic/WimBasic, that offers printing at a given position: PRINT@pos,<expression>
or, for a single character: COKE pos,char[,color]

Regards,

Wim. 8)
by wimoos
Wed Oct 20, 2010 2:58 am
Forum: Programming
Topic: Printing Tricks
Replies: 5
Views: 2050

The only thing with this is that when you LIST a line containing this, it is not so easy to edit because LIST interprets the hard returns.
Apart from that, it's a good solution.

Regards,

Wim.