Skip to main content
3 of 3
Noticed a small thing whereby I could save one BASIC token on two of the methods here
Shaun Bebbers
  • 2.4k
  • 18
  • 22

Commodore BASIC, method 1 (28 bytes)

0?1,2,3,4,5,6,7,8,9,10 

Method 2 (27 26 bytes)

0FORI=1TO10:?I:NEXT 

Method 3 (40 39 bytes)

0I=1 1?I:I=I+1:IFI<11THEN1 

Method 4 (32 31 bytes)

0?I:I=I+1:IFI<11THEN0 I=1:GOTO0 

Method 5 (20 bytes)

0?"12345678910 

Method 6 (25 bytes) CBM BASIC V2 only [C64/C64Mini or VIC-20]

0I=I+1:?I:ON-(I<10)GOTO 

I'm working out the memory used with ? 38911-(fre(0)-65536*(fre(0)<0)) on a Commodore 64.

Shaun Bebbers
  • 2.4k
  • 18
  • 22