Commodore 128 Alive!

General => General chat => Coding competitions => Topic started by: Blacklord on December 18, 2008, 08:14 AM

Title: Commodore 128 Basic 7.0 One Liner Competition
Post by: Blacklord on December 18, 2008, 08:14 AM
We are pleased to announce the Commodore 128 Basic 7.0 One Liner Competition 2008!

Commodore 128 Basic 7.0 One Liner Competition is a friendly competition designed to see what ingenuity exists in the C128 community.

RULES

- Entries must be original
- The result must be displayable on a real C128 (or VICE)
- The competition starts Thursday December 18th 2008
- Entries must be submitted on or before March 18th, 2009
- there will be a competion page at this site with the submissions & you'll have the opportunity to vote for your favourite submission

SUBMISSIONS

- Submissions must be made by email to landover (at) tpg.com.au

PRIZES

- Prizes will be awarded on total votes & will be paid by PayPal

1st prize $AU50, 2nd prize $AU30, 3rd prize $AU20

DISCUSSION

Competition discussion only in this forum: http://landover.no-ip.com/forums/index.php?board=21.0
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: darkatx on December 18, 2008, 09:44 AM
After I slap my C128 back together I think I'll take a stab at it... :)
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: xlar54 on December 18, 2008, 02:34 PM
You state Basic 7..does that mean that SYS calls to ML are out?
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: Blacklord on December 18, 2008, 03:17 PM
Quote from: xlar54 on December 18, 2008, 02:34 PM
You state Basic 7..does that mean that SYS calls to ML are out?

If you mean creating a separate ML program & then calling it via SYS, then yes, it's out. SYS to a system function is ok.

Lance
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: RobertB on December 18, 2008, 05:45 PM
Quote from: Blacklord on December 18, 2008, 08:14 AMWe are pleased to announce the Commodore 128 Basic 7.0 One Liner Competition 2008!
Do you mean one 80-character Basic 7.0 line or one line that has been crunched to have more than 80 characters?  :)

                Truly,
                Robert Bernardo
                Fresno Commodore User Group
                http://videocam.net.au/fcug
                The Other Group of Amigoids
                http://www.calweb.com/~rabel1/
                Southern California Commodore/Amiga Network
                http://www.sccaners.org/
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: xlar54 on December 18, 2008, 08:10 PM
Well, my little encryption routine is out...considering what some of these people have managed to do in 128 bytes:

http://retrocode.blogspot.com/2008/12/what-can-you-write-in-128-bytes.html

(I would imagine 1 BASIC line wouldnt be much more than 128 bytes)
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: Blacklord on December 18, 2008, 08:25 PM
Quote from: RobertB on December 18, 2008, 05:45 PM
Quote from: Blacklord on December 18, 2008, 08:14 AMWe are pleased to announce the Commodore 128 Basic 7.0 One Liner Competition 2008!
Do you mean one 80-character Basic 7.0 line or one line that has been crunched to have more than 80 characters?  :)

             

Vanilla Basic :)
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: SmallCleverDinosaur on December 18, 2008, 09:53 PM
Lance, how do you define a BASIC-line?

It is possible to create a BASIC-line that consists of up to 252 bytes (including 2 bytes for the line number). Such a line will be a valid BASIC-line as far as the C128 is concerned. Other lines can be inserted and deleted before and after such a line and the program will still run.

The only thing is that it has to be entered with the monitor (or POKE'd or BLOAD'ed into memory) since the keyboardbuffer on the C128 is only 80 character in length. So there is no way of entering a 252 bytes line from READY-mode.

Quote from: Blacklord on December 18, 2008, 03:17 PM
If you mean creating a separate ML program & then calling it via SYS, then yes, it's out. SYS to a system function is ok.
If a BASIC-line of 252 bytes is OK in this competition, would it then be OK to have an ML program WITHIN these 252 bytes? Or should it be strictly BASIC-only (except for ML calls to routines in ROM)?

Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: Blacklord on December 18, 2008, 10:36 PM
If you can squeeze it in, then yes.
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: airship on December 19, 2008, 05:09 AM
I would think the simple parameters would be:

  (1) Has to be a single file that can be SAVEd then DLOADed, not BLOADed.

  (2) Has to execute with RUN.

  (3) LIST should work and should show a single line, but if it just shows a line number then a bunch of crap on the screen, that's cool as long as it obeys #2 above.

How does that sound?
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: SmallCleverDinosaur on December 19, 2008, 05:58 AM
Sounds good to me :)

It could look something like this:

(http://www.commodore128.org.uk/images/forumpics/one-liner%20small.jpg)

Click the following link to see a larger picture: http://www.commodore128.org.uk/images/forumpics/one-liner.jpg

You can type it in with the MONITOR, LIST it and RUN it. Just make sure that the first 3 pairs of zeroes on the third line ($1C10) are there, otherwise it will probably not work. The "crap" that follows "SYS7179:" is a small ML routine.
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: Blacklord on December 19, 2008, 06:41 AM
Quote from: airship on December 19, 2008, 05:09 AM
I would think the simple parameters would be:

  (1) Has to be a single file that can be SAVEd then DLOADed, not BLOADed.

  (2) Has to execute with RUN.

  (3) LIST should work and should show a single line, but if it just shows a line number then a bunch of crap on the screen, that's cool as long as it obeys #2 above.

How does that sound?

Agreed
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: Andrew Wiskow on December 19, 2008, 01:49 PM
This will require some serious thought...  Good thing I still have three months to think about it.  ;)
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: airship on December 20, 2008, 04:32 AM
Hmmm... now that I think about it, you might be able to game my definition. Here's how:

(1) Write, edit, crunch, cram, etc., your BASIC 7.0 code to fit in 252 bytes.

(2) Add M/L routine as long as you want right after your one-line BASIC program.

(3) POKE stuff to fool the BASIC SAVE command into saving not only the one-liner, but the M/L program behind it. (I'm not going to look up how to do this, but I'm 99% sure you can.)

(4) You can then DLOAD and RUN the program, though it will be however long you want to make it.

Since this clearly violates the spirit of the contest, this kind of trickery should be banned outright. If any program is longer than a single disk block, it's an obvious fraud.
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: SmallCleverDinosaur on December 20, 2008, 05:50 AM

Quote from: airship on December 20, 2008, 04:32 AM
(3) POKE stuff to fool the BASIC SAVE command into saving not only the one-liner, but the M/L program behind it. (I'm not going to look up how to do this, but I'm 99% sure you can.)
This can definitely be done. In fact, that is exactly how most C64 games are saved. If you load a C64 game and list it you will see something like: 10 SYS 2061 and nothing else. That is because the LIST command considers a program to end when it finds three pairs of $00 in a row. The trick is to place the ML-code after those three pairs and then move the "end of program"-pointer beyond the ML-code and use the SAVE command. Then both the single line BASIC program will be saved together with the rest of the ML-code. The "end of program"-pointer is placed at $1210 in the C128's memorymap.

Quote
Since this clearly violates the spirit of the contest, this kind of trickery should be banned outright. If any program is longer than a single disk block, it's an obvious fraud.
Obviously, if we allowed the technic just described, the contest would no longer be a one-liner contest. So a single discblock is a very good limit. A full discblock is 256 bytes in size but only 254 bytes are used for data, the first two are used to point to the next discblock.

That means that the total amount of bytes available are 248. A basicprogram must begin with a $00 and end with four $00. The two bytes following the initial $00 points to the next linenumber (lobyte/hibyte). That means that a toal of 6 bytes are lost which leaves us 248 bytes to work with.
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: Blacklord on February 15, 2009, 11:51 PM
Because I'm still in Mexico, I've decided to extend the comp end-time til after I get back (which will be mid April).

One entry alkready received from Megabit.

Lance
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: airship on February 17, 2009, 04:23 AM
Megabit = showoff. :P
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: Blacklord on February 17, 2009, 04:27 AM
Quote from: airship on February 17, 2009, 04:23 AM
Megabit = showoff. :P

His one liner is quite good too :)

Where's yours ????????
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: naI on May 24, 2009, 03:59 AM
I am very curious to see what people managed to do with one line of BASIC.  When will we get to review the entries and cast our votes?
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: Blacklord on May 25, 2009, 07:38 AM
Quote from: naI on May 24, 2009, 03:59 AM
I am very curious to see what people managed to do with one line of BASIC.  When will we get to review the entries and cast our votes?

I'll get this restarted now I'm finally back - has been a bit of a topsy-turvy year for me so far!
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: airship on May 27, 2009, 01:47 AM
Shucks. I was prepared to procrastinate for another year or two. :)
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: Blacklord on May 27, 2009, 07:30 AM
Quote from: airship on May 27, 2009, 01:47 AM
Shucks. I was prepared to procrastinate for another year or two. :)

Surely not :)
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: megabit on September 15, 2009, 04:50 AM

Say Lance, what is happening with the One Liner?

Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: airship on September 15, 2009, 05:27 AM
I think you won because you were the only entry.

But if I had entered, I WOULD have won! :P
Title: Re: Commodore 128 Basic 7.0 One Liner Competition
Post by: megabit on September 15, 2009, 09:32 AM

QuoteBut if I had entered, I WOULD have won! 

It's not too late!  ;D
EhPortal 1.34 © 2025, WebDev