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

Adding Command Line-esque Parameters to C64 and C128 Programs

Follow
8-Bit Show And Tell

It's actually pretty easy to add support for commandlinestyle parameters to Commodore 64 and Commodore 128 programs by reading the line input buffer with some PEEKs. We examine how to do this, why this might be beneficial, and give some example code in BASIC and Assembly. We also learn a bit about how BASIC parses and interprets our code, and the internal structure of these commands and programs. And we look at the Commodore 128 feature to RUN a file from disk that further enhances the use of parameters.

Download the D64 of today's code: https://8bitshowandtell.com/downloads...

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

Previous videos referenced:
"About Commodore 64 BASIC Abbreviations":    • About Commodore 64 BASIC Abbreviations  
"Cracking a Commodore 64 Game From Cassette: Livingstone, I Presume?":    • Cracking a Commodore 64 Game From Cas...  
"4Byte Commodore 64 Demo and Followup on 10 PRINT Orthogonal [32 bytes]":    • 4Byte Commodore 64 Demo and Followu...  
"Using Commodore 64 BASIC SYS Parameters in Machine Language":    • Using Commodore 64 BASIC SYS Paramete...  

Index:
0:00 Can parameters be added to a Commodore BASIC program?
1:57 How EXAMPLE 1 works
5:42 What's the point?
7:15 Some problems
9:12 EXAMPLE 2: More Robust
10:55 BORDER: A slightly more useful example
14:28 Rhymes with Orange: a tokenization problem
16:02 Commodore 128 Mode: RUN "FILENAME"
18:30 Turbo Macro Pro: Assembly example
19:52 BASIC Header / Stub
21:13 TXTPTR / rest of code walkthrough
24:35 Modifying for border colour version
25:36 Thanks!

posted by karubberduckygw