Commodore 128 Alive!

Commodore 128 => 128 programmers => BASIC => Topic started by: MIRKOSOFT on June 18, 2009, 11:42 PM

Title: Little fun - character in ring
Post by: MIRKOSOFT on June 18, 2009, 11:42 PM
Hi!

I typed simple funny thing in Basic 7 - character drawing into a ring, if you want, try...
file is attached
or paste to VICE:

10 color4,2:color0,2:color5,1:color1,1:graphic0,1
20 input"enter text maximum 50 chars";a$
25 graphic1,1
30 a=0:b=1
40 forc=0to2*PIstepPI/200
50 ifa=0thengosub200:rem getting data
60 ford=7to0step-1
65 fore=0to1
70 gosub300:ifx<>0thendraw1,127+(60+d*2+e)*sin(c)+sin(c),87+(60+d*2+e)*cos(c)+cos(c)
75 nexte
80 nextd
90 a=a+1
100 ifa=8thena=0:b=b+1:ifb>len(a$)thenchar1,13,24,"press any key!":getkeyq$:graphic0:end
110 nextc
200 rem ==== position of char ====
210 z=asc(mid$(a$,b,1))
220 ifz<64thenreturn
230 ifz>63andz<96thenz=z-64:return:elsereturn
300 rem ==== get a pixel ====
310 bank14:ad=53248
320 zn=ad+(z*8)
330 by=peek(zn+d)
340 x=byand(2^(7-a))
350 return

Miro
Title: Little fun again- character in ring in 80 columns mode
Post by: MIRKOSOFT on June 23, 2009, 02:03 AM
I had created in BASIC 8 the same program for 80 columns mode. Works also in VICE.
Who don't have Basic 8, I attached program and also Basic8.bin for VICE.

Miro
Title: Re: Little fun - character in ring
Post by: mikeebean on March 07, 2010, 06:19 AM
Very cool program! Just a note to others who might copy/paste into Vice:

Line 40: Change both instances of PI to π (pi symbol, Shift-Delete on my version of Vice.)

Line 340: Change the ^ to an up arrow (Delete key on my version of Vice.)

You will probably want to put Vice in Warp mode (Alt-W) to speed up the process.

Again, very well done!
Michael
EhPortal 1.34 © 2025, WebDev