15 Free YouTube subscribers for your channel
Get Free YouTube Subscribers, Views and Likes

Printing Binary in BASIC and Assembly on Commodore 64

Follow
8-Bit Show And Tell

I wanted to print binary numbers on the Commodore 64 from BASIC. When I didn't find a readymade solution, I made my own in BASIC. Then I tried to optimize it for speed. Then I coded it in 6510 assembly language on a real C64. But will it benchmark faster?

To support 8Bit Show And Tell:
Become a patron:   / 8bitshowandtell  
Onetime donation: https://paypal.me/8BitShowAndTell
2nd channel:    / @8bitshowandtell247  

Download .d64 of today's code: https://8bitshowandtell.com/downloads...
Previous SYS Params video:    • Using Commodore 64 BASIC SYS Paramete...  

Index:
0:00 Why I want to print binary values
2:25 BASIC1: The BASIC benchmarking framework 12.52s
5:11 BASIC2: e5frog's algorithm 52.95s
7:52 BASIC3: Fixed output 58.78s
8:40 BASIC4: Decimal pretending to be binary 96.85s
11:20 BASIC5: "Cheating" with precalculations 35.97s
15:28 BASIC6: Direct to characters 35.93s
17:10 BASIC7: Eliminate a comparison 31.43s
17:47 BASIC8: GOTO optimization 28.4s
18:35 BASIC9: Leading zeros "optimization" 33.63s
21:54 BASIC10: Precalc all strings! 20.78s + 13.17s
25:02 Turbo Macro Pro time: binary.s walkthrough
32:12 BASIC11: Benchmark assembly from BASIC 13.68s
34:50 Joystick time thanks Carsten!
37:30 Thanks

posted by karubberduckygw