MENU

Fun & Interesting

Printing Binary in BASIC and Assembly on Commodore 64

8-Bit Show And Tell 22,981 3 years ago
Video Not Working? Fix It Now

I wanted to print binary numbers on the Commodore 64 from BASIC. When I didn't find a ready-made 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 8-Bit Show And Tell: Become a patron: https://patreon.com/8BitShowAndTell One-time donation: https://paypal.me/8BitShowAndTell 2nd channel: https://youtube.com/channel/UCAgWzEh5c8391eJnELDy9OA Download .d64 of today's code: https://8bitshowandtell.com/downloads/binary.d64 Previous SYS Params video: https://youtu.be/3ZV8LtpMbvA 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

Comment